Usually I feel pretty confident about SQL queries, however I have a scratching head. I feel that this should be a quick fix, but I just don't see it.
I am trying to do a count on several values in one table in one query.
Ignore "0000000000000000" just by representing an empty byte array.
Is there an easy way to combine these queries?
SELECT COUNT(ssn)
FROM patients
WHERE ssn="0000000000000000";
SELECT COUNT(firstname)
FROM patients
WHERE firstname="0000000000000000"
SELECT COUNT(lastname)
FROM patients
WHERE lastname="0000000000000000"
etc...
source
share