hitomitanaka 的語法for mysql 是正確的; 另一語法 select name,sum(case WHEN cond=0 then col1 else 0 end) ...
ithelp.ithome.com.tw