如何将 Google 表格查询渲染到多列中

huangapple go评论131阅读模式
英文:

How to render Google Sheet Query to multiple Column

问题

我已经了解基本的Google Query语法,但我只能使用以下方式将数据呈现为第一列:

=QUERY(A1:D,"Select A,Sum(C) Where B='Red' group by B",1)

但是,这个公式只能呈现一列数据。您要如何使其呈现像Picture2中的方式(同时呈现蓝色和黄色列)?

英文:

Okay, simple question, I have a data on Google Sheet like in the picture below
如何将 Google 表格查询渲染到多列中
How could render the data to look like in the picture below using Google Query?
如何将 Google 表格查询渲染到多列中

I already know basic Google Query syntax, but I can only render the data only up to the first Column by using:
=QUERY(A1:D,"Select A,Sum(C) Where B="Red" group by B",1)

I already try the formula above But it only can render 1 column only,
How could I make it render like in the Picture2 (Also render Blue and Yellow column)?

答案1

得分: 1

=QUERY(A1:D,"选择 A,求和(C) 按 A 透视 B",1)

英文:

Try:

=QUERY(A1:D,"Select A,Sum(C) group by A pivot B",1)

huangapple
  • 本文由 发表于 2023年3月4日 05:45:02
  • 转载请务必保留本文链接:https://go.coder-hub.com/75632137.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定