select orderId, count(case paid when 'N' then 1 end) from orderitem
use case to filter data
refer: https://stackoverflow.com/questions/1400078/is-it-possible-to-specify-condition-in-count
全站熱搜
select orderId, count(case paid when 'N' then 1 end) from orderitem
use case to filter data
refer: https://stackoverflow.com/questions/1400078/is-it-possible-to-specify-condition-in-count
留言列表