clear markdown help donate comments/suggestions/bugs a leap of faith?
clear markdown donate comments/suggestions/bugs a leap of faith?
By using dbfiddle, you agree to license everything you submit by Creative Commons CC0

CREATE TABLE tab(i INT, status INT); INSERT INTO tab VALUES (1,1),(2,1),(3,0);
3 rows affected

SELECT i, COUNT(*) cnt FROM tab WHERE status = 1 GROUP BY i
i cnt
1 1
2 1

SELECT i, COUNT(*) cnt FROM tab WHERE status = 1 GROUP BY ALL i; -- ALL is deprecated feature
i cnt
1 1
2 1
3 0
Warning: Null value is eliminated by an aggregate or other SET operation.

-- workaround materializng to table SELECT i, COUNT(*) cnt INTO tab2 FROM tab WHERE status = 1 GROUP BY ALL i
Warning: Null value is eliminated by an aggregate or other SET operation. 3 rows affected

SELECT * FROM tab2
i cnt
1 1
2 1
3 0