You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 29, 2023. It is now read-only.
The generated sql is incorrect, look at the alias on line 15. The error seems to occur
when a complex query is translated to sql that contains a WITH clause.
WITH t0 AS (
SELECT *
FROM `project.playground.store` t6
INNER JOIN `project.playground.sale` t7
ON t7.`fk_store` = t6.`pk_store`
),
t1 AS (
SELECT `pk_store`, `store`, `fk_date`, `a`, `b`, `c`
FROM t0
),
t2 AS (
SELECT *
FROM t1
INNER JOIN `project.playground.date` t7
ON t7.`pk_date` = t0.`fk_date`
),
t3 AS (
SELECT `pk_store`, `store`, `a`, `b`, `c`, `date`
FROM t2
)
SELECT t4.`a`, t4.`b`
FROM t3 t4
INNER JOIN (
SELECT `pk_store`, `store`, `a`, `b`, `c`, `date`
FROM t2
) t5
ON (t4.`a` = t5.`a`) AND
(t4.`b` = t5.`b`)
The text was updated successfully, but these errors were encountered:
jcmincke
changed the title
Incorrect generated sql for complex query
Incorrect generated (bigquery) sql for complex query
Jun 25, 2021
The generated sql is incorrect, look at the alias on line 15. The error seems to occur
when a complex query is translated to sql that contains a WITH clause.
The text was updated successfully, but these errors were encountered: