SELECT COALESCE(sum(CASE WHEN myCol THEN 1 ELSE 0 END),0) FROM <table name>
nebo, jak jste sami zjistili:
SELECT count(CASE WHEN myCol THEN 1 END) FROM <table name>
SELECT COALESCE(sum(CASE WHEN myCol THEN 1 ELSE 0 END),0) FROM <table name>
nebo, jak jste sami zjistili:
SELECT count(CASE WHEN myCol THEN 1 END) FROM <table name>