error in SELECT count(result.id) FROM result WHERE result.id<>'' and a1r2q in (2,3) and result.id not in (select result.id from result where result.id<>'' and (a1r2q in (3)) and a1r2q7 in (2,3) and a1r2q8 in (2,3)) union all SELECT count(result.id) FROM result WHERE result.id<>'' and (a1r2q in (3)) and a1r2q7 in (2,3) and a1r2q8 in (2,3) union all SELECT count(result.id) FROM result WHERE result.id<>'' and ( (a1r2q1 in (1) and a1r2q2 not in (0,1) and a1r2q3 not in (0,1) and a1r2q4 not in (0,1)) or (a1r2q1 not in (1) and a1r2q2 in (1) and a1r2q3 not in (0,1) and a1r2q4 not in (0,1)) or (a1r2q1 not in (0,1) and a1r2q2 not in (0,1) and a1r2q3 in (1) and a1r2q4 not in (0,1)) or (a1r2q1 not in (0,1) and a1r2q2 not in (0,1) and a1r2q3 not in (0,1) and a1r2q4 in (1)) or (a1r2q1 in (2,3) and a1r2q2 in (2,3) and a1r2q3 in (2,3) and a1r2q4 not in (2,3)) or (a1r2q1 in (2,3) and a1r2q2 in (2,3) and a1r2q3 not in (2,3) and a1r2q4 in (2,3)) or (a1r2q1 in (2,3) and a1r2q2 not in (2,3) and a1r2q3 in (2,3) and a1r2q4 in (2,3)) or (a1r2q1 not in (2,3) and a1r2q2 in (2,3) and a1r2q3 in (2,3) and a1r2q4 in (2,3)) or (a1r2q1 in (2,3) and a1r2q2 in (2,3) and a1r2q3 not in (2,3) and a1r2q4 not in (2,3)) or (a1r2q1 in (2,3) and a1r2q2 not in (2,3) and a1r2q3 in (2,3) and a1r2q4 not in (2,3)) or (a1r2q1 in (2,3) and a1r2q2 not in (2,3) and a1r2q3 not in (2,3) and a1r2q4 in (2,3)) or (a1r2q1 not in (2,3) and a1r2q2 in (2,3) and a1r2q3 in (2,3) and a1r2q4 not in (2,3)) or (a1r2q1 not in (2,3) and a1r2q2 in (2,3) and a1r2q3 not in (2,3) and a1r2q4 in (2,3)) or (a1r2q1 not in (2,3) and a1r2q2 not in (2,3) and a1r2q3 in (2,3) and a1r2q4 in (2,3)) or (a1r2q1 in (2,3) and a1r2q2 not in (2,3) and a1r2q3 not in (2,3) and a1r2q4 not in (2,3)) or (a1r2q1 not in (2,3) and a1r2q2 in (2,3) and a1r2q3 not in (2,3) and a1r2q4 not in (2,3)) or (a1r2q1 not in (2,3) and a1r2q2 not in (2,3) and a1r2q3 in (2,3) and a1r2q4 not in (2,3)) or (a1r2q1 not in (2,3) and a1r2q2 not in (2,3) and a1r2q3 not in (2,3) and a1r2q4 in (2,3)) ) union all SELECT count(result.id) FROM result WHERE result.id<>'' and ( (a1r2q1 in (1) and a1r2q2 in (1) and a1r2q3 in (1) and a1r2q4 in (1)) or (a1r2q1 in (1) and a1r2q2 in (1) and a1r2q3 in (1) and a1r2q4 not in (2,3)) or (a1r2q1 not in (2,3) and a1r2q2 in (1) and a1r2q3 in (1) and a1r2q4 in (1)) or (a1r2q1 in (1) and a1r2q2 in (1) and a1r2q3 not in (2,3) and a1r2q4 in (1)) or (a1r2q1 in (1) and a1r2q2 not in (2,3) and a1r2q3 in (1) and a1r2q4 in (1)) or (a1r2q1 in (0) and a1r2q2 in (0) and a1r2q3 in (0) and a1r2q4 in (0)) or (a1r2q1 in (0) and a1r2q2 in (0) and a1r2q3 in (0)) or (a1r2q2 in (0) and a1r2q3 in (0) and a1r2q4 in (0)) or (a1r2q1 in (0) and a1r2q2 in (0) and a1r2q4 in (0)) or (a1r2q1 in (0) and a1r2q3 in (0) and a1r2q4 in (0)) or (a1r2q1 in (0) and a1r2q2 in (0) and a1r2q3 not in (2,3) and a1r2q4 not in (2,3)) or (a1r2q1 in (0) and a1r2q2 not in (2,3) and a1r2q3 in (0) and a1r2q4 not in (2,3)) or (a1r2q1 in (0) and a1r2q2 not in (2,3) and a1r2q3 not in (2,3) and a1r2q4 in (0)) or (a1r2q1 not in (2,3) and a1r2q2 in (0) and a1r2q3 in (0) and a1r2q4 not in (2,3)) or (a1r2q1 not in (2,3) and a1r2q2 in (0) and a1r2q3 not in (2,3) and a1r2q4 in (0)) or (a1r2q1 not in (2,3) and a1r2q2 not in (2,3) and a1r2q3 in (0) and a1r2q4 in (0)) ) union all SELECT count(result.id) FROM result WHERE result.id<>'' and a1r2q in (2,3) and a1r2q7 in (1,2,3) and a1r2q8 in (1,2,3) union all SELECT count(result.id) FROM result WHERE result.id<>'' and ( (a1r2q1 in (1) and a1r2q2 in (1) and a1r2q3 in (1) and a1r2q4 in (1)) or (a1r2q1 in (1) and a1r2q2 in (1) and a1r2q3 in (1) and a1r2q4 not in (2,3)) or (a1r2q1 not in (2,3) and a1r2q2 in (1) and a1r2q3 in (1) and a1r2q4 in (1)) or (a1r2q1 in (1) and a1r2q2 in (1) and a1r2q3 not in (2,3) and a1r2q4 in (1)) or (a1r2q1 in (1) and a1r2q2 not in (2,3) and a1r2q3 in (1) and a1r2q4 in (1)) or (a1r2q1 in (0) and a1r2q2 in (0) and a1r2q3 in (0) and a1r2q4 in (0)) or (a1r2q1 in (0) and a1r2q2 in (0) and a1r2q3 in (0)) or (a1r2q2 in (0) and a1r2q3 in (0) and a1r2q4 in (0)) or (a1r2q1 in (0) and a1r2q2 in (0) and a1r2q4 in (0)) or (a1r2q1 in (0) and a1r2q3 in (0) and a1r2q4 in (0)) or (a1r2q1 in (0) and a1r2q2 in (0) and a1r2q3 not in (2,3) and a1r2q4 not in (2,3)) or (a1r2q1 in (0) and a1r2q2 not in (2,3) and a1r2q3 in (0) and a1r2q4 not in (2,3)) or (a1r2q1 in (0) and a1r2q2 not in (2,3) and a1r2q3 not in (2,3) and a1r2q4 in (0)) or (a1r2q1 not in (2,3) and a1r2q2 in (0) and a1r2q3 in (0) and a1r2q4 not in (2,3)) or (a1r2q1 not in (2,3) and a1r2q2 in (0) and a1r2q3 not in (2,3) and a1r2q4 in (0)) or (a1r2q1 not in (2,3) and a1r2q2 not in (2,3) and a1r2q3 in (0) and a1r2q4 in (0)) ) and a1r2q7 in (1,2,3) and a1r2q8 in (1,2,3): Unknown column 'a1r2q' in 'where clause'