Table:
0
A
B
C
D
E
F
G
H
1
apartment id
building id
apartment type code
apartment number
bathroom count
bedroom count
room count
bed count
2
1
808
Flat
Suite 645
1
3
7
6
3
2
624
Flat
Apt. 585
2
4
5
8
4
3
225
Studio
Apt. 908
1
6
7
12
5
4
225
Duplex
Suite 749
1
5
8
5
6
5
744
Flat
Suite 307
2
4
9
6
7
6
191
Studio
Apt. 187
3
5
9
8
8
7
790
Studio
Suite 088
2
4
6
4
9
8
153
Flat
Suite 693
2
3
9
6
10
9
624
Studio
Apt. 940
1
4
8
8
11
10
225
Duplex
Apt. 859
2
3
6
6
12
11
734
Flat
Apt. 794
1
5
3
10
13
12
673
Duplex
Apt. 477
2
6
3
11
14
13
744
Duplex
Apt. 411
2
5
9
6
15
14
225
Flat
Apt. 837
2
4
8
8
16
15
790
Duplex
Suite 634
3
6
8
9

Questions and formulas:
Question: What is the average number of bedrooms of all apartments?
Formula: AVERAGE(F1)
Formula2: AVERAGE(F2:F16)
Level: easy
Question: Find the average number of bedrooms of all the apartments.
Formula: AVERAGE(F1)
Formula2: AVERAGE(F2:F16)
Level: easy
Question: Return the apartment number and the number of rooms for each apartment.
Formula: CHOOSE({1,2},D1,G1)
Formula2: CHOOSE({1,2},D2:D16,G2:G16)
Level: easy
Question: What are the apartment number and the room count of each apartment?
Formula: CHOOSE({1,2},D1,G1)
Formula2: CHOOSE({1,2},D2:D16,G2:G16)
Level: easy
Question: What is the average number of rooms of apartments with type code "Studio"?
Formula: AVERAGE(FILTER(G1,C1="Studio"))
Formula2: AVERAGE(FILTER(G2:G16,C2:C16="Studio"))
Level: easy
Question: Return the apartment numbers of the apartments with type code "Flat".
Formula: FILTER(D1,C1="Flat")
Formula2: FILTER(D2:D16,C2:C16="Flat")
Level: easy
Question: Which apartments have type code "Flat"? Give me their apartment numbers.
Formula: FILTER(D1,C1="Flat")
Formula2: FILTER(D2:D16,C2:C16="Flat")
Level: easy
Question: Return all the apartment numbers sorted by the room count in ascending order.
Formula: SORTBY(D1,G1,1)
Formula2: SORTBY(D2:D16,G2:G16,1)
Level: easy
Question: Sort the apartment numbers in ascending order of room count.
Formula: SORTBY(D1,G1,1)
Formula2: SORTBY(D2:D16,G2:G16,1)
Level: easy
Question: Return the apartment number with the largest number of bedrooms.
Formula: LET(a,SORTBY(D1,F1,-1),FILTER(a,SEQUENCE(ROWS(a))<=1))
Formula2: LET(a,SORTBY(D2:D16,F2:F16,-1),FILTER(a,SEQUENCE(ROWS(a))<=1))
Level: hard
Question: What are the top three apartment types in terms of the average room count? Give me the
Formula: TAKE(SORT(SUMMARIZE(C1,AVERAGEX(G1)), 2, -1), 3)
Formula2: TAKE(SORT(SUMMARIZE(C2:C16,AVERAGEX(G2:G16)), 2, -1), 3)
Level: hard
Question: Which apartment type code is the most common with more than one bathroom?
Formula: TAKE(SORT(LET(query1,SUMMARIZE(C1,COUNTX(C1),SUMX(E1)),FILTER(query1,CHOOSECOLS(query1,3)>1)), 2, -1), 1)
Formula2: TAKE(SORT(LET(query1,SUMMARIZE(C2:C16,COUNTX(C2:C16),SUMX(E2:E16)),FILTER(query1,CHOOSECOLS(query1,3)>1)), 2, -1), 1)
Level: hard
Question: apartment numbers and ids for different flats
Formula: LET(query1,FILTER(A1:H1,C1="flat"),UNIQUE(CHOOSECOLS(query1,4,1)))
Formula2: LET(query1,FILTER(A2:H16,C2:C16="flat"),UNIQUE(CHOOSECOLS(query1,4,1)))
Level: hard
Question: the ids and numbers of apartments for flats
Formula: LET(query1,FILTER(A1:H1,C1="flat"),UNIQUE(CHOOSECOLS(query1,1,4)))
Formula2: LET(query1,FILTER(A2:H16,C2:C16="flat"),UNIQUE(CHOOSECOLS(query1,1,4)))
Level: hard
Question: Which apartment number has the most bedrooms?
Formula: TAKE(SORT(SUMMARIZE(D1,SUMX(F1)), 2, -1), 1)
Formula2: TAKE(SORT(SUMMARIZE(D2:D16,SUMX(F2:F16)), 2, -1), 1)
Level: hard
Question: 3 types of apartments equipped with most rooms on average.
Formula: TAKE(SORT(SUMMARIZE(HSTACK(C1,A1),AVERAGEX(G1)), 3, -1), 3)
Formula2: TAKE(SORT(SUMMARIZE(HSTACK(C2:C16,A2:A16),AVERAGEX(G2:G16)), 3, -1), 3)
Level: hard
Question: the apartment numbers and ids of flats.
Formula: LET(query1,FILTER(A1:H1,C1="flat"),UNIQUE(CHOOSECOLS(query1,4,1)))
Formula2: LET(query1,FILTER(A2:H16,C2:C16="flat"),UNIQUE(CHOOSECOLS(query1,4,1)))
Level: hard
Question: What's the no. of apartment having most bedrooms?
Formula: TAKE(SORT(SUMMARIZE(D1,SUMX(F1)), 2, -1), 1)
Formula2: TAKE(SORT(SUMMARIZE(D2:D16,SUMX(F2:F16)), 2, -1), 1)
Level: hard