gaaab
gaaab

Reputation: 36

Problem executing a query in PostgreSQL (Musicbrainz database)

We have to write a query of the Musicbrainz database (here you can see the scheme). The query is:

Find the releases where the artist name is different from the credited name in the release (the result must contain the release name, the credited artist name (i.e. artist_credit.name) and the artist name (i.e. artist.name )).

What I have tried is this:

select release.name, artist_credit.name, artist.name 
from artist join artist_credit_name on (artist.id = artist_credit_name.artist) 
join artist_credit on (artist_credit.id = artist_credit_name.artist_credit) 
join release on (release.artist_credit = artist_credit.id) 
where artist_credit.name <> artist.name

but this query returns all the same and not different results.

Could you kindly tell me where am I wrong?

Upvotes: 0

Views: 80

Answers (0)

Related Questions