SQL query to get members of a group

Hi,

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’

1 Like

You need to look for the specific member relationship: Relationship Type / Member of band - MusicBrainz

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

2 Likes

So, how you solved your problem ? Share pls…

Hello. I need to get all members of each group.
I have got data from artist, what relations I have to do to get all group members for example Metallica ?

Hope the question is clear