I am developing an intranet web application which is a Quiz Engine. Now, I need to come up with a query that shows the total number of sending & non-sending quizzes. The current query that I am using it right now is showing the number of sending quizzes only:
SELECT COUNT(QuizID) AS [Total Number of Sending Quizzes]
FROM dbo.Quiz
WHERE (IsSent=1)
So how should I modify it to get the total number of non-sending quizzes?
For your information, the in the database, I have a table called Quiz Table that consists of: QuizID, Title, Description, IsSent.
IsSent is a flag/boolean that takes True (1) or False (0) to determine that the quiz is sent or not.
EDIT:
I want to get two columns: One called Total Number of Sent, and the second column as Total Number of not Sent. How to get these columns?
May be allow null is true of IsSent Column,So you should also handle this
Edit from comments: