select transcode,sum(case when wssatus = '0000' then 1 else 0 end),sum(case when wssatus = '0000' and retnum > 0 then 1 else 0 end) from code_table where begintime > '2018-08-08' group by transcode.
sql用case when查询group
最新推荐文章于 2023-05-11 21:43:57 发布