SQL query to get members of a group

Tags: #<Tag:0x00007ff3b7c7f1e8> #<Tag:0x00007ff3b7c7f080>



I am trying to get just the members of a group using an SQL query. I managed to link via the foreign keys entity0 and entity1 of l_artist_artist, however I am getting all relationships. How can I get just the band members pls?

SELECT a.name,c.name from l_artist_artist
JOIN artist a ON l_artist_artist.entity0=a.id
JOIN artist c ON l_artist_artist.entity1=c.id
where c.name = ‘The Beatles’


You need to look for the specific member relationship: https://musicbrainz.org/relationship/5be4c609-9afa-4ea0-910b-12ffb71e3821

So, link_type GUID 5be4c609-9afa-4ea0-910b-12ffb71e3821 or ID 103 :slight_smile: