如何在一个查询函数中引用其他 2 个页面(3 个,包括我调用该函数的页面)?

How to reference 2 other pages (3 including the one I call the function on) in one query function?

这是我要编写的代码行:

=QUERY(Players!A:I, "select I where A = "&(Teams!A:F, "select A where F = '"&C2&"'"), 0)

基本上我在 'Page1' 上写一个查询,它从 'Players' 页面上的 I 列中选择一个名称,其中 A 列(也在 'Players' 页面上)= A 列'Teams' 页面,其中 F = 'Page1' 上的单元格 C2。有很多引用不同的页面,这可能会使理解变得混乱。此外,代码行返回公式解析错误

也许试试:

=QUERY(Players!A:I, "select I where A = '"&
 QUERY(Teams!A:F,   "select A where F = '"&C2&"'", 0)&"'", 0)

或:

=QUERY(Players!A:I, "select I where A = "&
 QUERY(Teams!A:F,   "select A where F = '"&C2&"'", 0), 0)