我想在sql查询中获得164条记录,但我获得了90,000条记录
我的MySql查询提供正确的输出
SELECT distinct(sourceadd),
starttime,
destadd,
calltype,
bw,
adjustdur
FROM cma
where starttime between '2011/07/01' and '2014/07/02'
and calltype = 'ad hoc'
group by sourceadd
order by sourceadd asc;
我的M $ Sql查询提供了更多错误的记录
Select * from
(SELECT distinct(sourceadd),
starttime,
destadd,
calltype,
bw,
adjustdur,
ROW_NUMBER()over(order by sourceadd) as row
FROM cma
WHERE starttime between '2011/07/01' and '2014/07/02'
and calltype= 'ad hoc') cma
where cma.row > 0
and cma.row <= 100000