Penggunaan if else pada mysql

Saya memiliki dua tabel seperti ini. Keduanya adalah tabel terpisah

AccountNo       User         Name
----------------------------------
 1               U            a
 2               U            b
 3               U            c

Dan tabel lain berisi struktur berikut

 TempAccountNo       Mycolumn    AccountNo     
------------------------------------------
 4               X                2341
 5               Y                 2
 6               Z                2568

Saya perlu memilih AccountNo atau TempAccountNo, Mycolumn Dari tabel II dan kondisinya 

If (tableII.AccountNo not in table I)

Saya harus memilih TempAccountNo from table II

else

Saya harus memilih AccountNo from table II

Bagaimana saya bisa mencapai ini.

Meskipun Anda tentu saja dapat menggunakan MySQL IF() fungsi kontrol aliran seperti yang ditunjukkan oleh jawaban dbemerlin , saya menduga mungkin sedikit lebih jelas bagi pembaca (yaitu diri Anda sendiri, dan pengembang masa depan yang mungkin mengambil kode Anda di masa depan) untuk menggunakan CASE ekspresi sebagai gantinya:

UPDATE Table
SET    A = CASE
         WHEN A > 0 AND A < 1 THEN 1
         WHEN A > 1 AND A < 2 THEN 2
         ELSE A
       END
WHERE  A IS NOT NULL

Tentu saja, dalam contoh khusus ini agak boros untuk mengatur A ke dirinya sendiri dalam klausa ELSE — lebih baik menyaring kondisi seperti itu dari UPDATE, melalui WHERE klausa:

UPDATE Table
SET    A = CASE
         WHEN A > 0 AND A < 1 THEN 1
         WHEN A > 1 AND A < 2 THEN 2
       END
WHERE  (A > 0 AND A < 1) OR (A > 1 AND A < 2)

(Perbedaannya mencakup A IS NOT NULL).

Atau, jika Anda ingin interval ditutup daripada terbuka (perhatikan bahwa ini akan menetapkan nilai 0 Ke 1 - jika itu tidak diinginkan, orang dapat secara eksplisit memfilter kasus seperti itu di WHERE klausa, atau tambahkan prioritas lebih tinggi WHEN kondisi):

UPDATE Table
SET    A = CASE
         WHEN A BETWEEN 0 AND 1 THEN 1
         WHEN A BETWEEN 1 AND 2 THEN 2
       END
WHERE  A BETWEEN 0 AND 2

Meskipun, seperti yang dbmerlin tunjukkan, untuk situasi khusus ini Anda dapat mempertimbangkan untuk menggunakan CEIL() sebagai gantinya:

UPDATE Table SET A = CEIL(A) WHERE A BETWEEN 0 AND 2

IF() in MySQL is a ternary function, not a control structure -- if the condition in the first argument is true, it returns the second argument; otherwise, it returns the third argument. There is no corresponding ELSEIF() function or END IF keyword.

The closest equivalent to what you've got would be something like:

IF(qty_1<='23', price,
  IF('23'>qty_1 && qty_2<='23', price_2,
    IF('23'>qty_2 && qty_3<='23', price_3,
      IF('23'>qty_3, price_4, 1)
    )
  )
)

The conditions don't all make sense to me (it looks as though some of them may be inadvertently reversed?), but without knowing what exactly you're trying to accomplish, it's hard for me to fix that.

Pada kesemapatan kali ini kita akan mengenal dan bagaimana cara menggunakan MySQL IF Function, MySQL IF function adalah salah satu kontrol aliran MySQL yang mengembalikan nilai berdasarkan kondisi. IF Function pada umumnya disebut sebagai IF ELSE atau IF THEN ELSE function. sintaks penulisan MysQL IF Function seperti dibawah ini:

IF(expr,if_true_expr,if_false_expr)

Keterangan
IF Function akan mengembalikan numerik atau string, tergantung pada bagaimana menggunakannya. pada penulisan diatas expr pertama ditulis dengan if_true_expr dan kedua ditulis denganif_false_expr

Harap berhati-hati ketika anda menggunakan sintaks diatas diharapkan jangan pernah kebalik untuk penulisan IF function dengan pernyataan IF.

Contoh MySQL IF Function

Untuk lebih jelas tentang MySQL IF Function kita akan belajar dengan membuat beberapa istilah untuk mempermudah dan memahami tutorial ini:

Contoh Sederhana MySQL IF Function

Anda dapat menggunakan langsung IF Function dalam pernyataanSELECT tanpa FROM dan klausa lainnya, lihat penulisan sintaks berikut:

SELECT IF(1=2,'true','false');--false

SELECT IF(1=1,' true','false');--true


Contoh Menampilkan MySQL IF Function&amp;nbsp;menggunakan N / A dan&amp;nbsp;NULL&lt;/span&gt;&lt;/div&gt; &lt;div style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border:none;box-sizing:border-box;color:#2b2b2b;font-family:'Open Sans','Trebuchet MS',sans-serif;font-size:17px;line-height:28.8999996185303px;margin-bottom:2rem;outline:0px;padding:0px;text-align:justify;vertical-align:baseline"&gt; Banyak user yang tidak memiliki data negara dalam kolom karena itu ketika kita memilih user&amp;nbsp;pada kolom negara akan menampilkan nilai-nilai NULL yang tidak mempunyai&amp;nbsp;makna untuk tujuan pelaporan. sebagai contoh Lihat query berikut:&lt;/div&gt; &lt;div style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border:none;box-sizing:border-box;color:#2b2b2b;font-family:'Open Sans','Trebuchet MS',sans-serif;font-size:17px;line-height:28.8999996185303px;margin-bottom:2rem;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/div&gt; &lt;div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-55dc5b665e020645342029" style="background:rgb(253,253,253)!important;border:1px solid rgb(153,153,153)!important;box-sizing:border-box;color:#2b2b2b;direction:ltr!important;font-family:Monaco,MonacoRegular,'Courier New',monospace;font-size:12px!important;height:auto;line-height:15px!important;margin:12px 0px;outline:0px;overflow:hidden!important;padding:0px;position:relative!important;text-shadow:none!important;vertical-align:baseline;width:546.640625px"&gt; &lt;div class="crayon-plain-wrap" style="background:0px 50%;border:0px;box-sizing:border-box;height:auto!important;margin:0px!important;outline:0px;padding:0px!important;vertical-align:baseline"&gt; &lt;textarea class="crayon-plain print-no" data-settings="dblclick" readonly style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:initial;background-repeat:initial;background-size:initial;border-radius:0px;border:0px;box-shadow:none;color:black;display:block;font-family:Monaco, MonacoRegular,'Courier New',monospace!important;font-size:12px!important;font-stretch:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;height:75px;line-height:15px!important;margin:0px;max-width:100%;opacity:0;overflow:hidden;padding-left:5px;padding-right:5px;padding-top:0px;position:absolute;resize:none;tab-size:4;white-space:pre;width:544.640625px;word-wrap:normal;z-index:0" wrap="soft"&gt;&lt;/textarea&gt;&lt;/div&gt; &lt;div class="crayon-main" style="background:0px 50%;border:0px;box-sizing:border-box;margin:0px;outline:0px;overflow:hidden;padding:0px;position:relative;vertical-align:baseline;width:544.640625px;z-index:1"&gt; &lt;table class="crayon-table" style="background:none!important;border-collapse:collapse!important;border-spacing:0px!important;border:none!important;box-sizing:border-box;font-size:12px;line-height:1.8em;margin-bottom:0px!important;margin-left:0px;margin-right:0px!important;margin-top:0px!important;outline:0px;padding:0px !important;vertical-align:baseline;width:auto!important"&gt;&lt;tbody style="background:0px 0px;border:none;box-sizing:border-box;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;tr class="crayon-row" style="background:0px 50%;border:none!important;box-sizing:border-box;margin:0px!important;outline:0px;padding:0px!important;vertical-align:top!important"&gt;&lt;td class="crayon-nums" data-settings="show" style="background:rgb(223,239,255)!important;border:0px;box-sizing:border-box;color:rgb(84, 153,222)!important;margin:0px!important;outline:0px;padding:0px!important;vertical-align:top!important"&gt;&lt;div class="crayon-nums-content" style="background:0px 50%;border:0px;box-sizing:border-box;line-height:15px!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline;white-space:nowrap"&gt; &lt;div class="crayon-num" data-line="crayon-55dc5b665e020645342029-1" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit !important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;text-align:center;vertical-align:baseline"&gt; 1&lt;/div&gt; &lt;div class="crayon-num crayon-striped-num" data-line="crayon-55dc5b665e020645342029-2" style="background:rgb(200,225,250)!important;border:0px;box-sizing:border-box;color:rgb(49,124,197)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit !important;margin:0px;outline:0px;padding:0px 5px;text-align:center;vertical-align:baseline"&gt; 2&lt;/div&gt; &lt;div class="crayon-num" data-line="crayon-55dc5b665e020645342029-3" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;text-align:center;vertical-align:baseline"&gt; 3&lt;/div&gt; &lt;div class="crayon-num crayon-striped-num" data-line="crayon-55dc5b665e020645342029-4" style="background:rgb(200,225,250)!important;border:0px;box-sizing:border-box;color:rgb(49,124,197)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;text-align:center;vertical-align:baseline"&gt; 4&lt;/div&gt; &lt;div class="crayon-num" data-line="crayon-55dc5b665e020645342029-5" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;text-align:center;vertical-align:baseline"&gt; 5&lt;/div&gt; &lt;/div&gt; &lt;/td&gt;&lt;td class="crayon-code" style="background:0px 50%;border:0px;box-sizing:border-box;margin:0px!important;outline:0px;padding:0px !important;vertical-align:top!important;width:527px"&gt;&lt;div class="crayon-pre" style="background:none!important;border:none!important;box-sizing:border-box;line-height:15px!important;margin:0px;outline:0px;overflow:visible;padding:0px;tab-size:4;vertical-align:baseline;white-space:pre"&gt; &lt;div class="crayon-line" id="crayon-55dc5b665e020645342029-1" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;vertical-align:baseline"&gt; &lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;SELECT &lt;/span&gt;&lt;span class="crayon-v" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,45,122)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;customerNumber&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;,&lt;/span&gt;&lt;/div&gt; &lt;div class="crayon-line crayon-striped-line" id="crayon-55dc5b665e020645342029-2" style="background:rgb(247,247,247)!important;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;vertical-align:baseline"&gt; &lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="crayon-v" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0, 45,122)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;customerName&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;,&lt;/span&gt;&lt;/div&gt; &lt;div class="crayon-line" id="crayon-55dc5b665e020645342029-3" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;vertical-align:baseline"&gt; &lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="crayon-v" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,45,122)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;state&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;,&lt;/span&gt;&lt;/div&gt; &lt;div class="crayon-line crayon-striped-line" id="crayon-55dc5b665e020645342029-4" style="background:rgb(247,247,247)!important;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit !important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;vertical-align:baseline"&gt; &lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;country&lt;/span&gt;&lt;/div&gt; &lt;div class="crayon-line" id="crayon-55dc5b665e020645342029-5" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit !important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;vertical-align:baseline"&gt; &lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;FROM &lt;/span&gt;&lt;span class="crayon-v" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,45,122)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;customers&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;;&lt;/span&gt;&lt;/div&gt; &lt;/div&gt; &lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;/div&gt; &lt;/div&gt; &lt;div style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border:none;box-sizing:border-box;color:#2b2b2b;font-family:'Open Sans','Trebuchet MS',sans-serif;font-size:17px;line-height:28.8999996185303px;margin-bottom:2rem;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/div&gt; &lt;div style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border:none;box-sizing:border-box;color:#2b2b2b;font-family:'Open Sans','Trebuchet MS',sans-serif;font-size:17px;line-height:28.8999996185303px;margin-bottom:2rem;outline:0px;padding:0px;text-align:justify;vertical-align:baseline"&gt; Akan terlihat seperti gambar ini&lt;a target="_blank" href="http://remotemysqlhosting.com/wp-content/uploads/2014/10/MySQL-IF-customers-table.png" style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border-bottom-color:rgb(0,0,0);border-bottom-width:1px;border-style:none none dotted;box-sizing:border-box;color:#06400d;cursor:pointer;margin:0px;outline:0px;padding:0px;text-decoration:none;vertical-align:baseline"&gt;&lt;img alt="MySQL-IF-customers-table" class="alignnone size-full wp-image-167" height="198" src="http://remotemysqlhosting.com/wp-content/uploads/2014/10/MySQL-IF-customers-table.png" style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border:none;box-sizing:border-box;clear:both;display:block;height:auto;margin:0px;max-width:100%;outline:0px;padding:0px;vertical-align:baseline" width="391"&gt;&lt;/a&gt;&lt;br&gt; Kita dapat mengganti dan meningkatkan output dengan menggunakan&amp;nbsp;&lt;em style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border:none;box-sizing:border-box;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;IF function&lt;/em&gt;&amp;nbsp;untuk menghilangkan&amp;nbsp;N / A dalam query, berikut ini sintaks pernyataan yang harus anda ketahui:&lt;/div&gt; &lt;div style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border:none;box-sizing:border-box;color:#2b2b2b;font-family:'Open Sans','Trebuchet MS',sans-serif;font-size:17px;line-height:28.8999996185303px;margin-bottom:2rem;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/div&gt; &lt;div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-55dc5b665e025979564089" style="background:rgb(253,253,253)!important;border:1px solid rgb(153,153,153)!important;box-sizing:border-box;color:#2b2b2b;direction:ltr!important;font-family:Monaco,MonacoRegular,'Courier New',monospace;font-size:12px!important;height:auto;line-height:15px!important;margin:12px 0px;outline:0px;overflow:hidden !important;padding:0px;position:relative!important;text-shadow:none!important;vertical-align:baseline;width:546.640625px"&gt; &lt;div class="crayon-plain-wrap" style="background:0px 50%;border:0px;box-sizing:border-box;height:auto!important;margin:0px!important;outline:0px;padding:0px!important;vertical-align:baseline"&gt; &lt;textarea class="crayon-plain print-no" data-settings="dblclick" readonly style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:initial;background-repeat:initial;background-size:initial;border-radius:0px;border:0px;box-shadow:none;color:black;display:block;font-family:Monaco, MonacoRegular,'Courier New',monospace!important;font-size:12px!important;font-stretch:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;height:75px;line-height:15px!important;margin:0px;max-width:100%;opacity:0;overflow:hidden;padding-left:5px;padding-right:5px;padding-top:0px;position:absolute;resize:none;tab-size:4;white-space:pre;width:544.640625px;word-wrap:normal;z-index:0" wrap="soft"&gt;&lt;/textarea&gt;&lt;/div&gt; &lt;div class="crayon-main" style="background:0px 50%;border:0px;box-sizing:border-box;margin:0px;outline:0px;overflow:hidden;padding:0px;position:relative;vertical-align:baseline;width:544.640625px;z-index:1"&gt; &lt;table class="crayon-table" style="background:none!important;border-collapse:collapse!important;border-spacing:0px!important;border:none!important;box-sizing:border-box;font-size:12px;line-height:1.8em;margin-bottom:0px!important;margin-left:0px;margin-right:0px!important;margin-top:0px!important;outline:0px;padding:0px !important;vertical-align:baseline;width:auto!important"&gt;&lt;tbody style="background:0px 0px;border:none;box-sizing:border-box;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;tr class="crayon-row" style="background:0px 50%;border:none!important;box-sizing:border-box;margin:0px!important;outline:0px;padding:0px!important;vertical-align:top!important"&gt;&lt;td class="crayon-nums" data-settings="show" style="background:rgb(223,239,255)!important;border:0px;box-sizing:border-box;color:rgb(84, 153,222)!important;margin:0px!important;outline:0px;padding:0px!important;vertical-align:top!important"&gt;&lt;div class="crayon-nums-content" style="background:0px 50%;border:0px;box-sizing:border-box;line-height:15px!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline;white-space:nowrap"&gt; &lt;div class="crayon-num" data-line="crayon-55dc5b665e025979564089-1" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit !important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;text-align:center;vertical-align:baseline"&gt; 1&lt;/div&gt; &lt;div class="crayon-num crayon-striped-num" data-line="crayon-55dc5b665e025979564089-2" style="background:rgb(200,225,250)!important;border:0px;box-sizing:border-box;color:rgb(49,124,197)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit !important;margin:0px;outline:0px;padding:0px 5px;text-align:center;vertical-align:baseline"&gt; 2&lt;/div&gt; &lt;div class="crayon-num" data-line="crayon-55dc5b665e025979564089-3" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;text-align:center;vertical-align:baseline"&gt; 3&lt;/div&gt; &lt;div class="crayon-num crayon-striped-num" data-line="crayon-55dc5b665e025979564089-4" style="background:rgb(200,225,250)!important;border:0px;box-sizing:border-box;color:rgb(49,124,197)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;text-align:center;vertical-align:baseline"&gt; 4&lt;/div&gt; &lt;div class="crayon-num" data-line="crayon-55dc5b665e025979564089-5" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;text-align:center;vertical-align:baseline"&gt; 5&lt;/div&gt; &lt;/div&gt; &lt;/td&gt;&lt;td class="crayon-code" style="background:0px 50%;border:0px;box-sizing:border-box;margin:0px!important;outline:0px;padding:0px !important;vertical-align:top!important;width:527px"&gt;&lt;div class="crayon-pre" style="background:none!important;border:none!important;box-sizing:border-box;line-height:15px!important;margin:0px;outline:0px;overflow:visible;padding:0px;tab-size:4;vertical-align:baseline;white-space:pre"&gt; &lt;div class="crayon-line" id="crayon-55dc5b665e025979564089-1" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;vertical-align:baseline"&gt; &lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;SELECT &lt;/span&gt;&lt;span class="crayon-v" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,45,122)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;customerNumber&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;,&lt;/span&gt;&lt;/div&gt; &lt;div class="crayon-line crayon-striped-line" id="crayon-55dc5b665e025979564089-2" style="background:rgb(247,247,247)!important;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;vertical-align:baseline"&gt; &lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="crayon-v" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0, 45,122)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;customerName&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;,&lt;/span&gt;&lt;/div&gt; &lt;div class="crayon-line" id="crayon-55dc5b665e025979564089-3" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;vertical-align:baseline"&gt; &lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="crayon-st" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(128,0,128)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;IF&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;(&lt;/span&gt;&lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;state &lt;/span&gt;&lt;span class="crayon-st" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(128,0,128)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;IS&lt;/span&gt;&lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/span&gt;&lt;span class="crayon-t" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(128,0,128)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;NULL&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;,&lt;/span&gt;&lt;span class="crayon-s" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,128,0)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;'N/A'&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;,&lt;/span&gt;&lt;span class="crayon-v" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,45,122)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;state&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;)&lt;/span&gt;&lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/span&gt;&lt;span class="crayon-v" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,45,122)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;state&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;,&lt;/span&gt;&lt;/div&gt; &lt;div class="crayon-line crayon-striped-line" id="crayon-55dc5b665e025979564089-4" style="background:rgb(247,247,247)!important;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit !important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;vertical-align:baseline"&gt; &lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;country&lt;/span&gt;&lt;/div&gt; &lt;div class="crayon-line" id="crayon-55dc5b665e025979564089-5" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit !important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;vertical-align:baseline"&gt; &lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;FROM &lt;/span&gt;&lt;span class="crayon-v" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,45,122)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;customers&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;;&lt;/span&gt;&lt;/div&gt; &lt;/div&gt; &lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;/div&gt; &lt;/div&gt; &lt;div style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border:none;box-sizing:border-box;color:#2b2b2b;font-family:'Open Sans','Trebuchet MS',sans-serif;font-size:17px;line-height:28.8999996185303px;margin-bottom:2rem;outline:0px;padding:0px;vertical-align:baseline"&gt; Lihat gambar hasil dari sintaks diatas&lt;/div&gt; &lt;div style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border:none;box-sizing:border-box;color:#2b2b2b;font-family:'Open Sans','Trebuchet MS',sans-serif;font-size:17px;line-height:28.8999996185303px;margin-bottom:2rem;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;a target="_blank" href="http://remotemysqlhosting.com/wp-content/uploads/2014/10/MySQL-IF-NA-instead-of-NULL.png" style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border-bottom-color:rgb(0,0,0);border-bottom-width:1px;border-style:none none dotted;box-sizing:border-box;color:#06400d;cursor:pointer;margin:0px;outline:0px;padding:0px;text-decoration:none;vertical-align:baseline"&gt;&lt;img alt="MySQL-IF-NA-instead-of-NULL" class="alignnone size-full wp-image-168" height="199" src="http://remotemysqlhosting.com/wp-content/uploads/2014/10/MySQL-IF-NA-instead-of-NULL.png" style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border:none;box-sizing:border-box;clear:both;display:block;height:auto;margin:0px;max-width:100%;outline:0px;padding:0px;vertical-align:baseline" width="381"&gt;&lt;/a&gt;&lt;br&gt; &lt;span style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border:none;box-sizing:border-box;font-weight:700;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;Cara Menggabungkan IF Function&amp;nbsp;dengan SUM Function&lt;/span&gt;&lt;/div&gt; &lt;div style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border:none;box-sizing:border-box;color:#2b2b2b;font-family:'Open Sans','Trebuchet MS',sans-serif;font-size:17px;line-height:28.8999996185303px;margin-bottom:2rem;outline:0px;padding:0px;text-align:justify;vertical-align:baseline"&gt; Misalnya jika Anda ingin tahu berapa banyak yang dikirim dan banyak pembatalan pesanan sepanjang waktu, Anda dapat menggunakan IF Function&amp;nbsp;dengan SUM agregat Function, sebagai berikut:&lt;/div&gt; &lt;div style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border:none;box-sizing:border-box;color:#2b2b2b;font-family:'Open Sans','Trebuchet MS',sans-serif;font-size:17px;line-height:28.8999996185303px;margin-bottom:2rem;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/div&gt; &lt;div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-55dc5b665e029963846117" style="background:rgb(253,253,253)!important;border:1px solid rgb(153,153,153)!important;box-sizing:border-box;color:#2b2b2b;direction:ltr!important;font-family:Monaco,MonacoRegular,'Courier New',monospace;font-size:12px!important;height:auto;line-height:15px!important;margin:12px 0px;outline:0px;overflow:hidden !important;padding:0px;position:relative!important;text-shadow:none!important;vertical-align:baseline;width:546.640625px"&gt; &lt;div class="crayon-plain-wrap" style="background:0px 50%;border:0px;box-sizing:border-box;height:auto!important;margin:0px!important;outline:0px;padding:0px!important;vertical-align:baseline"&gt; &lt;textarea class="crayon-plain print-no" data-settings="dblclick" readonly style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:initial;background-repeat:initial;background-size:initial;border-radius:0px;border:0px;box-shadow:none;color:black;display:block;font-family:Monaco, MonacoRegular,'Courier New',monospace!important;font-size:12px!important;font-stretch:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;height:45px;line-height:15px!important;margin:0px;max-width:100%;opacity:0;overflow:hidden;padding-left:5px;padding-right:5px;padding-top:0px;position:absolute;resize:none;tab-size:4;white-space:pre;width:544.640625px;word-wrap:normal;z-index:0" wrap="soft"&gt;&lt;/textarea&gt;&lt;/div&gt; &lt;div class="crayon-main" style="background:0px 50%;border:0px;box-sizing:border-box;margin:0px;outline:0px;overflow:hidden;padding:0px;position:relative;vertical-align:baseline;width:544.640625px;z-index:1"&gt; &lt;table class="crayon-table" style="background:none!important;border-collapse:collapse!important;border-spacing:0px!important;border:none!important;box-sizing:border-box;font-size:12px;line-height:1.8em;margin-bottom:0px!important;margin-left:0px;margin-right:0px!important;margin-top:0px!important;outline:0px;padding:0px !important;vertical-align:baseline;width:auto!important"&gt;&lt;tbody style="background:0px 0px;border:none;box-sizing:border-box;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;tr class="crayon-row" style="background:0px 50%;border:none!important;box-sizing:border-box;margin:0px!important;outline:0px;padding:0px!important;vertical-align:top!important"&gt;&lt;td class="crayon-nums" data-settings="show" style="background:rgb(223,239,255)!important;border:0px;box-sizing:border-box;color:rgb(84, 153,222)!important;margin:0px!important;outline:0px;padding:0px!important;vertical-align:top!important"&gt;&lt;div class="crayon-nums-content" style="background:0px 50%;border:0px;box-sizing:border-box;line-height:15px!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline;white-space:nowrap"&gt; &lt;div class="crayon-num" data-line="crayon-55dc5b665e029963846117-1" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit !important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;text-align:center;vertical-align:baseline"&gt; 1&lt;/div&gt; &lt;div class="crayon-num crayon-striped-num" data-line="crayon-55dc5b665e029963846117-2" style="background:rgb(200,225,250)!important;border:0px;box-sizing:border-box;color:rgb(49,124,197)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit !important;margin:0px;outline:0px;padding:0px 5px;text-align:center;vertical-align:baseline"&gt; 2&lt;/div&gt; &lt;div class="crayon-num" data-line="crayon-55dc5b665e029963846117-3" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;text-align:center;vertical-align:baseline"&gt; 3&lt;/div&gt; &lt;/div&gt; &lt;/td&gt;&lt;td class="crayon-code" style="background:0px 50%;border:0px;box-sizing:border-box;margin:0px!important;outline:0px;padding:0px!important;vertical-align:top!important;width:527px"&gt;&lt;div class="crayon-pre" style="background:none!important;border:none!important;box-sizing:border-box;line-height:15px!important;margin:0px;outline:0px;overflow:visible;padding:0px;tab-size:4;vertical-align:baseline;white-space:pre"&gt; &lt;div class="crayon-line" id="crayon-55dc5b665e029963846117-1" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;vertical-align:baseline"&gt; &lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit !important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;SELECT &lt;/span&gt;&lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;SUM&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51, 51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;(&lt;/span&gt;&lt;span class="crayon-st" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(128,0,128)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;IF&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;(&lt;/span&gt;&lt;span class="crayon-v" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,45,122)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;status&lt;/span&gt;&lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/span&gt;&lt;span class="crayon-o" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;=&lt;/span&gt;&lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/span&gt;&lt;span class="crayon-s" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,128,0)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;'Shipped'&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;,&lt;/span&gt;&lt;span class="crayon-cn" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(206,0,0)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;1&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;,&lt;/span&gt;&lt;span class="crayon-cn" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(206,0,0)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;0&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;)&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;)&lt;/span&gt;&lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="crayon-st" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(128,0,128)!important;font-family:inherit;font-size:inherit !important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;AS&lt;/span&gt;&lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/span&gt;&lt;span class="crayon-v" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,45,122)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;Shipped&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;,&lt;/span&gt;&lt;/div&gt; &lt;div class="crayon-line crayon-striped-line" id="crayon-55dc5b665e029963846117-2" style="background:rgb(247,247,247)!important;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;vertical-align:baseline"&gt; &lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0, 78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;SUM&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;(&lt;/span&gt;&lt;span class="crayon-st" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(128,0,128)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;IF&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;(&lt;/span&gt;&lt;span class="crayon-v" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,45,122)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;status&lt;/span&gt;&lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/span&gt;&lt;span class="crayon-o" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;=&lt;/span&gt;&lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/span&gt;&lt;span class="crayon-s" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,128,0)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;'Cancelled'&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;,&lt;/span&gt;&lt;span class="crayon-cn" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(206,0,0)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;1&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;,&lt;/span&gt;&lt;span class="crayon-cn" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(206,0,0)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;0&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;)&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;)&lt;/span&gt;&lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/span&gt;&lt;span class="crayon-st" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(128,0,128)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;AS&lt;/span&gt;&lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/span&gt;&lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;Cancelled&lt;/span&gt;&lt;/div&gt; &lt;div class="crayon-line" id="crayon-55dc5b665e029963846117-3" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;vertical-align:baseline"&gt; &lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;FROM &lt;/span&gt;&lt;span class="crayon-v" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,45,122)!important;font-family:inherit;font-size:inherit !important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;orders&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;;&lt;/span&gt;&lt;/div&gt; &lt;/div&gt; &lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;/div&gt; &lt;/div&gt; &lt;div style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border:none;box-sizing:border-box;color:#2b2b2b;font-family:'Open Sans','Trebuchet MS',sans-serif;font-size:17px;line-height:28.8999996185303px;margin-bottom:2rem;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;a target="_blank" href="http://remotemysqlhosting.com/wp-content/uploads/2014/10/MySQL-SUM-IF.png" style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border-bottom-color:rgb(0,0,0);border-bottom-width:1px;border-style:none none dotted;box-sizing:border-box;color:#06400d;cursor:pointer;margin:0px;outline:0px;padding:0px;text-decoration:none;vertical-align:baseline"&gt;&lt;img alt="MySQL-SUM-IF" class="alignnone size-full wp-image-172" height="43" src="http://remotemysqlhosting.com/wp-content/uploads/2014/10/MySQL-SUM-IF.png" style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border:none;box-sizing:border-box;clear:both;display:block;height:auto;margin:0px;max-width:100%;outline:0px;padding:0px;vertical-align:baseline" width="176"&gt;&lt;/a&gt;&lt;/div&gt; &lt;div style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border:none;box-sizing:border-box;color:#2b2b2b;font-family:'Open Sans','Trebuchet MS',sans-serif;font-size:17px;line-height:28.8999996185303px;margin-bottom:2rem;outline:0px;padding:0px;text-align:justify;vertical-align:baseline"&gt; Dalam pertanyaan diatas, jika urutan status&amp;nbsp;&lt;em style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border:none;box-sizing:border-box;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;Shipped&lt;/em&gt;&amp;nbsp;atau&amp;nbsp;&lt;em style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border:none;box-sizing:border-box;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;Cacelled&lt;/em&gt;,&amp;nbsp;&lt;em style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border:none;box-sizing:border-box;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;IF Function&lt;/em&gt;&amp;nbsp;akan mengembalikan pada nilai 1 jika tidak maka kembali ke nilai 0.&amp;nbsp;&lt;em style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border:none;box-sizing:border-box;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;SUM function&lt;/em&gt;&amp;nbsp;akan&amp;nbsp;menghitung jumlah yang dikirimkan dan yang dibatalkan berdasarkan perintah nilai kembali dari&amp;nbsp;&lt;em style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border:none;box-sizing:border-box;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;IF function&lt;/em&gt;.&lt;/div&gt; &lt;div style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border:none;box-sizing:border-box;color:#2b2b2b;font-family:'Open Sans','Trebuchet MS',sans-serif;font-size:17px;line-height:28.8999996185303px;margin-bottom:2rem;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;span style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border:none;box-sizing:border-box;font-weight:700;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;Cara Menggabungkan IF Function dengan COUNT Function&lt;/span&gt;&lt;/div&gt; &lt;div style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border:none;box-sizing:border-box;color:#2b2b2b;font-family:'Open Sans','Trebuchet MS',sans-serif;font-size:17px;line-height:28.8999996185303px;margin-bottom:2rem;outline:0px;padding:0px;vertical-align:baseline"&gt; Pertama, kita pilih status semua pesanan dalam tabel&amp;nbsp;&lt;em style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border:none;box-sizing:border-box;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;order&lt;/em&gt;&amp;nbsp;dengan menggunakan query berikut:&lt;/div&gt; &lt;div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-55dc5b665e02d179514376" style="background:rgb(253,253,253)!important;border:1px solid rgb(153,153,153)!important;box-sizing:border-box;color:#2b2b2b;direction:ltr!important;font-family:Monaco,MonacoRegular,'Courier New',monospace;font-size:12px!important;height:auto;line-height:15px!important;margin:12px 0px;outline:0px;overflow:hidden!important;padding:0px;position:relative !important;text-shadow:none!important;vertical-align:baseline;width:546.640625px"&gt; &lt;div class="crayon-plain-wrap" style="background:0px 50%;border:0px;box-sizing:border-box;height:auto!important;margin:0px!important;outline:0px;padding:0px!important;vertical-align:baseline"&gt; &lt;textarea class="crayon-plain print-no" data-settings="dblclick" readonly style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:initial;background-repeat:initial;background-size:initial;border-radius:0px;border:0px;box-shadow:none;color:black;display:block;font-family:Monaco, MonacoRegular,'Courier New',monospace!important;font-size:12px!important;font-stretch:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;height:45px;line-height:15px!important;margin:0px;max-width:100%;opacity:0;overflow:hidden;padding-left:5px;padding-right:5px;padding-top:0px;position:absolute;resize:none;tab-size:4;white-space:pre;width:544.640625px;word-wrap:normal;z-index:0" wrap="soft"&gt;&lt;/textarea&gt;&lt;/div&gt; &lt;div class="crayon-main" style="background:0px 50%;border:0px;box-sizing:border-box;margin:0px;outline:0px;overflow:hidden;padding:0px;position:relative;vertical-align:baseline;width:544.640625px;z-index:1"&gt; &lt;table class="crayon-table" style="background:none!important;border-collapse:collapse!important;border-spacing:0px!important;border:none!important;box-sizing:border-box;font-size:12px;line-height:1.8em;margin-bottom:0px!important;margin-left:0px;margin-right:0px!important;margin-top:0px!important;outline:0px;padding:0px !important;vertical-align:baseline;width:auto!important"&gt;&lt;tbody style="background:0px 0px;border:none;box-sizing:border-box;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;tr class="crayon-row" style="background:0px 50%;border:none!important;box-sizing:border-box;margin:0px!important;outline:0px;padding:0px!important;vertical-align:top!important"&gt;&lt;td class="crayon-nums" data-settings="show" style="background:rgb(223,239,255)!important;border:0px;box-sizing:border-box;color:rgb(84, 153,222)!important;margin:0px!important;outline:0px;padding:0px!important;vertical-align:top!important"&gt;&lt;div class="crayon-nums-content" style="background:0px 50%;border:0px;box-sizing:border-box;line-height:15px!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline;white-space:nowrap"&gt; &lt;div class="crayon-num" data-line="crayon-55dc5b665e02d179514376-1" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit !important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;text-align:center;vertical-align:baseline"&gt; 1&lt;/div&gt; &lt;div class="crayon-num crayon-striped-num" data-line="crayon-55dc5b665e02d179514376-2" style="background:rgb(200,225,250)!important;border:0px;box-sizing:border-box;color:rgb(49,124,197)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit !important;margin:0px;outline:0px;padding:0px 5px;text-align:center;vertical-align:baseline"&gt; 2&lt;/div&gt; &lt;div class="crayon-num" data-line="crayon-55dc5b665e02d179514376-3" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;text-align:center;vertical-align:baseline"&gt; 3&lt;/div&gt; &lt;/div&gt; &lt;/td&gt;&lt;td class="crayon-code" style="background:0px 50%;border:0px;box-sizing:border-box;margin:0px!important;outline:0px;padding:0px!important;vertical-align:top!important;width:527px"&gt;&lt;div class="crayon-pre" style="background:none!important;border:none!important;box-sizing:border-box;line-height:15px!important;margin:0px;outline:0px;overflow:visible;padding:0px;tab-size:4;vertical-align:baseline;white-space:pre"&gt; &lt;div class="crayon-line" id="crayon-55dc5b665e02d179514376-1" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;vertical-align:baseline"&gt; &lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit !important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;SELECT &lt;/span&gt;&lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;DISTINCT &lt;/span&gt;&lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;status&lt;/span&gt;&lt;/div&gt; &lt;div class="crayon-line crayon-striped-line" id="crayon-55dc5b665e02d179514376-2" style="background:rgb(247,247,247)!important;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit !important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;vertical-align:baseline"&gt; &lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;FROM &lt;/span&gt;&lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;orders&lt;/span&gt;&lt;/div&gt; &lt;div class="crayon-line" id="crayon-55dc5b665e02d179514376-3" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit !important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;vertical-align:baseline"&gt; &lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;ORDER &lt;/span&gt;&lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;BY &lt;/span&gt;&lt;span class="crayon-v" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,45,122)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;status&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;;&lt;/span&gt;&lt;/div&gt; &lt;/div&gt; &lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;/div&gt; &lt;/div&gt; &lt;div style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border:none;box-sizing:border-box;color:#2b2b2b;font-family:'Open Sans','Trebuchet MS',sans-serif;font-size:17px;line-height:28.8999996185303px;margin-bottom:2rem;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/div&gt; &lt;div style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border:none;box-sizing:border-box;color:#2b2b2b;font-family:'Open Sans','Trebuchet MS',sans-serif;font-size:17px;line-height:28.8999996185303px;margin-bottom:2rem;outline:0px;padding:0px;text-align:justify;vertical-align:baseline"&gt; &lt;a target="_blank" href="http://remotemysqlhosting.com/wp-content/uploads/2014/10/Order-Status.png" style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border-bottom-color:rgb(0,0,0);border-bottom-width:1px;border-style:none none dotted;box-sizing:border-box;color:#06400d;cursor:pointer;margin:0px;outline:0px;padding:0px;text-decoration:none;vertical-align:baseline"&gt;&lt;img alt="Order-Status" class="alignnone size-full wp-image-169" height="154" src="http://remotemysqlhosting.com/wp-content/uploads/2014/10/Order-Status.png" style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border:none;box-sizing:border-box;clear:both;display:block;height:auto;margin:0px;max-width:100%;outline:0px;padding:0px;vertical-align:baseline" width="84"&gt;&lt;/a&gt;&lt;br&gt; Kedua, kita bisa mendapatkan jumlah pesanan di setiap status dengan menggabungkan IF function dengan COUNT function. Karena COUNT function tidak dihitung&amp;nbsp;untuk nilai NULL.&lt;/div&gt; &lt;div style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border:none;box-sizing:border-box;color:#2b2b2b;font-family:'Open Sans','Trebuchet MS',sans-serif;font-size:17px;line-height:28.8999996185303px;margin-bottom:2rem;outline:0px;padding:0px;vertical-align:baseline"&gt; Lihat query berikut:&lt;/div&gt; &lt;div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-55dc5b665e032047594887" style="background:rgb(253,253,253)!important;border:1px solid rgb(153,153,153)!important;box-sizing:border-box;color:#2b2b2b;direction:ltr !important;font-family:Monaco,MonacoRegular,'Courier New',monospace;font-size:12px!important;height:auto;line-height:15px!important;margin:12px 0px;outline:0px;overflow:hidden!important;padding:0px;position:relative!important;text-shadow:none!important;vertical-align:baseline;width:546.640625px"&gt; &lt;div class="crayon-plain-wrap" style="background:0px 50%;border:0px;box-sizing:border-box;height:auto!important;margin:0px!important;outline:0px;padding:0px!important;vertical-align:baseline"&gt; &lt;textarea class="crayon-plain print-no" data-settings="dblclick" readonly style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:initial;background-repeat:initial;background-size:initial;border-radius:0px;border:0px;box-shadow:none;color:black;display:block;font-family:Monaco,MonacoRegular,'Courier New',monospace!important;font-size:12px!important;font-stretch:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;height:105px;line-height:15px !important;margin:0px;max-width:100%;opacity:0;overflow:hidden;padding-left:5px;padding-right:5px;padding-top:0px;position:absolute;resize:none;tab-size:4;white-space:pre;width:544.640625px;word-wrap:normal;z-index:0" wrap="soft"&gt;&lt;/textarea&gt;&lt;/div&gt; &lt;div class="crayon-main" style="background:0px 50%;border:0px;box-sizing:border-box;margin:0px;outline:0px;overflow:hidden;padding:0px;position:relative;vertical-align:baseline;width:544.640625px;z-index:1"&gt; &lt;table class="crayon-table" style="background:none!important;border-collapse:collapse!important;border-spacing:0px!important;border:none!important;box-sizing:border-box;font-size:12px;line-height:1.8em;margin-bottom:0px!important;margin-left:0px;margin-right:0px!important;margin-top:0px!important;outline:0px;padding:0px!important;vertical-align:baseline;width:auto!important"&gt;&lt;tbody style="background:0px 0px;border:none;box-sizing:border-box;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;tr class="crayon-row" style="background:0px 50%;border:none!important;box-sizing:border-box;margin:0px!important;outline:0px;padding:0px!important;vertical-align:top!important"&gt;&lt;td class="crayon-nums" data-settings="show" style="background:rgb(223,239,255)!important;border:0px;box-sizing:border-box;color:rgb(84,153,222)!important;margin:0px!important;outline:0px;padding:0px!important;vertical-align:top!important"&gt;&lt;div class="crayon-nums-content" style="background:0px 50%;border:0px;box-sizing:border-box;line-height:15px!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline;white-space:nowrap"&gt; &lt;div class="crayon-num" data-line="crayon-55dc5b665e032047594887-1" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;text-align:center;vertical-align:baseline"&gt; 1&lt;/div&gt; &lt;div class="crayon-num crayon-striped-num" data-line="crayon-55dc5b665e032047594887-2" style="background:rgb(200,225,250)!important;border:0px;box-sizing:border-box;color:rgb(49,124,197)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;text-align:center;vertical-align:baseline"&gt; 2&lt;/div&gt; &lt;div class="crayon-num" data-line="crayon-55dc5b665e032047594887-3" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;text-align:center;vertical-align:baseline"&gt; 3&lt;/div&gt; &lt;div class="crayon-num crayon-striped-num" data-line="crayon-55dc5b665e032047594887-4" style="background:rgb(200,225,250)!important;border:0px;box-sizing:border-box;color:rgb(49, 124,197)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;text-align:center;vertical-align:baseline"&gt; 4&lt;/div&gt; &lt;div class="crayon-num" data-line="crayon-55dc5b665e032047594887-5" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit !important;margin:0px;outline:0px;padding:0px 5px;text-align:center;vertical-align:baseline"&gt; 5&lt;/div&gt; &lt;div class="crayon-num crayon-striped-num" data-line="crayon-55dc5b665e032047594887-6" style="background:rgb(200,225,250)!important;border:0px;box-sizing:border-box;color:rgb(49,124,197)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;text-align:center;vertical-align:baseline"&gt; 6&lt;/div&gt; &lt;div class="crayon-num" data-line="crayon-55dc5b665e032047594887-7" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;text-align:center;vertical-align:baseline"&gt; 7&lt;/div&gt; &lt;/div&gt; &lt;/td&gt;&lt;td class="crayon-code" style="background:0px 50%;border:0px;box-sizing:border-box;margin:0px !important;outline:0px;padding:0px!important;vertical-align:top!important;width:527px"&gt;&lt;div class="crayon-pre" style="background:none!important;border:none!important;box-sizing:border-box;line-height:15px!important;margin:0px;outline:0px;overflow:visible;padding:0px;tab-size:4;vertical-align:baseline;white-space:pre"&gt; &lt;div class="crayon-line" id="crayon-55dc5b665e032047594887-1" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit !important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;vertical-align:baseline"&gt; &lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;SELECT &lt;/span&gt;&lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;COUNT&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;(&lt;/span&gt;&lt;span class="crayon-st" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(128,0,128)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;IF&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;(&lt;/span&gt;&lt;span class="crayon-v" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,45,122)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;status&lt;/span&gt;&lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/span&gt;&lt;span class="crayon-o" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;=&lt;/span&gt;&lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/span&gt;&lt;span class="crayon-s" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,128,0)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;'Cancelled'&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;,&lt;/span&gt;&lt;span class="crayon-cn" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(206,0,0)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;1&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;,&lt;/span&gt;&lt;span class="crayon-t" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(128,0,128)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;NULL&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;)&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;)&lt;/span&gt;&lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="crayon-v" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,45,122)!important;font-family:inherit;font-size:inherit !important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;Cancelled&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;,&lt;/span&gt;&lt;/div&gt; &lt;div class="crayon-line crayon-striped-line" id="crayon-55dc5b665e032047594887-2" style="background:rgb(247,247,247)!important;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;vertical-align:baseline"&gt; &lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit !important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit !important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;COUNT&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;(&lt;/span&gt;&lt;span class="crayon-st" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(128, 0,128)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;IF&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;(&lt;/span&gt;&lt;span class="crayon-v" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,45,122)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;status&lt;/span&gt;&lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/span&gt;&lt;span class="crayon-o" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;=&lt;/span&gt;&lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/span&gt;&lt;span class="crayon-s" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,128,0)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;'Disputed'&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;,&lt;/span&gt;&lt;span class="crayon-cn" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(206,0,0)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;1&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;,&lt;/span&gt;&lt;span class="crayon-t" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(128,0,128)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;NULL&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;)&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;)&lt;/span&gt;&lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/span&gt;&lt;span class="crayon-v" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,45,122)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;Disputed&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;,&lt;/span&gt;&lt;/div&gt; &lt;div class="crayon-line" id="crayon-55dc5b665e032047594887-3" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;vertical-align:baseline"&gt; &lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0, 78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;COUNT&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;(&lt;/span&gt;&lt;span class="crayon-st" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(128,0,128)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;IF&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;(&lt;/span&gt;&lt;span class="crayon-v" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,45,122)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;status&lt;/span&gt;&lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/span&gt;&lt;span class="crayon-o" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;=&lt;/span&gt;&lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/span&gt;&lt;span class="crayon-s" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,128,0)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;'In Process'&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;,&lt;/span&gt;&lt;span class="crayon-cn" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(206,0,0)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;1&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;,&lt;/span&gt;&lt;span class="crayon-t" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(128,0,128)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;NULL&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;)&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;)&lt;/span&gt;&lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/span&gt;&lt;span class="crayon-s" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,128,0)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;'In Process'&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;,&lt;/span&gt;&lt;/div&gt; &lt;div class="crayon-line crayon-striped-line" id="crayon-55dc5b665e032047594887-4" style="background:rgb(247,247,247)!important;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit !important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;vertical-align:baseline"&gt; &lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;COUNT&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit !important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;(&lt;/span&gt;&lt;span class="crayon-st" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(128,0,128)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;IF&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;(&lt;/span&gt;&lt;span class="crayon-v" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,45,122)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;status&lt;/span&gt;&lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/span&gt;&lt;span class="crayon-o" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;=&lt;/span&gt;&lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/span&gt;&lt;span class="crayon-s" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,128,0)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;'On Hold'&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;,&lt;/span&gt;&lt;span class="crayon-cn" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(206,0,0)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;1&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;,&lt;/span&gt;&lt;span class="crayon-t" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(128,0,128)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;NULL&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;)&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;)&lt;/span&gt;&lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/span&gt;&lt;span class="crayon-s" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,128,0)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;'On Hold'&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;,&lt;/span&gt;&lt;/div&gt; &lt;div class="crayon-line" id="crayon-55dc5b665e032047594887-5" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;vertical-align:baseline"&gt; &lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;COUNT&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;(&lt;/span&gt;&lt;span class="crayon-st" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(128,0,128)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;IF&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;(&lt;/span&gt;&lt;span class="crayon-v" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,45,122)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;status&lt;/span&gt;&lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/span&gt;&lt;span class="crayon-o" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;=&lt;/span&gt;&lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/span&gt;&lt;span class="crayon-s" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,128,0)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;'Resolved'&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;,&lt;/span&gt;&lt;span class="crayon-cn" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(206,0,0)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;1&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;,&lt;/span&gt;&lt;span class="crayon-t" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(128,0,128)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;NULL&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;)&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;)&lt;/span&gt;&lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/span&gt;&lt;span class="crayon-s" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,128,0)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;'Resolved'&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;,&lt;/span&gt;&lt;/div&gt; &lt;div class="crayon-line crayon-striped-line" id="crayon-55dc5b665e032047594887-6" style="background:rgb(247,247,247)!important;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;vertical-align:baseline"&gt; &lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0, 78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;COUNT&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;(&lt;/span&gt;&lt;span class="crayon-st" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(128,0,128)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;IF&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;(&lt;/span&gt;&lt;span class="crayon-v" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,45,122)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;status&lt;/span&gt;&lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/span&gt;&lt;span class="crayon-o" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;=&lt;/span&gt;&lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/span&gt;&lt;span class="crayon-s" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,128,0)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;'Shipped'&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;,&lt;/span&gt;&lt;span class="crayon-cn" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(206,0,0)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;1&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;,&lt;/span&gt;&lt;span class="crayon-t" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(128,0,128)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;NULL&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;)&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;)&lt;/span&gt;&lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/span&gt;&lt;span class="crayon-s" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,128,0)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;'Shipped'&lt;/span&gt;&lt;/div&gt; &lt;div class="crayon-line" id="crayon-55dc5b665e032047594887-7" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;vertical-align:baseline"&gt; &lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;FROM &lt;/span&gt;&lt;span class="crayon-v" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,45,122)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;orders&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;;&lt;/span&gt;&lt;/div&gt; &lt;/div&gt; &lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;/div&gt; &lt;/div&gt; &lt;div style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border:none;box-sizing:border-box;color:#2b2b2b;font-family:'Open Sans','Trebuchet MS',sans-serif;font-size:17px;line-height:28.8999996185303px;margin-bottom:2rem;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;a target="_blank" href="http://remotemysqlhosting.com/wp-content/uploads/2014/10/MySQL-COUNT-IF-all-order-status.png" style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border-bottom-color:rgb(0,0,0);border-bottom-width:1px;border-style:none none dotted;box-sizing:border-box;color:#06400d;cursor:pointer;margin:0px;outline:0px;padding:0px;text-decoration:none;vertical-align:baseline"&gt;&lt;img alt="MySQL-COUNT-IF-all-order-status" class="alignnone size-full wp-image-170" height="44" src="http://remotemysqlhosting.com/wp-content/uploads/2014/10/MySQL-COUNT-IF-all-order-status.png" style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:0px 0px;background-repeat:initial;background-size:initial;border:none;box-sizing:border-box;clear:both;display:block;height:auto;margin:0px;max-width:100%;outline:0px;padding:0px;vertical-align:baseline" width="479"&gt;&lt;/a&gt;&lt;br&gt; Anda dapat mencapai hasil yang serupa dengan menggunakan klausa GROUP BY dan COUNT function tanpa menggunakan IF function&amp;nbsp;sebagai query, berikut ini cara penulisannya:&lt;/div&gt; &lt;div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-55dc5b665e036339157286" style="background:rgb(253,253,253)!important;border:1px solid rgb(153,153,153)!important;box-sizing:border-box;color:#2b2b2b;direction:ltr!important;font-family:Monaco,MonacoRegular,'Courier New',monospace;font-size:12px!important;height:auto;line-height:15px!important;margin:12px 0px;outline:0px;overflow:hidden!important;padding:0px;position:relative!important;text-shadow:none!important;vertical-align:baseline;width:546.640625px"&gt; &lt;div class="crayon-plain-wrap" style="background:0px 50%;border:0px;box-sizing:border-box;height:auto !important;margin:0px!important;outline:0px;padding:0px!important;vertical-align:baseline"&gt; &lt;textarea class="crayon-plain print-no" data-settings="dblclick" readonly style="background-attachment:initial;background-clip:initial;background-image:initial;background-origin:initial;background-position:initial;background-repeat:initial;background-size:initial;border-radius:0px;border:0px;box-shadow:none;color:black;display:block;font-family:Monaco,MonacoRegular,'Courier New',monospace !important;font-size:12px!important;font-stretch:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;height:45px;line-height:15px!important;margin:0px;max-width:100%;opacity:0;overflow:hidden;padding-left:5px;padding-right:5px;padding-top:0px;position:absolute;resize:none;tab-size:4;white-space:pre;width:544.640625px;word-wrap:normal;z-index:0" wrap="soft"&gt;&lt;/textarea&gt;&lt;/div&gt; &lt;div class="crayon-main" style="background:0px 50%;border:0px;box-sizing:border-box;margin:0px;outline:0px;overflow:hidden;padding:0px;position:relative;vertical-align:baseline;width:544.640625px;z-index:1"&gt; &lt;table class="crayon-table" style="background:none!important;border-collapse:collapse!important;border-spacing:0px!important;border:none!important;box-sizing:border-box;font-size:12px;line-height:1.8em;margin-bottom:0px!important;margin-left:0px;margin-right:0px!important;margin-top:0px!important;outline:0px;padding:0px!important;vertical-align:baseline;width:auto!important"&gt;&lt;tbody style="background:0px 0px;border:none;box-sizing:border-box;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;tr class="crayon-row" style="background:0px 50%;border:none!important;box-sizing:border-box;margin:0px!important;outline:0px;padding:0px!important;vertical-align:top!important"&gt;&lt;td class="crayon-nums" data-settings="show" style="background:rgb(223,239,255)!important;border:0px;box-sizing:border-box;color:rgb(84,153,222)!important;margin:0px!important;outline:0px;padding:0px!important;vertical-align:top!important"&gt;&lt;div class="crayon-nums-content" style="background:0px 50%;border:0px;box-sizing:border-box;line-height:15px!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline;white-space:nowrap"&gt; &lt;div class="crayon-num" data-line="crayon-55dc5b665e036339157286-1" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;text-align:center;vertical-align:baseline"&gt; 1&lt;/div&gt; &lt;div class="crayon-num crayon-striped-num" data-line="crayon-55dc5b665e036339157286-2" style="background:rgb(200,225,250)!important;border:0px;box-sizing:border-box;color:rgb(49,124,197)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;text-align:center;vertical-align:baseline"&gt; 2&lt;/div&gt; &lt;div class="crayon-num" data-line="crayon-55dc5b665e036339157286-3" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;text-align:center;vertical-align:baseline"&gt; 3&lt;/div&gt; &lt;/div&gt; &lt;/td&gt;&lt;td class="crayon-code" style="background:0px 50%;border:0px;box-sizing:border-box;margin:0px!important;outline:0px;padding:0px !important;vertical-align:top!important;width:527px"&gt;&lt;div class="crayon-pre" style="background:none!important;border:none!important;box-sizing:border-box;line-height:15px!important;margin:0px;outline:0px;overflow:visible;padding:0px;tab-size:4;vertical-align:baseline;white-space:pre"&gt; &lt;div class="crayon-line" id="crayon-55dc5b665e036339157286-1" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;vertical-align:baseline"&gt; &lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;SELECT &lt;/span&gt;&lt;span class="crayon-v" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,45,122)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;status&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;,&lt;/span&gt;&lt;span class="crayon-h" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,111,224)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/span&gt;&lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;COUNT&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;(&lt;/span&gt;&lt;span class="crayon-v" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,45,122)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;STATUS&lt;/span&gt;&lt;span class="crayon-sy" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(51,51,51)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;)&lt;/span&gt;&lt;/div&gt; &lt;div class="crayon-line crayon-striped-line" id="crayon-55dc5b665e036339157286-2" style="background:rgb(247,247,247)!important;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit !important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;vertical-align:baseline"&gt; &lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;FROM &lt;/span&gt;&lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;orders&lt;/span&gt;&lt;/div&gt; &lt;div class="crayon-line" id="crayon-55dc5b665e036339157286-3" style="background:0px 50%;border:0px;box-sizing:border-box;font-family:inherit;font-size:inherit !important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px 5px;vertical-align:baseline"&gt; &lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;GROUP &lt;/span&gt;&lt;span class="crayon-e" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,78,208)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit!important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;BY &lt;/span&gt;&lt;span class="crayon-v" style="background:0px 0px;border:none;box-sizing:border-box;color:rgb(0,45,122)!important;font-family:inherit;font-size:inherit!important;font-weight:inherit !important;height:inherit;line-height:inherit!important;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt;status&lt;/span&gt;&lt;/div&gt; &lt;/div&gt; &lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-55dc5b665e036339157286" style="background:rgb(253,253,253)!important;border:1px solid rgb(153,153,153)!important;box-sizing:border-box;color:#2b2b2b;direction:ltr!important;font-family:Monaco,MonacoRegular,'Courier New',monospace;font-size:12px!important;height:auto;line-height:15px!important;margin:12px 0px;outline:0px;overflow:hidden!important;padding:0px;position:relative!important;text-shadow:none!important;vertical-align:baseline;width:546.640625px"&gt; &lt;div class="crayon-main" style="background:0px 50%;border:0px;box-sizing:border-box;margin:0px;outline:0px;overflow:hidden;padding:0px;position:relative;vertical-align:baseline;width:544.640625px;z-index:1"&gt; &lt;table class="crayon-table" style="background:none!important;border-collapse:collapse!important;border-spacing:0px!important;border:none!important;box-sizing:border-box;font-size:12px;line-height:1.8em;margin-bottom:0px!important;margin-left:0px;margin-right:0px!important;margin-top:0px !important;outline:0px;padding:0px!important;vertical-align:baseline;width:auto!important"&gt;&lt;tbody style="background:0px 0px;border:none;box-sizing:border-box;margin:0px;outline:0px;padding:0px;vertical-align:baseline"&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;/div&gt; &lt;div class="crayon-main" style="background:0px 50%;border:0px;box-sizing:border-box;margin:0px;outline:0px;overflow:hidden;padding:0px;position:relative;vertical-align:baseline;width:544.640625px;z-index:1"&gt; &lt;br&gt;&lt;/div&gt; &lt;/div&gt; Sumber:http://remotemysqlhosting.com/tutorial-mysql-tingkat-lanjut/apakah-mysql-if-function-dan-cara-menggunakan.html &lt;div style="clear:both"&gt;&lt;/div&gt; &lt;/div&gt; &lt;div class="social-buttons-box"&gt; &lt;div class="social-buttons"&gt; &lt;div class="share gplus"&gt;&lt;div class="g-plusone" data-href="http://dedymanado.blogspot.com/2015/08/cara-menggunakan-mysql-if-function.html" data-size="tall"&gt;&lt;/div&gt;&lt;/div&gt; &lt;div class="share like"&gt;&lt;div class="fb-like" data-action="like" data-href="http://dedymanado.blogspot.com/2015/08/cara-menggunakan-mysql-if-function.html" data-layout="box_count" data-share="false" data-show-faces="false"&gt;&lt;/div&gt;&lt;/div&gt; &lt;div class="share tweet"&gt;&lt;a target="_blank" class="twitter-share-button" data-count="vertical" data-lang="en" data-size="normal" data-url="http://dedymanado.blogspot.com/2015/08/cara-menggunakan-mysql-if-function.html" href="https://twitter.com/share"&gt;Tweet&lt;/a&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div style="clear:both"&gt;&lt;/div&gt; &lt;div class="berlangganan-box"&gt; &lt;form action="https://feedburner.google.com/fb/a/mailverify" method="post" onsubmit="window.open('https://feedburner.google.com/fb/a/mailverify?uri=DedyManado', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true" target="popupwindow"&gt; &lt;p&gt;Jangan sampai ketinggalan postingan-postingan terbaik dari Dedy Manado. Berlangganan melalui email sekarang juga:&lt;/p&gt;&lt;p&gt;&lt;input class="email-address" name="email" placeholder="Masukan alamat email..." type="text"&gt;&lt;/p&gt;&lt;input name="uri" type="hidden" value="DedyManado"&gt; &lt;input name="loc" type="hidden" value="en_US"&gt; &lt;p&gt;&lt;input class="submit-email" type="submit" value="Berlangganan"&gt;&lt;/p&gt; &lt;p&gt;Atau sobat juga bisa follow Dedy Manado dengan mengklik tombol di bawah ini:&lt;/p&gt; &lt;a href="http://www.blogger.com/follow-blog.g?blogID=1631707129461461525" rel="nofollow" target="_blank" title="Follow Blog Mas Sugeng"&gt;&lt;img alt="follow mas sugeng" src="http://1.bp.blogspot.com/-eFCTXIHqGak/VF2fPO3TgzI/AAAAAAAAD7E/-D_lYtMdxYg/s1600/follow.png" style="margin:0 auto"&gt;&lt;/a&gt; &lt;/form&gt; &lt;/div&gt; &lt;div id="related-post-desktop"&gt; &lt;h3&gt;Artikel keren lainnya:&lt;/h3&gt; &lt;script type="text/javascript"&gt; <script type="text/javascript"> removeRelatedDuplicates(); printRelatedLabels();

Penggunaan if else pada mysql
Ditulis oleh Dedy Saputra pada tanggal Tuesday, August 25, 2015