Table:
0
A
B
C
D
E
F
G
H
I
1
customer id
customer name
account type
account balance
number of loans
credit score
branch id
state
customer
2
1
Mary
saving
2000
2
30
2
Utah
3
2
Jack
checking
1000
1
20
1
Texas
4
3
Owen
saving
800000
0
210
3
New York

Questions and formulas:
Question: List the name of all customers sorted by their account balance in ascending order.
Formula: SORTBY(B1,D1,1)
Formula2: SORTBY(B2:B4,D2:D4,1)
Level: easy
Question: What are the names of all customers, ordered by account balance?
Formula: SORTBY(B1,D1,1)
Formula2: SORTBY(B2:B4,D2:D4,1)
Level: easy
Question: How many distinct types of accounts are there?
Formula: ROWS(UNIQUE(C1))
Formula2: ROWS(UNIQUE(C2:C4))
Level: easy
Question: Count the number of different account types.
Formula: ROWS(UNIQUE(C1))
Formula2: ROWS(UNIQUE(C2:C4))
Level: easy
Question: Find the total account balance of each customer from Utah or Texas.
Formula: SUM(FILTER(D1,(H1="Utah")+(H1="Texas")))
Formula2: SUM(FILTER(D2:D4,(H2:H4="Utah")+(H2:H4="Texas")))
Level: easy
Question: What are the total account balances for each customer from Utah or Texas?
Formula: SUM(FILTER(D1,(H1="Utah")+(H1="Texas")))
Formula2: SUM(FILTER(D2:D4,(H2:H4="Utah")+(H2:H4="Texas")))
Level: easy
Question: Find the name of customer who has the lowest credit score.
Formula: LET(a,SORTBY(B1,F1,1),FILTER(a,SEQUENCE(ROWS(a))<=1))
Formula2: LET(a,SORTBY(B2:B4,F2:F4,1),FILTER(a,SEQUENCE(ROWS(a))<=1))
Level: hard
Question: What is the name of the customer with the worst credit score?
Formula: LET(a,SORTBY(B1,F1,1),FILTER(a,SEQUENCE(ROWS(a))<=1))
Formula2: LET(a,SORTBY(B2:B4,F2:F4,1),FILTER(a,SEQUENCE(ROWS(a))<=1))
Level: hard
Question: For each account type, find the average account balance of customers with credit score lower than 50.
Formula: LET(query1,SUMMARIZE(HSTACK(C1,I1),AVERAGEX(D1),SUMX(F1)),FILTER(query1,CHOOSECOLS(query1,4)<50))
Formula2: LET(query1,SUMMARIZE(HSTACK(C2:C4,I2:I4),AVERAGEX(D2:D4),SUMX(F2:F4)),FILTER(query1,CHOOSECOLS(query1,4)<50))
Level: hard
Question: What is the average account balance of customers with credit score below 50 for the different account types?
Formula: LET(query1,SUMMARIZE(HSTACK(I1,C1),AVERAGEX(D1),SUMX(F1)),FILTER(query1,CHOOSECOLS(query1,4)<50))
Formula2: LET(query1,SUMMARIZE(HSTACK(I2:I4,C2:C4),AVERAGEX(D2:D4),SUMX(F2:F4)),FILTER(query1,CHOOSECOLS(query1,4)<50))
Level: hard
Question: What is the total account balance for customers with a credit score of above 100 for the different states?
Formula: LET(query1,SUMMARIZE(HSTACK(I1,H1),SUMX(D1),SUMX(F1)),FILTER(query1,CHOOSECOLS(query1,4)>100))
Formula2: LET(query1,SUMMARIZE(HSTACK(I2:I4,H2:H4),SUMX(D2:D4),SUMX(F2:F4)),FILTER(query1,CHOOSECOLS(query1,4)>100))
Level: hard
Question: How many types of accounts?
Formula: ROWS(UNIQUE(C1))
Formula2: ROWS(UNIQUE(C2:C4))
Level: easy
Question: How many types of account?
Formula: ROWS(UNIQUE(C1))
Formula2: ROWS(UNIQUE(C2:C4))
Level: easy
Question: How many account types?
Formula: ROWS(UNIQUE(C1))
Formula2: ROWS(UNIQUE(C2:C4))
Level: easy