34,575
社区成员
发帖
与我相关
我的任务
分享
SELECT * FROM(
select *,ROW_NUMBER()OVER(ORDER BY sUserCode)ROW FROM
(select *,row_number() over(partition by sUserCode order by dReadDateTime desc) rn
from tReadingDtl
where dReadDateTime between '" + lp.ReadDateTime + "' and '" + lp.ReadDateTime2 + "')t
where t.rn <=1
)a
left join b on a.sUserCode=b.sUserCode
left join c on a.sAreaNO = c.sAreaNO
WHERE a.ROW BETWEEN 1 AND 10
类似这样