Select col1, ; SUM( IIF(col2=0,1, 0) AS sum2, ; SUM( IIF(col3=0,1, 0) AS sum3, ; SUM( IIF(col4=0,1, 0) AS sum4 ; FROM mytable ; GROUP BY col1>Hi all
>A 0 1 1 >A 1 1 0 >A 1 1 0 >B 0 1 1 >A 1 0 0 >A 1 0 1 >B 1 0 1 >B 1 0 0 >A 0 1 1 > >and I need SQl-Cursor like this >A 2 2 3 >B 1 2 1>where the columns in the cursor are count of zeros