Table:
0
A
B
C
D
E
F
G
H
1
company id
name
headquarters
industry
sales in billion
profits in billion
assets in billion
market value in billion
2
1
ExxonMobil
USA
Oil and gas
433.5
41.1
331.1
407.4
3
2
JPMorgan Chase
USA
Banking
110.8
19
2265.8
170.1
4
3
General Electric
USA
Conglomerate
147.3
14.2
717.2
213.7
5
4
Royal Dutch Shell
Netherlands
Oil and gas
470.2
30.9
340.5
227.6
6
5
Industrial and Commercial Bank of China
China
Banking
82.6
25.1
2039.1
237.4
7
6
HSBC
UK
Banking
102
16.2
2550
164.3
8
7
PetroChina
China
Oil and gas
310.1
20.6
304.7
294.7
9
8
Berkshire Hathaway
USA
Conglomerate
143.7
10.3
392.6
202.2
10
9
Wells Fargo
USA
Banking
87.6
15.9
1313.9
178.7
11
10
Petrobras
Brazil
Oil and gas
145.9
20.1
319.4
180
12
11
BP
UK
Oil and gas
375.5
25.7
292.5
147.4
13
12
Chevron
USA
Oil and gas
236.3
26.9
209.5
218
14
13
China Construction Bank
China
Banking
68.7
20.5
1637.8
201.9
15
14
Citigroup
USA
Banking
102.6
11.1
1873.9
107.5
16
15
Gazprom
Russia
Oil and gas
117.6
31.7
302.6
159.8
17
16
Walmart
USA
Retailing
447
15.7
193.4
208.4
18
17
Volkswagen Group
Germany
Automotive
221.9
21.5
328.7
79.5
19
18
Total
France
Oil and gas
216.2
15.9
213
132.4
20
19
Agricultural Bank of China
China
Banking
62.4
14.4
1563.9
154.8

Questions and formulas:
Question: How many companies are headquartered in the US?
Formula: SUMIFS(A1,C1,"usa")
Formula2: SUMIFS(A2:A20,C2:C20,"usa")
Level: easy
Question: What are the headquarters and industries of all companies?
Formula: CHOOSE({1,2},C1,D1)
Formula2: CHOOSE({1,2},C2:C20,D2:D20)
Level: easy
Question: Show the names of companies in the banking or retailing industry?
Formula: FILTER(B1,(D1="Banking")+(D1="Retailing"))
Formula2: FILTER(B2:B20,(D2:D20="Banking")+(D2:D20="Retailing"))
Level: easy
Question: Show the different headquarters and number of companies at each headquarter.
Formula: SUMMARIZE(C1,SUMX(A1))
Formula2: SUMMARIZE(C2:C20,SUMX(A2:A20))
Level: easy
Question: Show the headquarters that have at least two companies.
Formula: LET(query1,SUMMARIZE(C1,SUMX(A1)),FILTER(query1,CHOOSECOLS(query1,3)>=2))
Formula2: LET(query1,SUMMARIZE(C2:C20,SUMX(A2:A20)),FILTER(query1,CHOOSECOLS(query1,3)>=2))
Level: hard
Question: The number of companies in usa.
Formula: SUMIFS(A1,C1,"usa")
Formula2: SUMIFS(A2:A20,C2:C20,"usa")
Level: easy
Question: Each company's id, headquarter and industry
Formula: UNIQUE(HSTACK(C1,D1,A1))
Formula2: UNIQUE(HSTACK(C2:C20,D2:D20,A2:A20))
Level: easy
Question: Banking and retailing companies' names and ids.
Formula: LET(query1,FILTER(A1:H1,(D1="retailing")+(D1="banking")),UNIQUE(CHOOSECOLS(query1,2,1)))
Formula2: LET(query1,FILTER(A2:H20,(D2:D20="retailing")+(D2:D20="banking")),UNIQUE(CHOOSECOLS(query1,2,1)))
Level: hard
Question: Compare the number of companies at different headquarters.
Formula: SUMMARIZE(C1,DCOUNTX(A1))
Formula2: SUMMARIZE(C2:C20,DCOUNTX(A2:A20))
Level: easy
Question: Which headquarters have at least 2 companies？
Formula: LET(query1,SUMMARIZE(C1,SUMX(A1)),FILTER(query1,CHOOSECOLS(query1,3)>=2))
Formula2: LET(query1,SUMMARIZE(C2:C20,SUMX(A2:A20)),FILTER(query1,CHOOSECOLS(query1,3)>=2))
Level: hard
Question: The ids, headquarters and industries of each company.
Formula: UNIQUE(HSTACK(C1,D1,A1))
Formula2: UNIQUE(HSTACK(C2:C20,D2:D20,A2:A20))
Level: easy
Question: The names and ids of the companies in the industries of banking and retailing.
Formula: LET(query1,FILTER(A1:H1,(D1="retailing")+(D1="banking")),UNIQUE(CHOOSECOLS(query1,2,1)))
Formula2: LET(query1,FILTER(A2:H20,(D2:D20="retailing")+(D2:D20="banking")),UNIQUE(CHOOSECOLS(query1,2,1)))
Level: hard