Skip to content
Advertisement

return a table with a column with yes or no

I have the following two tables:

Singers

Colaborate

I want to get a result where every name of the singers table has stated in a second column whether or not they sing metal. So for example Hendrix and Madonna sing metal so the table should look like this:

I have tried the following but I don’t get distinct results nor does it take into account the symmetric relation of Colaborate.

How can I solve this with a CASE expression?

Advertisement

Answer

You can ascertain this a number of ways, one way would be using exists

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement