Skip to content

Subqueries in where clause cause error #26

@DanCory

Description

@DanCory

Using the sample data and view from the readme, run the following query:

SEMANTIC SELECT
    year,
    region,
    AGGREGATE(revenue) AS revenue,
    AGGREGATE(revenue) AT (ALL region) AS year_total,
    AGGREGATE(revenue) / AGGREGATE(revenue) AT (ALL region) AS pct_of_year
FROM sales_v
where year in (select year from sales);

Error:

Invalid Input Error:
Query error: Parser Error: syntax error at or near "_inner"

LINE 4: ... DISTINCT FROM _outer.region AND _inner.year in (_inner.select _inner.year _inner.from _inner.sales)) AS revenue,
                                                                          ^

LINE 4: ... DISTINCT FROM _outer.region AND _inner.year in (_inner.select _inner.year _inner.from _inner.sales)) AS revenue,
                                                                          ^

LINE 1: SEMANTIC SELECT

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions