Skip to content
Advertisement

SQL combining the join result of two different tables

I am having a problem with SQL at the moment.

I use an example database of W3School

This is what I have now:

Output:

And this:

Output:

I just want this result:

I tried to combine two query into one but I get the wrong result.

Thank you

Advertisement

Answer

Since this is a learning session it seems like they are trying to teach you about Distinct count so use the below query,

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