0
我創建了這樣的總結初始列的MySQL
"select count(if(gender="male",1,null)) as malecount,
count(if(gender="female",1,null)) as femalecount from biodata"
這是工作的查詢,而我想總結一下算這樣的:
"select count(if(gender="male",1,null)) as malecount,
count(if(gender="female",1,null)) as femalecount, male+female as sumgender
from biodata"
ofcourse該查詢將有助於當我做if語句中的條件很多
請幫我解決這種情況...