查询一个表的不同数据,显示到一个表

select cyrdw as s,(select count(*) from caiyong where cylx = 'dantiao' and cyrdw = s),(select count(*) from caiyong where cylx = 'zonghe' and cyrdw = s),(select count(*) from caiyong where cylx = 'shendu' and cyrdw = s) from caiyong where time > '' and time < '' group by cyrdw order by desc

原文地址:https://www.cnblogs.com/loveMis/p/9253525.html