Table:
0
A
B
C
D
E
F
1
party id
minister
took office
left office
region id
party name
2
1
Dr. Kwame Nkrumah (MP)
9/1/1957
10/1/1958
1
Convention Peoples Party
3
2
Kojo Botsio (MP)
9/1/1958
10/1/1959
2
Progress Party
4
3
Ebenezer Ako-Adjei (MP)
9/1/1959
10/1/1960
3
3
5
4
Imoru Egala (MP)
9/1/1960
196-10-11
4
Convention Union Party
6
5
Ebenezer Ako-Adjei (MP)
9/1/1961
10/1/1962
5
Sinefine Party

Questions and formulas:
Question: How many parties do we have?
Formula: ROWS(UNIQUE(F1))
Formula2: ROWS(UNIQUE(F2:F6))
Level: easy
Question: Who are the ministers, when did they take office, and when did they leave office, ordered by when they left office?
Formula: SORTBY(CHOOSE({1,2,3},B1,C1,D1),D1,1)
Formula2: SORTBY(CHOOSE({1,2,3},B2:B6,C2:C6,D2:D6),D2:D6,1)
Level: easy
Question: Show the minister who took office after 1961 or before 1959.
Formula: FILTER(B1,(C1>1961)+(C1<1959))
Formula2: FILTER(B2:B6,(C2:C6>1961)+(C2:C6<1959))
Level: easy
Question: Who are the ministers who took office after 1961 or before 1959?
Formula: FILTER(B1,(C1>1961)+(C1<1959))
Formula2: FILTER(B2:B6,(C2:C6>1961)+(C2:C6<1959))
Level: easy
Question: Show all ministers who do not belong to Progress Party.
Formula: FILTER(B1,F1<>"Progress Party")
Formula2: FILTER(B2:B6,F2:F6<>"Progress Party")
Level: easy
Question: Which ministers are not a part of the Progress Party?
Formula: FILTER(B1,F1<>"Progress Party")
Formula2: FILTER(B2:B6,F2:F6<>"Progress Party")
Level: easy
Question: Show all ministers and parties they belong to in descending order of the time they took office.
Formula: SORTBY(CHOOSE({1,2},B1,F1),C1,-1)
Formula2: SORTBY(CHOOSE({1,2},B2:B6,F2:F6),C2:C6,-1)
Level: easy
Question: Who are the ministers and what parties do they belong to, listed descending by the times they took office?
Formula: SORTBY(CHOOSE({1,2},B1,F1),C1,-1)
Formula2: SORTBY(CHOOSE({1,2},B2:B6,F2:F6),C2:C6,-1)
Level: easy
Question: how many parties?
Formula: SUM(A1)
Formula2: SUM(A2:A6)
Level: easy
Question: Each minister's time of leaving office in chronological order with their corresponding time of taking office.
Formula: SORT(UNIQUE(HSTACK(B1,C1,D1)), 3, 1)
Formula2: SORT(UNIQUE(HSTACK(B2:B6,C2:C6,D2:D6)), 3, 1)
Level: medium
Question: ministers who entered office after 1961 or before 1959
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,(Year(C1)<1959)+(Year(C1)>1961)),2))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F6,(Year(C1)<1959)+(Year(C1)>1961)),2))
Level: medium
Question: show all ministers who took office before 1959 or after 1961
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,(Year(C1)<1959)+(Year(C1)>1961)),2))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F6,(Year(C1)<1959)+(Year(C1)>1961)),2))
Level: medium
Question: The ministers of all parties apart from the Progress Party.
Formula: LET(query1,FILTER(A1:F1,F1<>"progress party"),UNIQUE(CHOOSECOLS(query1,2,1)))
Formula2: LET(query1,FILTER(A2:F6,F2:F6<>"progress party"),UNIQUE(CHOOSECOLS(query1,2,1)))
Level: hard
Question: all ministers excluding those from the progress party
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,F1<>"progress party"),2))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F6,F2:F6<>"progress party"),2))
Level: medium
Question: Times of taking office from the latest to earliest for ministers among all parties and the corresponding party ids.
Formula: SORT(UNIQUE(HSTACK(C1,B1,A1)), 1, -1)
Formula2: SORT(UNIQUE(HSTACK(C2:C6,B2:B6,A2:A6)), 1, -1)
Level: medium
Question: the number of parties?
Formula: SUM(A1)
Formula2: SUM(A2:A6)
Level: easy
Question: The time of leaving office from earliest to latest and corresponding time of taking office for each minister.
Formula: SORT(UNIQUE(HSTACK(B1,C1,D1)), 3, 1)
Formula2: SORT(UNIQUE(HSTACK(B2:B6,C2:C6,D2:D6)), 3, 1)
Level: medium
Question: the ministers who assumed office after 1961 or before 1959
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,(Year(C1)<1959)+(Year(C1)>1961)),2))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F6,(Year(C1)<1959)+(Year(C1)>1961)),2))
Level: medium
Question: the ministers who took office before 1959 or after 1961
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,(Year(C1)<1959)+(Year(C1)>1961)),2))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F6,(Year(C1)<1959)+(Year(C1)>1961)),2))
Level: medium
Question: The ministers of all parties other than the Progress Party.
Formula: LET(query1,FILTER(A1:F1,F1<>"progress party"),UNIQUE(CHOOSECOLS(query1,2,1)))
Formula2: LET(query1,FILTER(A2:F6,F2:F6<>"progress party"),UNIQUE(CHOOSECOLS(query1,2,1)))
Level: hard
Question: the ministers who are not from progress party
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,F1<>"progress party"),2))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F6,F2:F6<>"progress party"),2))
Level: medium