Skip to content
Advertisement

How to fix SELECT statement to return duplicates

Currently I am trying to return a three table join to find duplicate track titles that are in my a “track” table, and also return the track number | cd title from the other joined tables. My select statement is currently returning all the information from the joined tables but its not showing only the duplicates.

I have also tried using a group by and having clause to try to find a COUNT of comptitle. When I tried that it returned the an empty table.

My Tables:

My statement:

Output expected | actual:

Advertisement

Answer

You can use window functions:

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