日期:2014-05-17  浏览次数:20959 次

怎样根据统计结果再进行筛选?
我用select   name,count(*)   from   txl   group   by   name得到统计结果
我要将结果加在下面的筛选中
用select   *   from   txl,student   where   txt.name= ' '   and   student.sx= ' '
如何实现?

------解决方案--------------------
把筛选条件放到统计SQL中试一下
例如
select txl.name,txl.count(*) from txl,student where txl.name= ' ' and student.sx=txl.name group by txl.name



------解决方案--------------------
select txl.name,//txl.count(*)//错了应该是count(txl.*)// from txl,student where txl.name= ' ' and student.sx=txl.name group by txl.name