terima kasih atas bantuannya, sudah bisa jalan tuch
2008/2/11, Celes Victoria <[EMAIL PROTECTED]>: > > select a.merk,a.`type`,ifnull(good,0)good,ifnull(bad,0)bad > ,(ifnull(good,0) + ifnull(bad,0))total > from (select distinct merk,`type` from tbl_a order by merk,`type`)a > left join (select merk,`type`,count(*)good from tbl_a where status=0 group > by merk,`type`) b_good on b_good.merk = a.merk and b_good.type = a.type > left join (select merk,`type`,count(*)bad from tbl_a where status=1 group > by merk,`type`) b_bad on b_bad.merk = a.merk and b_bad.type = a.type > > __________________________________________________________ > Yahoo! Singapore Answers > Real people. Real questions. Real answers. Share what you know at > http://answers.yahoo.com.sg > > [Non-text portions of this message have been removed] > > > [Non-text portions of this message have been removed]
