0

Hello guys! Please help me with a little problem.

I have one table(Person) where are some values.

My current syntax is:

SELECT Status, COUNT(Name) AS Number
FROM Person
WHERE Status = 'Married';

Result:

Status_________Number

Married__________3

But I want to get the result for each status.
That would be something like this:

Result:

Status_________Number

Married__________3
Divorced_________2
Single___________4
Widowed_________1

How to conclude my SQL syntax and get this result?

Any help is the most welcome.

Edited by Tr1umPr0: /

2
Contributors
1
Reply
2
Views
4 Years
Discussion Span
Last Post by JorgeM
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.