Table:
0
A
B
C
D
E
F
1
Year
Mission type
Shogun
Ryūkyūan King
Lead Envoy
Number in entourage
2
1634
Congratulation & Gratitude
Tokugawa Iemitsu
Shō Hō
Princes Tamagusuku, Kin, Sashiki
Unknown
3
1644
Congratulation & Gratitude
Tokugawa Iemitsu
Shō Ken
Princes Kin, Kunigami
70
4
1649
Gratitude
Tokugawa Iemitsu
Shō Shitsu
Prince Gushikawa Chōei
63
5
1653
Congratulation
Tokugawa Ietsuna
Shō Shitsu
Prince Kunigami
71
6
1671
Gratitude
Tokugawa Ietsuna
Shō Tei
Prince Kin
74
7
1682
Congratulation
Tokugawa Tsunayoshi
Shō Tei
Prince Nago
94
8
1710
Congratulation & Gratitude
Tokugawa Ienobu
Shō Eki
Princes Miri, Tomigusuku
168
9
1714
Congratulation & Gratitude
Tokugawa Ietsugu
Shō Kei
Princes Kin, Yonagusuku
170
10
1718
Congratulation
Tokugawa Yoshimune
Shō Kei
Prince Goeku
94
11
1748
Congratulation
Tokugawa Ieshige
Shō Kei
Prince Gushikawa
98
12
1752
Gratitude
Tokugawa Ieshige
Shō Boku
Prince Nakijin
94
13
1764
Congratulation
Tokugawa Ieharu
Shō Boku
Prince Yomitanzan
96
14
1790
Congratulation
Tokugawa Ienari
Shō Boku
Prince Ginowan
96
15
1796
Gratitude
Tokugawa Ienari
Shō On
Prince Ōgimi
97
16
1806
Gratitude
Tokugawa Ienari
Shō Kō
Prince Yomitanzan
97
17
1832
Gratitude
Tokugawa Ienari
Shō Iku
Prince Tomigusuku
78
18
1842
Congratulation
Tokugawa Ieyoshi
Shō Iku
Prince Urasoe
99
19
1850
Gratitude
Tokugawa Ieyoshi
Shō Tai
Prince Tamakawa
99

Questions and formulas:
Question: What is the latest year of a gratitude type mission with 99 in the entourage?
Formula: MAX(FILTER(A1, (F1=99)*(B1="gratitude")))
Formula2: MAX(FILTER(A2:A19, (F2:F19=99)*(B2:B19="gratitude")))
Level: easy
Question: Who was the lead envoy of the mission with the Ryūkyūan King shō eki?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,D1="shō eki"),5))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F19,D2:D19="shō eki"),5))
Level: medium
Question: Who was the lead envoy of the congratulation mission in 1718 with the Ryūkyūan King shō kei?
Formula: LET(query1,LET(query1,FILTER(A1:F1,(D1="shō kei")*(B1="congratulation")),SUMMARIZE(CHOOSECOLS(query1,5),SUMX(CHOOSECOLS(query1,1)))),FILTER(query1,CHOOSECOLS(query1,2)=1718))
Formula2: LET(query1,LET(query1,FILTER(A2:F19,(D2:D19="shō kei")*(B2:B19="congratulation")),SUMMARIZE(CHOOSECOLS(query1,5),SUMX(CHOOSECOLS(query1,1)))),FILTER(query1,CHOOSECOLS(query1,2)=1718))
Level: hard
Question: Who was the lead envoy with the Ryūkyūan King shō kō?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,D1="shō kō"),5))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F19,D2:D19="shō kō"),5))
Level: medium