I need to create a summaries record for each result generated by the following query, which returns around 12K.
I’m trying to use an aggregate case to create a Pivot table. However, for my created column to represent row number, it shows an Error
Basically the question is how to get from this:
If I run a query such as:
I’m (thoroughly) learning SQL at the moment and came across the
You cannot (should not) put non-aggregates in the
SELECT line of a
GROUP BY query.
I have a table that looks like this:
Despite looking at many other posts I can’t figure out what I’m doing wrong. I want to do a simple “count and group by”, so I found out I need to use
My sample data: