I have a Select statement which is doing a count. For the column that is being counted, I want the null values that are returned to be 0. I've tried using ISNULL and IFNULL, but no luck. Here's the part of the code that I need to return 0 instead of null:
(SELECT COUNT(QO01ACCIDENT_NO) AS CNT, ACCTYP, SEVERITY, GROUPING(ACCTYP) AS ACCTYP_GROUP, GROUPING(SEVERITY) AS SEVERITY_GROUP
(SELECT COUNT(QO01ACCIDENT_NO) AS CNT, ACCTYP, SEVERITY, GROUPING(ACCTYP) AS ACCTYP_GROUP, GROUPING(SEVERITY) AS SEVERITY_GROUP