【发布时间】:2019-09-05 06:37:16
【问题描述】:
我正在尝试从匹配两个条件的工作表中查询数据。但是,当数据中有超过 1 行与我的条件匹配时,查询仅返回第一个结果。如何确保它返回符合条件的所有行?
我尝试更改单引号和双引号、大写字母、更改数据格式但没有任何效果。
查询:
query(Raw!A1:J29041, "select B,C,D,E, sum(F) where B='"&sheet1!A2&"' and E='good source' and not C='2016' GROUP BY B,C,D,E")
数据示例:
Client Year Month Source Count
Client a 2019 July other source 1
Client a 2019 July good source 2
Client a 2019 July bad source 22
Client a 2019 July good source 63
Client a 2019 July another source 1
Client a 2019 July another source 8
此数据的所需输出:
Client Year Month Source sum
Client a 2019 July other source 65
【问题讨论】:
标签: google-sheets google-sheets-formula google-sheets-query google-query-language