1¡¢SELECT Lession,MAX(Scroe) from TA GROUP BY Lession 2¡¢SELECT id,scroe,lession from TA ,(SELECT Lession,MAX(Scroe) as scroe from TA GROUP BY Lession) t1 WHERE TA.scroe = t1.scroe AND ta.lession = t1.lession
BTW£ºµ¥´Ê´íµÄҲ̫ÀëÆ×ÁË°É ²»ÊǺÜÄÑ°É SELECT Lession,MAX(Scroe) from TA GROUP BY Lession µÚÒ»ÎÊÓ㺰´Ìõ¼þ²éѯ£» µÚ¶þÎÊÓ㺰´Ö÷²éѯ£» ¸÷λ¸ßÊÖ,ÇëÎÊÒ»ÏÂ,Ôõôɾ³ý±íÖеÄÖظ´¼Ç¼? ÊÇɾ³ýÖظ´µÄËùÓÐÊý¾Ý»¹ÊÇֻɾÁôÏÂÒ»Ìõ,±ÈÈçÓÐÁ½ÌõһģһÑùµÄÊÇÕâÁ½Ìõ¶¼É¾»¹ÊÇֻɾ³ýÆäÖÐÒ»Ìõ? ÕâÁ½ÖÖÇé¿öÏ£Íû¶¼Ö¸µãÒ»ÏÂ,лÁË //---ÔõÑù²éѯ³öÒ»¸ö±íÖÐij¸ö×Ö¶ÎÖظ´µÄÁÐ select * from table where column in (select column from table group by column having count(*)>1) order by column; ÄãÖ»ÒªÉèÖ÷ûºÏÖ÷¼ü,¾Í²»»áÓÐÖظ´¼Ç¼!!! ÎÒҲѧϰѧϰ¡¢¡¢¡¢¡¢ ÓÑÇé°ï¶¥Ï£¡Ë³±