HVF / HVF/franchise

Query editor errors when referencing previous cells

Open
#56 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
4k
Forks
262
PR merge metrics
No merged PRs in 30d

Description

Looks like you're not allowed to use aliases. This code fails

```sql
SELECT
b.myvalue
FROM
{{myquery}} as b
```
Wrapping the cell reference within parentheses doesn't work either:
```sql
SELECT
b.myvalue
FROM
({{myquery}}) b
```
And when you want to reference more than one cell with same columns and need to specify the table name, also fails (circular reference https://github.com/HVF/franchise/blob/master/src/db/generic.js#L98 )

```sql
SELECT
{{myquery1}}.id
{{myquery1}}.myvalue as val1,
{{myquery2}}.myvalue as val2
FROM
{{myquery_1}} ,
{{myquery_2}}
USING (id)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.