3.9 序列中所有集合成员的交集

 

有各个国家的语言人口占比表,其部分数据如下:

CountryCode Language Percentage
England English 90%
America English 70%
Canada English 60%
Russia English 10%
France English 5%
England French 3%
America French 3%
Canada French 30%
Russia French 3%
France French 95%
England Spanish 1%
America Spanish 20%
Canada Spanish 1%
Russia Spanish 0.01%
France Spanish 0.05%

请列出英语人口、法语人口、西班牙语人口分别超过 0.3%、0.2%、0.1% 的国家代码。
脚本:

A
1 =connect(“mysql”)
2 [English,French,Spanish]
3 [0.3,0.2,0.1]
4 =A2.(A1.query@i(“select countrycode from world.countrylanguage where language=? and percentage>?”,~,A3(#)))
5 >A1.close()
6 =A4.isect()

A4 按次序依次查询英语人口超 0.3%、法语人口超 0.2%、西班牙语超 0.1% 的国家代码,并转成序列。query() 函数的 @i 选项表示当选出结果只有一列时,直接返回成序列
A5 A4 中所有序列交集