Table:
0
A
B
C
D
E
F
G
H
1
transaction id
investor id
transaction type code
date of transaction
amount of transaction
share count
other details
2
1
6
SALE
1988-09-16 19:02:51
302507.6996
8718572
3
2
18
PUR
1982-06-06 17:19:00
27.257
9
4
3
2
SALE
1979-04-27 06:03:59
48777.969
8580
5
4
14
PUR
2001-11-28 15:06:25
4.5263
8040
6
5
8
PUR
1977-08-17 13:13:30
0.0
930
7
6
19
PUR
1985-10-08 13:13:39
207484122.2796
2751
8
7
7
PUR
1990-12-02 09:03:38
822.803
1522
9
8
17
SALE
2004-01-18 20:37:50
78035671.4424
96178
10
9
20
PUR
1977-08-13 02:18:47
82057.207
11
10
2
SALE
1981-01-28 08:07:03
29.3534
1654756
12
11
3
SALE
2000-04-03 20:55:43
0.0
674529892
13
12
18
SALE
1983-11-01 17:57:27
1.0
587
14
13
3
SALE
2002-04-07 20:28:37
183.2
15
14
3
PUR
2002-09-13 03:04:56
0.0
630021
16
15
19
PUR
1997-12-30 05:05:40
8.9
93191

Questions and formulas:
Question: Show the maximum amount of transaction.
Formula: MAX(E1)
Formula2: MAX(E2:E16)
Level: easy
Question: What is the total share of transactions?
Formula: SUM(F1)
Formula2: SUM(F2:F16)
Level: easy
Question: Show all transaction ids with transaction code 'PUR'.
Formula: FILTER(A1,C1="PUR")
Formula2: FILTER(A2:A16,C2:C16="PUR")
Level: easy
Question: Show all dates of transactions whose type code is "SALE".
Formula: FILTER(D1,C1="SALE")
Formula2: FILTER(D2:D16,C2:C16="SALE")
Level: easy
Question: Show the average amount of transactions with type code "SALE".
Formula: AVERAGE(FILTER(E1,C1="SALE"))
Formula2: AVERAGE(FILTER(E2:E16,C2:C16="SALE"))
Level: easy
Question: Show the minimum amount of transactions whose type code is "PUR" and whose share count is bigger than 50.
Formula: MIN(FILTER(E1,(C1="PUR")*(F1>50)))
Formula2: MIN(FILTER(E2:E16,(C2:C16="PUR")*(F2:F16>50)))
Level: easy
Question: How many distinct transaction types are used in the transactions?
Formula: ROWS(UNIQUE(C1))
Formula2: ROWS(UNIQUE(C2:C16))
Level: easy
Question: Show the average share count of transactions for different investors.
Formula: SUMMARIZE(HSTACK(A1,B1),AVERAGEX(F1))
Formula2: SUMMARIZE(HSTACK(A2:A16,B2:B16),AVERAGEX(F2:F16))
Level: medium
Question: Show the average share count of transactions each each investor, ordered by average share count.
Formula: SORT(SUMMARIZE(HSTACK(A1,B1),AVERAGEX(F1)), 3, -1)
Formula2: SORT(SUMMARIZE(HSTACK(A2:A16,B2:B16),AVERAGEX(F2:F16)), 3, -1)
Level: hard
Question: Show the average amount of transactions for different investors.
Formula: SUMMARIZE(B1,AVERAGEX(E1))
Formula2: SUMMARIZE(B2:B16,AVERAGEX(E2:E16))
Level: easy
Question: Show the number of transactions for different investors.
Formula: SUMMARIZE(B1,DCOUNTX(A1))
Formula2: SUMMARIZE(B2:B16,DCOUNTX(A2:A16))
Level: easy