在 QUERY 函数中包含标准 Google Sheets 函数时的语法是什么?

What is the syntax when including standard Google Sheets functions within the QUERY function?

我想在 Google 表格中使用 LARGE 函数在查询查找中引用一个单元格。我尝试了以下代码的变体但没有成功:

=QUERY(C2:D49,"select C where D = "large(D2:D49,2)"")

这让我想知道在使用标准函数的查询中引用单元格值的规则是什么。

语法为:

=QUERY(C2:D49, "select C where D = "&LARGE(D2:D49, 2), 0)

查询字符串是纯字符串。只要生成的字符串是有效查询,就没有特殊规则适用。适用于电子表格中字符串的标准规则也适用于查询字符串。在这种情况下,您正在寻找字符串连接:

="Maximum number of players allowed: "&large(D2:D49,1)

=JOIN(" ", "Maximum number of players allowed:", large(D2:D49,1))