Created
July 11, 2019 13:42
-
-
Save mayhem/9a2a6c964d53ac977d47bd11e8a8c912 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT DISTINCT r.gid as recording_mbid, r.name as recording_name, ac.name as artist_credit_name, array_agg(a.gid) as artist_mbids | |
INTO recording_artist_credit_pairs | |
FROM recording r | |
JOIN artist_credit ac ON r.artist_credit = ac.id | |
JOIN artist_credit_name acn ON ac.id = acn.artist_credit | |
JOIN artist a ON acn.artist = a.id | |
GROUP BY r.gid, r.name, ac.name | |
ORDER BY r.name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment