Returning Null values with COUNT
- by Randy B.
With this query, I get a result that is two short of the table because they are not included in count, and I would like get the NULL values in the result. To do this, I am pretty sure I need to use a subquery of some kind, but I am not sure how, since the attribute in question is an aggregate.
SELECT Equipment.SerialNo , Name, COUNT(Assignment.SerialNo)
FROM Equipment
INNER JOIN Assignment
ON Assignment.SerialNo = Equipment.SerialNo
GROUP BY Equipment.SerialNo, Name