summaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/pg/having_subquery_ref_agg.sql
blob: 2dff4cb14503899a762fef034236134dc6a03650 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--!syntax_pg

/* custom error: Member not found: _alias_t.x */

-- TODO(YQL-20943): bad test.

SELECT x
FROM (VALUES (1)) AS t(x)
GROUP BY x
HAVING (Count(x) / (
    SELECT Count(y)
    FROM (VALUES ('1')) AS t(y)
    HAVING Count(x) = Count(y)
)) = 1;