I have a column that has a value that is either 0 or 1. how do i count the numbers of zeros?
SELECT A.id
FROM table1 A
GROUP BY A.id
HAVING SUM(A.zeroorone) >=
ALL (SELECT SUM(AA.zeroorone)
FROM table1 AA
GROUP BY AA.id)
I know this counts the number of ones. I cant seem to get it
A CASE statement would do nicely: