在查询中转义列名(避免与保留字冲突)

Escape column name in query (to avoid conflict with reserved words)

我有一个 Google 表格,想在名为 BY 的列中查询。这是失败的:

=query(Data!A:GC, "select BY where BG = 'completed'")

如何转义 BY 列名称?

请尝试 backquotes - 例如:

=query(Data!A:GC, "select `BY` where BG = 'completed'")  

因此,要将列 BY 用作标识符,您必须在其周围使用反引号...

`BY`

来源:詹姆斯@https://productforums.google.com/forum/#!msg/docs/tFB_02gNceQ/-2IUvmnQBgAJ