所以我有以下数据:
|Country | Shop | Qty |
-----------------------------
|Austrailia | Shop 1 | 3
|Austrailia | Shop 2 |
|Austrailia | Shop 3 |
|Austrailia | Shop 4 |
|Japan | Shop 5 | 10
|Japan | Shop 6 | 1
|Japan | Shop 7 |
|Japan | Shop 8 |
|Japan | Shop 9 |
|Japan | Shop 10 |
|Austria | Shop 11 |
|Belgium | Shop 12 |
|Belgium | Shop 13 |
|Belgium | Shop 14 | 45
|Belgium | Shop 15 |
|Belgium | Shop 16 |
|Belgium | Shop 17 |
|Belgium | Shop 18 |
|Denmark | Shop 19 |
|Finland | Shop 20 | 2
我想在另一个标签中创建另一个表来查询此表,并为每个国家/地区提供不同商店数量行的总和。因此,例如,它将输出以下内容:
|Country | Qty
-----------------
|Austrailia | 3
|Japan | 11
|Austria | 0
|Belgium | 45
|Denmark | 0
|Finland | 2
我一直在玩QUERY命令,但无法输出我需要的东西:(
答案 0 :(得分:1)
=QUERY(A1:C21,"Select A,sum(C) group by A",1)