mysql分類統計cash when then

SELECT name as '小區名稱', sum(case when location='inner' then 1 else 0 end) AS '小區內', sum(case when location='door' then 1 else 0 end) AS '小區門口', sum(case when location='street' then 1 else 0 end) AS '街道
相關文章
相關標籤/搜索