0

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?

gaaab
  • 16
  • 3
  • 1
    Could you please expand what you mean with "but this query returns all the same and not different results"? I suggest adding an excerpt of the result set, and if it's possible an excerpt of the desired results (or, an explanation for why the result set is not correct) – larsen May 21 '20 at 16:03
  • The problem is that in the where clause I put <>, but in the resulting table the two fields are the same. I uploaded the resulting table here https://imgur.com/a/gxD3E7p. – gaaab May 21 '20 at 16:32

0 Answers0