@pzbrawl: Well, if naming only worked... Google Visualization API Query 
column naming works in charts but not in Sheets...
And hence the question. Sheets seem to ignore the header names and sets the 
column names to either ColX or the name of the column in the sheet.

As seen here <https://support.google.com/docs/answer/3093343?hl=en> one can 
add an optional third parameter "headers" to force the number of header 
rows but Sheets still ignores those names and go by A, B in the example 
below.
So in context of Sheets, this is a bug since one cannot query the column BY.


[image: Untitled.png]

On Monday, 3 January 2022 at 02:32:25 UTC+1 pzbrawl wrote:

> Not a bug. Best practice is NOT to use reserved words like "by" as column 
> names. Until such names are got rid of, surround sql references to them 
> with backticks, eg select `by`, ...
>
> PB
>
> On Wednesday, November 17, 2021 at 5:14:48 AM UTC-6 [email protected] 
> wrote:
>
>> There seem to be a bug in the parser (or docs or me hehe) but it says 
>> that eg the following query is faulty:
>> QUERY(A:BZ, "SELECT BY, COUNT(BY) GROUP BY BY")
>> whereas eg the following works:
>> QUERY(A:BZ, "SELECT BZ, COUNT(BZ) GROUP BY BZ")
>>
>> According to me this is a parser bug.
>>
>> Do one need to go by ColXX or is there any way to specify column BY in 
>> some other notation? I tried 'BY' and`BY`etc but to no avail.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/bf9cace3-be7b-423f-99a3-e23087845715n%40googlegroups.com.

Reply via email to