SELECT a.orderNum AS NRankingNum FROM (SELECT (@i:=@i+1) AS orderNum, pkCode,fkUser,fkSchool,sUserName,nScore FROM `TbPhysicalTestReport` , (SELECT @i:=0) AS i WHERE fkSchool='0001' AND sSemester = '上学期' AND DATE_FORMAT(tCreate,'%Y') = '2022' ORDER BY nScore DESC) a WHERE a.fkUser = '0Z6H';
网友评论