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: Show the number of customer cards.
Formula: SUMMARIZE(A1,SUMX(B1))
Formula2: SUMMARIZE(A2:A16,SUMX(B2:B16))
Level: easy
Question: How many customer and cards are there?
Formula: HSTACK(SUM(B1), SUM(A1))
Formula2: HSTACK(SUM(B2:B16), SUM(A2:A16))
Level: medium
Question: Show the date valid from and the date valid to for the card with card number '4560596484842'.
Formula: CHOOSE({1,2},FILTER(E1,D1="4560596484842"),FILTER(F1,D1="4560596484842"))
Formula2: CHOOSE({1,2},FILTER(E2:E16,D2:D16="4560596484842"),FILTER(F2:F16,D2:D16="4560596484842"))
Level: medium
Question: How many debit cards do we have?
Formula: SUMIFS(A1,C1,"debit")
Formula2: SUMIFS(A2:A16,C2:C16,"debit")
Level: easy
Question: Show all customer ids and the number of cards owned by each customer.
Formula: SUMMARIZE(B1,SUMX(A1))
Formula2: SUMMARIZE(B2:B16,SUMX(A2:A16))
Level: easy
Question: What is the customer id with most number of cards, and how many does he have?
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: Show all card type codes and the number of cards in each type.
Formula: SUMMARIZE(C1,SUMX(A1))
Formula2: SUMMARIZE(C2:C16,SUMX(A2:A16))
Level: easy
Question: What are the different card types, and how many cards are there of each?
Formula: SUMMARIZE(C1,SUMX(A1))
Formula2: SUMMARIZE(C2:C16,SUMX(A2:A16))
Level: easy
Question: What is the card type code with most number of 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: Show card type codes 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: What are the codes of card types that have 5 or more 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: What are the different card type codes, and how many different customers hold each type?
Formula: SUMMARIZE(C1,DCOUNTX(B1))
Formula2: SUMMARIZE(C2:C16,DCOUNTX(B2:B16))
Level: easy
Question: Show all card type codes.
Formula: UNIQUE(C1)
Formula2: UNIQUE(C2:C16)
Level: easy
Question: What are the different card type codes?
Formula: UNIQUE(C1)
Formula2: UNIQUE(C2:C16)
Level: easy
Question: Show the number of card types.
Formula: ROWS(UNIQUE(C1))
Formula2: ROWS(UNIQUE(C2:C16))
Level: easy
Question: How many different card types are there?
Formula: ROWS(UNIQUE(C1))
Formula2: ROWS(UNIQUE(C2:C16))
Level: easy