Mysql
 sql >> Database >  >> RDS >> Mysql

Visualizzazione di numeri di riga duplicati

usa GROUP_CONCAT

SELECT  a.data, 
        a.rowNumber, 
        GROUP_CONCAT(b.rowNumber)
FROM    DuplicateRows AS a
        INNER JOIN DuplicateRows AS b 
            ON  a.data = b.dataAND a.Id != b.Id
GROUP BY a.data, a.rowNumber

Demo SQLFiddle