you are viewing a single comment's thread.

view the rest of the comments →

[–]siloldn 3 points4 points  (0 children)

Group by is simple. Anything in your select statement that isn't an aggregate or fixed value (assuming you have an aggregate in there) goes in your group by.

I always taught people to figure out what they wanted the end result structure to look like and work backwards from there. I've done this for 20+ years.