you can easily do this with a decode inside a sum function
sum(decode(fielda, 'value1', 1,0)) as COUNT_OF_A
says everytime fielda = 'value1' add 1 to the sum otherwise add a 0 and name this sum COUNT_OF_A.
your other count is
sum(decode(fielda, 'value2', 1, 0)) as COUNT_OF_2
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.