查询汇总的sql

select   list.listname, list.createtime,listcount from dream_list as list ,   (select listid,count(listid) as listcount  from dream_list_user  group by listid  order by count(listid) desc)  as table1  where list.sysid=table1.listid and listcount>2  order by list.createtime desc ; 

猜你喜欢

转载自baalwolf.iteye.com/blog/2167168
今日推荐