Você pode fazer assim:INSERT INTO table2 (MBID, artist) SELECT MBID, MAX(artist) FROM table1 GROUP BY MBID;