QueryParsingError: Encountered exception when parsing query:
T
Tucker Leavitt
Query is
SELECT * FROM
(SELECT DISTINCT ON (name)
name, dollar_price
FROM "bitdotio/big_mac_index"."big_mac_index"
ORDER BY name, dollar_price DESC) ORDER BY dollar_price DESC;
POSTing to https://bit.io/_/query_data/ gives a 502 and shows this error in the results box
A
Adam Fletcher
We'll also make the text more readable.
A
Adam Fletcher
I think this SQL is actually incorrect; the subquery must have an alias; you want:
SELECT * FROM
(SELECT DISTINCT ON (name)
name, dollar_price
FROM "bitdotio/big_mac_index"."big_mac_index"
ORDER BY name, dollar_price DESC) a ORDER BY dollar_price DESC;
A
Adam Fletcher
Thanks for the report! We see this in our logs and are looking into it. Sorry for the trouble, but thanks for this good bug report.