-
Notifications
You must be signed in to change notification settings - Fork 690
Open
Labels
Bug: Code provided to reproducedRelated to: SQL compliancejavascriptPull requests that update javascript codePull requests that update javascript code
Description
If I do
SELECT country, COUNT(*) AS competitors
FROM foreignCompetitors
GROUP BY country
ORDER BY country
UNION
SELECT "Total: " AS country, COUNT(*) AS competitors
FROM foreignCompetitors;
I get error: Parse error on line 6: ...Y countryORDER BY UNIONSELECT "Total: ---------------------^ Expecting 'LITERAL', 'BRALITERAL', 'LPAR', 'NUMBER', 'STRING', 'SHARP', 'DOLLAR', 'AT', 'VALUE', 'COLON', 'NOT', 'IF', 'PLUS', 'STAR', 'QUESTION', 'INSERTED', 'FIRST', 'LAST', 'DELETED', 'CURRENT_TIMESTAMP', 'CURRENT_DATE', 'JAVASCRIPT', 'NEW', 'CAST', 'CONVERT', 'SUM', 'TOTAL', 'COUNT', 'MIN', 'MAX', 'AVG', 'AGGR', 'ARRAY', 'REPLACE', 'DATEADD', 'DATEDIFF', 'TIMESTAMPDIFF', 'INTERVAL', 'TRUE', 'FALSE', 'NSTRING', 'NULL', 'EXISTS', 'ARRAYLBRA', 'BRAQUESTION', 'CASE', 'TILDA', 'MINUS', 'ATLBRA', 'LCUR', got 'UNION'
If I remove the ORDER BY clause it works.
Copilot
Metadata
Metadata
Labels
Bug: Code provided to reproducedRelated to: SQL compliancejavascriptPull requests that update javascript codePull requests that update javascript code