Oracle
 sql >> Datenbank >  >> RDS >> Oracle

SQL:Wie findet man Duplikate basierend auf zwei Feldern?

SELECT  *
FROM    (
        SELECT  t.*, ROW_NUMBER() OVER (PARTITION BY station_id, obs_year ORDER BY entity_id) AS rn
        FROM    mytable t
        )
WHERE   rn > 1