|
I am trying to write a query which produces a summary or statuses but my current attempt is ugly and takes too long (over a minute). Given this sample data:
I want to produce this summary data:
How can I write this query so that it can stay fast and flexible?
(comments are locked)
|
|
Assuming your status values don't change you can use PIVOT:
(comments are locked)
|

