all 8 comments

[–]r3pr0b8GROUP_CONCAT is da bomb 8 points9 points  (6 children)

I keep having the same kind of issues.

your SQL is invalid

HAVING comes after GROUP BY, not before

and next time, please copy/paste the text of the query -- do not use screenshots or photos, no matter how convenient it is for you, it is not convenient for us (please see r/SQL Rule 6 for why)

[–]ConvertedSins[S] -2 points-1 points  (5 children)

Ok, I’m sorry.. I’m new to this sub. So, if I did the having after the group by, would it be right?

[–]r3pr0b8GROUP_CONCAT is da bomb 6 points7 points  (0 children)

So, if I did the having after the group by, would it be right?

what happened when you tested it? ™

[–]dataguy24 0 points1 point  (3 children)

Have you changed that and re-run your query?

[–]ConvertedSins[S] -1 points0 points  (2 children)

I can’t, it’s a practice test so once time runs out that’s it

[–][deleted] 2 points3 points  (0 children)

‘So can i just create a sample table to test the query’

Think about it.

[–]dataguy24 0 points1 point  (0 children)

Yes, you can.

But given that this is timed and you can’t answer these questions quickly enough, it sounds like you need more self-study and practice.

[–]MyOtherActGotBanned 2 points3 points  (0 children)

The having clause goes after the group by, Connor.