Skip to content
Advertisement

I am getting a “subquery returning multiple rows” error. I want to return multiple rows however

I want to have a subquery which returns multiple rows in MySQL. I used the IN function as well. However i am getting a “subquery returning multiple rows” error. I have attached an image of the tables used and the desired output Here is my SQL code:

enter image description here

enter image description here

Advertisement

Answer

You seem to want conditional aggregation:

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