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 phonetimes > 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
OR select phone,COUNT(*) from kxw_src_counts where time like '%2008-03-24%' and phone <> '' group by phone having count(*)>2
select phone,COUNT(*) from kxw_src_counts where time like '%2008-03-24%' and phone <> ''
group by phone having count(*)>2