Count Operator in SQL
Example: Counting the students who have scored more than 50 in some exam
(SELECT COUNT (*) FROM
(SELECT DISTINCT StudentId
FROM EXAM_MARK
WHERE Mark > 50) AS T)
Example is a direct translation of the corresponding example in the theory book but it can be abbreviated-and is much more likely to be written-as
(SELECT COUNT (DISTINCT StudentId )
FROM EXAM_MARK
WHERE Mark > 50)