SELECT * from (SELECT ROW_NUMBER(order by strId) AS rownum,x.dtTime from TbRecord as x,TbD,TbB,TbType WHERE (x.strId=TbD.strId) and (x.strCode=TbD.strCode) and (TbD.strCode=TbB.strCode) and (NOT EXISTS(SELECT 1 AS Expr1 from TbRecord WHERE (strId = x.strId) AND (strCode = x.strCode) AND (dtTime>x.dtTime)))) AS T
SQL code: select * from( SELECT ROW_NUMBER() over(partition by x.strCode, x.strId order by x.dtTime desc) AS rownum ,x.dtTime from TbRecord as x,TbD,TbB,TbType WHERE (x.strId=TbD.strId) and (x.strCode=TbD.strCode) and (TbD.st
select count(1) from FX_RETURNBOOKCHECKLIST fxreturnbo0_ where fxreturnbo0_.BOOKID='164 ' AND fxreturnbo0_.RETURNID='00025.S0000001' ÉÏÃæÒ»¸ö¼òµ¥µÄSQL,Ö´ÐÐʱ¼ä2.6à ......