2015-01-16 50 views

回答

0

這將這樣的伎倆:

SELECT id, Roll, GROUP_CONCAT(Rank), GROUP_CONCAT(Grade) 
FROM your_table 
GROUP BY Roll 
HAVING COUNT(*) > 1 
+0

非常感謝您的快速響應......它的功能非常棒...... :) –

0

試試這個:

SELECT A.id, A.Roll, 
     GROUP_CONCAT(A.Rank ORDER BY A.id) AS Rank, 
     GROUP_CONCAT(A.Grade ORDER BY A.id) AS Grade 
FROM test1 A 
GROUP BY A.Roll 
ORDER BY A.Roll;