Skip to content
Advertisement

Creating multiple columns from filtered values in single column in SQL

I need a bit of help I have a database that looks something like this:

enter image description here

and I would like to separate this table creating 1 column per queue and grouping the times to have a unique list as I only filter 24 hours at a time.

The expected outcome would be something like this:

enter image description here

So far the code I have tried is:

But I get an empty list with just the intervals so far. Could you help me, please?

Advertisement

Answer

Use aggregation. If you have only one row per time, then:

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