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

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

posted @ 2018-07-02 14:03  杨不凡  阅读(134)  评论(0编辑  收藏  举报