I have got a column name state(int) in which only 0 and 1 are inserted depending on the logic, I want a count query which can count how many 0 and how many 1 are there in the table in a single query like:
Select Count(state) From productDetail……
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
or
or
The first two examples will return one row with two columns:
The third example will return two rows with two columns, one row per state.