Hello

I have mysql table with the following fields name, status, address.
But status field has values open and closed. But I want a select statement that will select name status for records opened, then status for records closed using single select statement.

Meaning it should count number of records that are closed, then opened and group them by class.

meaning if it class A has 6 records open and 5 , and if class has 3 records closed and 5 opened. it should display them as follows;


Class Closed Opened
A 6 5

B 3 5

Your help will be highly appreciated.