Table:
0
A
B
C
D
E
F
G
1
card id
customer id
card type code
card number
date valid from
date valid to
other card details
2
1
14
Credit
4.5606E+12
4/17/2011 9:05
3/7/2018 17:06
5.56792E+15
3
2
9
Credit
4.85945E+15
5/22/2012 2:05
2/25/2018 15:43
4.53933E+12
4
3
6
Debit
3.48237E+14
8/1/2014 14:26
3/24/2018 15:29
4.91621E+12
5
4
15
Credit
4.48546E+12
11/5/2009 9:26
3/19/2018 5:34
5.29613E+15
6
5
13
Credit
5.12225E+15
12/21/2015 22:07
3/22/2018 8:31
5.38864E+15
7
6
10
Debit
5.10223E+15
1/1/2017 13:34
3/11/2018 1:12
5.51359E+15
8
7
9
Credit
4.71667E+12
12/11/2016 3:01
3/15/2018 6:27
6.01177E+15
9
8
12
Credit
6.01123E+15
9/17/2016 13:31
3/24/2018 0:38
5.42869E+15
10
9
3
Debit
4.92959E+12
3/27/2015 2:01
3/12/2018 2:16
5.30702E+15
11
10
10
Debit
4.53249E+12
6/15/2011 23:10
3/17/2018 21:27
5.57115E+15
12
11
8
Debit
4.70795E+12
11/17/2013 2:58
3/14/2018 14:00
3.77853E+14
13
12
3
Debit
4.9299E+15
5/9/2015 4:05
3/16/2018 16:00
4.55614E+12
14
13
2
Credit
5.48485E+15
8/20/2008 17:59
3/20/2018 2:08
4.91649E+12
15
14
5
Debit
4.92938E+12
5/23/2013 7:55
3/11/2018 6:05
4.48526E+15
16
15
2
Debit
3.45475E+14
7/3/2014 20:19
2/28/2018 22:26
4.71685E+15

Questions and formulas:
Question: the number of customers of each card and its card id
Formula: SUMMARIZE(A1,SUMX(B1))
Formula2: SUMMARIZE(A2:A16,SUMX(B2:B16))
Level: easy
Question: Total count of customers and cards respectively
Formula: HSTACK(SUM(B1), SUM(A1))
Formula2: HSTACK(SUM(B2:B16), SUM(A2:A16))
Level: medium
Question: the date of validation and date of expiration for the card 4560596484842
Formula: LET(query1,SUMMARIZE(HSTACK(E1,F1),SUMX(D1)),FILTER(query1,CHOOSECOLS(query1,3)=4560596484842))
Formula2: LET(query1,SUMMARIZE(HSTACK(E2:E16,F2:F16),SUMX(D2:D16)),FILTER(query1,CHOOSECOLS(query1,3)=4560596484842))
Level: hard
Question: how many debit cards do we have information for?
Formula: SUMIFS(A1,C1,"debit")
Formula2: SUMIFS(A2:A16,C2:C16,"debit")
Level: easy
Question: Number of debit card paying customers.
Formula: SUMIFS(B1,C1,"debit")
Formula2: SUMIFS(B2:B16,C2:C16,"debit")
Level: easy
Question: How many cards does each customer have?
Formula: SUMMARIZE(B1,SUMX(A1))
Formula2: SUMMARIZE(B2:B16,SUMX(A2:A16))
Level: easy
Question: Which customer has the most cards?
Formula: TAKE(SORT(SUMMARIZE(B1,SUMX(A1)), 2, -1), 1)
Formula2: TAKE(SORT(SUMMARIZE(B2:B16,SUMX(A2:A16)), 2, -1), 1)
Level: hard
Question: how many cards under each type?
Formula: SUMMARIZE(C1,SUMX(A1))
Formula2: SUMMARIZE(C2:C16,SUMX(A2:A16))
Level: easy
Question: the number of cards for all different types.
Formula: SUMMARIZE(C1,DCOUNTX(A1))
Formula2: SUMMARIZE(C2:C16,DCOUNTX(A2:A16))
Level: easy
Question: Most common card 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: Card types with at least 5 cards
Formula: LET(query1,SUMMARIZE(C1,SUMX(A1)),FILTER(query1,CHOOSECOLS(query1,3)>=5))
Formula2: LET(query1,SUMMARIZE(C2:C16,SUMX(A2:A16)),FILTER(query1,CHOOSECOLS(query1,3)>=5))
Level: hard
Question: Which type has at least 5 cards?
Formula: LET(query1,SUMMARIZE(C1,SUMX(A1)),FILTER(query1,CHOOSECOLS(query1,3)>=5))
Formula2: LET(query1,SUMMARIZE(C2:C16,SUMX(A2:A16)),FILTER(query1,CHOOSECOLS(query1,3)>=5))
Level: hard
Question: How many customers use same card types?
Formula: SUMMARIZE(C1,SUMX(B1))
Formula2: SUMMARIZE(C2:C16,SUMX(B2:B16))
Level: easy
Question: All card type codes
Formula: UNIQUE(C1)
Formula2: UNIQUE(C2:C16)
Level: easy
Question: Any card type codes?
Formula: UNIQUE(C1)
Formula2: UNIQUE(C2:C16)
Level: easy
Question: total number of card types
Formula: ROWS(UNIQUE(C1))
Formula2: ROWS(UNIQUE(C2:C16))
Level: easy
Question: the number of card type codes.
Formula: ROWS(UNIQUE(C1))
Formula2: ROWS(UNIQUE(C2:C16))
Level: easy
Question: How many customers and cards respectively?
Formula: HSTACK(SUM(B1), SUM(A1))
Formula2: HSTACK(SUM(B2:B16), SUM(A2:A16))
Level: medium
Question: how many debit cards?
Formula: SUMIFS(A1,C1,"debit")
Formula2: SUMIFS(A2:A16,C2:C16,"debit")
Level: easy
Question: How many customers pay in debit card?
Formula: SUMIFS(B1,C1,"debit")
Formula2: SUMIFS(B2:B16,C2:C16,"debit")
Level: easy
Question: The customer who has the most cards.
Formula: TAKE(SORT(SUMMARIZE(B1,SUMX(A1)), 2, -1), 1)
Formula2: TAKE(SORT(SUMMARIZE(B2:B16,SUMX(A2:A16)), 2, -1), 1)
Level: hard
Question: The card type with the most cards.
Formula: TAKE(SORT(SUMMARIZE(C1,SUMX(A1)), 2, -1), 1)
Formula2: TAKE(SORT(SUMMARIZE(C2:C16,SUMX(A2:A16)), 2, -1), 1)
Level: hard
Question: the number of customers using each card.
Formula: SUMMARIZE(C1,SUMX(B1))
Formula2: SUMMARIZE(C2:C16,SUMX(B2:B16))
Level: easy
Question: the card type code
Formula: UNIQUE(C1)
Formula2: UNIQUE(C2:C16)
Level: easy
Question: how many card types?
Formula: ROWS(UNIQUE(C1))
Formula2: ROWS(UNIQUE(C2:C16))
Level: easy