sum(case when type_id = 1 then 1 else 0 end) as '山水'
,sum(case when type_id = 2 then 1 else 0 end) as '风景'
,sum(case when type_id = 3 then 1 else 0 end) as '美女'
,sum(case when type_id = 4 then 1 else 0 end) as '卡通'
from a, b
where a.id = b.type_id
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)