Is there a way around the error "ERROR 2792: Correlated subquery with aggregate function COUNT is not supported".
Simple example:
Code: Select all
vert01=> create table test (c1 int, c2 int);
CREATE TABLE
dbadmin=> select c1, c2, (select count(c2) from test t2 where t2.c1 = t1.c1 and t2.c2 = 0) c2_sum from test t1;
ERROR 2792: Correlated subquery with aggregate function COUNT is not supported
Thanks in advance for any suggestions ...