订单计数和过滤的Google表格查询结果
我正在研究Google表,旨在帮助分析与营销相关的KPI。为此,我创建了(或从不同来源进行研究)我的第一个查询,该查询根据一列“日期”查找不同表格中的不同列,同时计算出现了多少次不同的值出现。 现在,我也想根据计数值对此查询进行排序。
当前的代码看起来像这样:
=QUERY(UNIQUE(QUERY(
Gruppenname_klaeren!A3:I;"SELECT * WHERE I is not null
and B >= date'"&TEXT(today()-A2;"yyyy-mm-dd")&"'
and B <= date '"&TEXT(today();"yyyy-mm-dd")&"'
label I 'Kampagne'"));
"SELECT Col9, count(Col3) WHERE Col9 is not null GROUP BY Col9 label count(Col3) 'Anzahl GKs'")
老实说,代码感觉像是一团糟 - 但这是我唯一可以使其正常工作的方法。现在,我想根据计数值(COL3)订购结果,但是只需以以下方式插入此结果:
"SELECT Col9, count(Col3) WHERE Col9 is not null GROUP BY Col9 label count(Col3) 'Anzahl GKs' order by count(Col3) desc")
如果有人知道为什么这不起作用,我真的很感谢您的帮助。
谢谢!
I am working on a Google Sheet intended to aid in the analysis of Marketing-related KPIs. For this, I have created (or rather researched from different sources) my first Query, which looks up different columns from a different sheet based on one column "date" and groups them while counting how many times different values appear.
Now, I would like to also sort this query by the counted values.
The code currently looks like this:
=QUERY(UNIQUE(QUERY(
Gruppenname_klaeren!A3:I;"SELECT * WHERE I is not null
and B >= date'"&TEXT(today()-A2;"yyyy-mm-dd")&"'
and B <= date '"&TEXT(today();"yyyy-mm-dd")&"'
label I 'Kampagne'"));
"SELECT Col9, count(Col3) WHERE Col9 is not null GROUP BY Col9 label count(Col3) 'Anzahl GKs'")
Honestly, the code feels like a mess – but that's the only way I could make it work. Now, I would like to order the results based on the values of count(Col3), but just inserting this in the following way doesn't work:
"SELECT Col9, count(Col3) WHERE Col9 is not null GROUP BY Col9 label count(Col3) 'Anzahl GKs' order by count(Col3) desc")
If anyone knows why this doesn't work, I'd really appreciate the help.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试
我已经通过
排序(___________; 3; 0)
1 = ASC 封装了您的公式
0 = desc
Try
I have encapsulated your formula by
sort(___________;3;0)
1 = ASC
0 = DESC