clear markdown feedback
clear markdown feedback
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 3798975 fiddles created (41853 in the last week).

CREATE TABLE tab_x(b BIT); INSERT INTO tab_x(b) VALUES(1),(0),(0),(NULL),(0),(1);
6 rows affected
 hidden batch(es)


SELECT SUM(SIGN(b)) FROM tab_x;
(No column name)
2
Warning: Null value is eliminated by an aggregate or other SET operation.
 hidden batch(es)