日期:2014-05-16  浏览次数:20729 次

看句sql,count以后加条件
select count(*) as times, phone from (select phone from kxw_src_counts where time like '%2008-03-24%' and phone <> '' group by phone) T where times > 2 group by phone

times > 2 那里有错,说找不到这列...怎么改一下?

------解决方案--------------------
select count(*) as times, phone from (select phone from kxw_src_counts where time like '%2008-03-24%' and phone <> '' group by phone) T group by phone having count(*)>2