\set ECHO none add_provenance (1 row) q|differences DISTINCT in an expression|0 (1 row) q|differences cast around DISTINCT|0 (1 row) q|differences expression over another aggregate beside it|0 (1 row) q|differences two DISTINCT aggregates in one expression|0 (1 row) q|differences the same DISTINCT aggregate twice|0 (1 row) q|differences sum(DISTINCT) in an expression, WHERE, key expression|0 (1 row) q|differences no GROUP BY|0 (1 row) remove_provenance (1 row) q|g|c1|top|in_expression|bare count gate children|0|3 (*)|arith|2|2 count gate children|1|3 (*)|arith|2|2 count gate children|2|2 (*)|arith|1|1 count gate children|3|2 (*)|arith|1|1 count gate children||2 (*)|arith|1|1 (5 rows) q|same same count gate|t (1 row) remove_provenance (1 row) q|g|p HAVING cd + 1 >= 3|0|0.2500 HAVING cd + 1 >= 3|1|0.2500 HAVING cd + 1 >= 3|2|0.0000 HAVING cd + 1 >= 3|3|0.0000 HAVING cd + 1 >= 3||0.0000 (5 rows) remove_provenance (1 row) q|g|c1|p target and HAVING|0|3 (*)|0.7500 target and HAVING|1|3 (*)|0.7500 target and HAVING|2|2 (*)|0.5000 target and HAVING|3|2 (*)|0.7500 target and HAVING||2 (*)|0.7500 (5 rows)