Skip to content
Advertisement

SQL Query: Aggregate multiple values with Case and count it

I have the following query and I want the output to show only the count of Active Members and Non-Active Members:

The result I am getting is this:

Where the two lines “Non Active” are of this 2 status (‘Unemployed’, ‘Housewife/Student’), I’would like to know how aggregate these 2 values in one to get only ‘Active’ and ‘Non Active’ status:

Thanks to everyone who tries to help

Advertisement

Answer

try to do with a totalizer of an subquery(your main query):

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