Skip to content
Advertisement

2 column with 2 different condition in one table

is it possible to create a query that will output 2 column with 2 different WHERE clause

this my ideal output:

where count 1 is the result of the 1st WHERE clause. Which I already created. What I want is to have another column where in the value will be with different WHERE clause.

here’s my query:

with this query I was able to get the 1st 3 column, my problem now is how to supply value on the 4th column with the value of EVT_RSTATUS = 'C'.

Any insight?

TIA

Advertisement

Answer

I think you want conditional aggregation:

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