Google表格查询-多个"where"带有“分组依据"的条件和“排序依据" [英] Google Sheets query - Multiple "where" conditions with "group by" and "order by"

查看:129
本文介绍了Google表格查询-多个"where"带有“分组依据"的条件和“排序依据"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正尝试在Google表格查询公式中的"group by"和"order by"语句中使用多个where条件(2个条件).

I'm trying to use multiple where conditions (2 conditions) with 'group by' and 'order by' statements inside a Google Sheets Query formula.

query(Sites!A:D,"select A,C,sum(D) 
    where B contains 'Google' 
    and sum(D) > 100 
    group by A,C 
    Order by sum(D) desc label sum(D) 'Total Impressions'")

上面是我尝试过的公式,但是它给了我#VALUE一个错误!

Above is the formula I tried, but it gives me an error with #VALUE!

语句顺序有问题吗?

推荐答案

聚合函数可以在select,order by,label,format子句中使用.它们不能出现在位置",分组依据",枢轴",限制",偏移量"或选项"子句中.

这篇关于Google表格查询-多个"where"带有“分组依据"的条件和“排序依据"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆