How to put a CASE statement in the GROUP BY clause
|Added at||2017-01-04 20:01|
I've got a table with one column that is a comma separated list of possible values. I'd like to query, grouped by each individual possible value.
As a test, I've written this query:
(Please excuse the column names, they're auto-generated)
I know the CASE statement isn't incredibly useful at this point, but I'm just trying to get the query to run. I'm getting an error:
For the life of me I can't find what's wrong with the query. Any insight would be appreciated.
EDIT: I've tried with single and double quotes - same problem regardless of the quote used.
UPDATED: As Mark has pointed out, even if I get this query to parse, the results won't be what I'm looking for. I'm still curious why this doesn't parse, but the query is not the solution to my initial problem.