Table:
0
A
B
C
D
E
1
furniture id
name
num of component
market rate
furniture
2
1
Billiard table
14
52.5
3
2
Chabudai
4
40.0
4
3
Bookcase
6
1.0
5
4
Hatstand
5
0.5
6
5
Bench
5
3.5
7
6
Four-poster bed
3
2.0
8
7
Dining set
12
0.5

Questions and formulas:
Question: Return the name and id of the furniture with the highest market rate.
Formula: LET(a,SORTBY(CHOOSE({1,2},B1,A1),D1,-1),FILTER(a,SEQUENCE(ROWS(a))<=1))
Formula2: LET(a,SORTBY(CHOOSE({1,2},B2:B8,A2:A8),D2:D8,-1),FILTER(a,SEQUENCE(ROWS(a))<=1))
Level: hard
Question: find the total market rate of the furnitures that have the top 2 market shares.
Formula: LET(a,SORTBY(SUM(D1),D1,-1),FILTER(a,SEQUENCE(ROWS(a))<=2))
Formula2: LET(a,SORTBY(SUM(D2:D8),D2:D8,-1),FILTER(a,SEQUENCE(ROWS(a))<=2))
Level: hard
Question: Name and id of the furniture which occupied the most market.
Formula: LET(a,HSTACK(B1,A1,E1),b,E1,c,CHOOSECOLS(TAKE(SORT(SUMMARIZE(E1,SUMX(D1)), 2, -1), 1),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Formula2: LET(a,HSTACK(B2:B8,A2:A8,E2:E8),b,E2:E8,c,CHOOSECOLS(TAKE(SORT(SUMMARIZE(E2:E8,SUMX(D2:D8)), 2, -1), 1),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Level: hard
Question: Name and id of the furniture which occupied most in market.
Formula: LET(a,HSTACK(B1,A1,E1),b,E1,c,CHOOSECOLS(TAKE(SORT(SUMMARIZE(E1,SUMX(D1)), 2, -1), 1),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Formula2: LET(a,HSTACK(B2:B8,A2:A8,E2:E8),b,E2:E8,c,CHOOSECOLS(TAKE(SORT(SUMMARIZE(E2:E8,SUMX(D2:D8)), 2, -1), 1),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Level: hard