Table:
0
A
B
C
D
E
F
1
policy id
customer id
policy type code
start date
end date
policies
2
125
808
Deputy
2018-02-10 08:56:30
2018-03-18 09:17:26
3
151
380
Jurisdiction
2017-12-20 06:02:31
2017-09-16 22:04:13
4
287
334
Jurisdiction
2017-03-16 18:16:52
2017-11-24 06:36:51
5
299
857
Uniformed
2018-03-13 12:30:19
2018-01-22 05:24:10
6
507
858
Uniformed
2017-03-19 03:11:19
2017-11-01 00:41:27
7
518
808
Uniformed
2016-05-11 14:56:17
2018-03-15 05:02:00
8
626
435
Uniformed
2016-05-14 19:09:36
2018-01-18 06:17:36
9
628
430
Deputy
2018-09-19 17:22:07
2018-01-01 23:58:06
10
703
380
Deputy
2016-06-04 00:10:01
2018-01-19 22:45:33
11
708
252
Normal
2018-07-21 10:36:53
2018-03-07 13:52:47
12
768
588
Uniformed
2017-01-01 01:48:08
2017-09-30 03:16:49
13
773
334
Uniformed
2017-02-11 01:53:11
2018-01-15 03:23:05
14
780
435
Uniformed
2016-08-02 01:46:25
2018-03-03 18:36:22
15
801
380
Uniformed
2018-09-05 22:15:23
2018-03-17 10:16:59
16
936
994
Jurisdiction
2016-07-23 04:08:35
2017-10-07 08:29:25

Questions and formulas:
Question: Which type of policy code is most frequent used?
Formula: TAKE(SORT(SUMMARIZE(C1,COUNTX(C1)), 2, -1), 1)
Formula2: TAKE(SORT(SUMMARIZE(C2:C16,COUNTX(C2:C16)), 2, -1), 1)
Level: hard
Question: Find the type code of the most frequently used policy.
Formula: LET(a,HSTACK(C1,F1),b,F1,c,CHOOSECOLS(TAKE(SORT(SUMMARIZE(F1,COUNTX(F1)), 2, -1), 1),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Formula2: LET(a,HSTACK(C2:C16,F2:F16),b,F2:F16,c,CHOOSECOLS(TAKE(SORT(SUMMARIZE(F2:F16,COUNTX(F2:F16)), 2, -1), 1),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Level: hard
Question: Find all the policy types that are used by more than 2 customers.
Formula: LET(query1,SUMMARIZE(C1,SUMX(B1)),FILTER(query1,CHOOSECOLS(query1,3)>2))
Formula2: LET(query1,SUMMARIZE(C2:C16,SUMX(B2:B16)),FILTER(query1,CHOOSECOLS(query1,3)>2))
Level: hard
Question: Which types of policy are chosen by more than 2 customers? Give me the policy type codes.
Formula: LET(query1,SUMMARIZE(HSTACK(C1,F1),SUMX(B1)),FILTER(query1,CHOOSECOLS(query1,4)>2))
Formula2: LET(query1,SUMMARIZE(HSTACK(C2:C16,F2:F16),SUMX(B2:B16)),FILTER(query1,CHOOSECOLS(query1,4)>2))
Level: hard
Question: Find the number of records of each policy type and its type code.
Formula: SUMMARIZE(C1,COUNTX(C1))
Formula2: SUMMARIZE(C2:C16,COUNTX(C2:16))
Level: easy
Question: Which policy type is the most common?
Formula: TAKE(SORT(SUMMARIZE(C1,COUNTX(C1)), 2, -1), 1)
Formula2: TAKE(SORT(SUMMARIZE(C2:C16,COUNTX(C2:C16)), 2, -1), 1)
Level: hard
Question: Most frequently used policy type code
Formula: TAKE(SORT(SUMMARIZE(C1,COUNTX(C1)), 2, -1), 1)
Formula2: TAKE(SORT(SUMMARIZE(C2:C16,COUNTX(C2:C16)), 2, -1), 1)
Level: hard
Question: Which type codes have at least 3 customers used? 
Formula: LET(query1,SUMMARIZE(C1,SUMX(B1)),FILTER(query1,CHOOSECOLS(query1,3)>=3))
Formula2: LET(query1,SUMMARIZE(C2:C16,SUMX(B2:B16)),FILTER(query1,CHOOSECOLS(query1,3)>=3))
Level: hard
Question: The policy type codes chosen by over 2 customers along with the policies information.
Formula: LET(query1,SUMMARIZE(HSTACK(C1,F1),SUMX(B1)),FILTER(query1,CHOOSECOLS(query1,4)>2))
Formula2: LET(query1,SUMMARIZE(HSTACK(C2:C16,F2:F16),SUMX(B2:B16)),FILTER(query1,CHOOSECOLS(query1,4)>2))
Level: hard
Question: How many different policies do we have?
Formula: ROWS(UNIQUE(F1))
Formula2: ROWS(UNIQUE(F2:F16))
Level: easy
Question: The most common policy type.
Formula: TAKE(SORT(SUMMARIZE(C1,COUNTX(C1)), 2, -1), 1)
Formula2: TAKE(SORT(SUMMARIZE(C2:C16,COUNTX(C2:C16)), 2, -1), 1)
Level: hard
Question: The type code of the most frequently used policy.
Formula: LET(a,HSTACK(C1,F1),b,F1,c,CHOOSECOLS(TAKE(SORT(SUMMARIZE(F1,COUNTX(F1)), 2, -1), 1),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Formula2: LET(a,HSTACK(C2:C16,F2:F16),b,F2:F16,c,CHOOSECOLS(TAKE(SORT(SUMMARIZE(F2:F16,COUNTX(F2:F16)), 2, -1), 1),1),UNIQUE(FILTER(a,NOT(ISNA(XLOOKUP(b,c,c))))))
Level: hard
Question: The type codes used by more than 2 customers.
Formula: LET(query1,SUMMARIZE(C1,SUMX(B1)),FILTER(query1,CHOOSECOLS(query1,3)>2))
Formula2: LET(query1,SUMMARIZE(C2:C16,SUMX(B2:B16)),FILTER(query1,CHOOSECOLS(query1,3)>2))
Level: hard
Question: How many types of policies?
Formula: SUMMARIZE(F1,DCOUNTX(C1))
Formula2: SUMMARIZE(F2:F16,DCOUNTX(C2:C16))
Level: easy