I need to modify a SQL view to output 3 columns each containing a count of results in another column.
The view returns multiple rows each row containing a Status column. I need multiple new output columns, each containing a count of the total of each type of result.
e.g.
Original output column is 'Status' which can resolve as 'Pending', 'Dead' or 'Active'
I need, in this example three new columns headed 'Pending Count', 'Dead Count', 'Active Count', each column containing a single numeric count of the total number of each Status category - if ten rows are Status='Dead' then 'Dead Count' returns '10'
How please?