jtjt520j/cspider_for_chinese_llama2_1.3b huggingface dataset:
Schema: CREATE TABLE Activity (activity_name VARCHAR, actID VARCHAR), CREATE TABLE Faculty_participates_in (actID VARCHAR)
user: 有多少教职工参加每一项活动？返回活动名称和教职工人数。

assistant: SELECT T1.activity_name ,  count(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID  =  T2.actID GROUP BY T1.actID
Schema: CREATE TABLE Faculty (fname VARCHAR, FacID VARCHAR, lname VARCHAR, facID VARCHAR), CREATE TABLE Faculty_participates_in (facID VARCHAR)
user: 参加最多活动的教职工的姓名是什么？

assistant: SELECT  T1.fname ,  T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE Faculty (fname VARCHAR, FacID VARCHAR, lname VARCHAR, facID VARCHAR), CREATE TABLE Faculty_participates_in (facID VARCHAR)
user: 找出参与最多数量的活动的教员的名字和姓氏。

assistant: SELECT  T1.fname ,  T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE Activity (activity_name VARCHAR, actID VARCHAR), CREATE TABLE Faculty_participates_in (actID VARCHAR)
user: 教职工参与最多的活动名称是什么？

assistant: SELECT T1.activity_name FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID  =  T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE Activity (activity_name VARCHAR, actID VARCHAR), CREATE TABLE Faculty_participates_in (actID VARCHAR)
user: 哪些活动是教职工最多参加的活动？查出活动名称。

assistant: SELECT T1.activity_name FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID  =  T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE Student (StuID VARCHAR), CREATE TABLE Participates_in (StuID VARCHAR)
user: 显示不参与任何活动的学生的ID。

assistant: SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in
Schema: CREATE TABLE Student (StuID VARCHAR), CREATE TABLE Participates_in (StuID VARCHAR)
user: 没有参与任何活动的学生的ID是什么？

assistant: SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in
Schema: CREATE TABLE Participates_in (age INTEGER, StuID VARCHAR), CREATE TABLE Student (age INTEGER, StuID VARCHAR)
user: 显示所有20岁以下参加活动的学生ID 。

assistant: SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age  <  20
Schema: CREATE TABLE Participates_in (age INTEGER, StuID VARCHAR), CREATE TABLE Student (age INTEGER, StuID VARCHAR)
user: 参加至少一项活动的20岁以下学生的ID是什么？

assistant: SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age  <  20
Schema: CREATE TABLE Student (fname VARCHAR, lname VARCHAR, StuID VARCHAR), CREATE TABLE Participates_in (StuID VARCHAR)
user: 参加最多活动的学生的名字和姓氏是什么？

assistant: SELECT T1.fname ,  T1.lname FROM Student AS T1 JOIN Participates_in AS T2 ON T1.StuID  =  T2.StuID GROUP BY T1.StuID ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE Student (fname VARCHAR, lname VARCHAR, StuID VARCHAR), CREATE TABLE Participates_in (StuID VARCHAR)
user: 告诉我参加最多数量活动的学生的姓氏和姓氏。

assistant: SELECT T1.fname ,  T1.lname FROM Student AS T1 JOIN Participates_in AS T2 ON T1.StuID  =  T2.StuID GROUP BY T1.StuID ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE Activity (activity_name VARCHAR, actID VARCHAR), CREATE TABLE Participates_in (actID VARCHAR)
user: 参加最多数量活动的学生的姓氏和姓氏是什么？

assistant: SELECT T1.activity_name FROM Activity AS T1 JOIN Participates_in AS T2 ON T1.actID  =  T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE Activity (activity_name VARCHAR, actID VARCHAR), CREATE TABLE Participates_in (actID VARCHAR)
user: 找出学生参与人数最多的活动的名称。

assistant: SELECT T1.activity_name FROM Activity AS T1 JOIN Participates_in AS T2 ON T1.actID  =  T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE Faculty (lname VARCHAR, facID VARCHAR), CREATE TABLE Faculty_participates_in (actid VARCHAR, facID VARCHAR), CREATE TABLE activity (activity_name VARCHAR)
user: 找出正在玩“独木舟”或“皮划艇”的教职员的名字。

assistant: SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID JOIN activity AS T3 ON T2.actid  =  T2.actid WHERE T3.activity_name  =  "独木舟" OR T3.activity_name  =  "皮划艇"
Schema: CREATE TABLE Faculty (lname VARCHAR, facID VARCHAR), CREATE TABLE Faculty_participates_in (actid VARCHAR, facID VARCHAR), CREATE TABLE activity (activity_name VARCHAR)
user: 哪个教职员在玩“独木舟”或“皮划艇”？告诉我他们的名字。

assistant: SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID JOIN activity AS T3 ON T2.actid  =  T2.actid WHERE T3.activity_name  =  "独木舟" OR T3.activity_name  =  "皮划艇"
Schema: CREATE TABLE faculty (lname VARCHAR, rank VARCHAR), CREATE TABLE Faculty (lname VARCHAR, facID VARCHAR), CREATE TABLE Faculty_participates_in (actid VARCHAR, facID VARCHAR), CREATE TABLE activity (activity_name VARCHAR)
user: 找出不玩“独木舟”或“皮划艇”的“教授”的名字。

assistant: SELECT lname FROM faculty WHERE rank  =  "Professor" EXCEPT SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID JOIN activity AS T3 ON T2.actid  =  T2.actid WHERE T3.activity_name  =  "独木舟" OR T3.activity_name  =  "皮划艇"
Schema: CREATE TABLE faculty (lname VARCHAR, rank VARCHAR), CREATE TABLE Faculty (lname VARCHAR, facID VARCHAR), CREATE TABLE Faculty_participates_in (actid VARCHAR, facID VARCHAR), CREATE TABLE activity (activity_name VARCHAR)
user: 不把“独木舟”或“皮划艇”作为活动的“教授”的名字是什么？

assistant: SELECT lname FROM faculty WHERE rank  =  "Professor" EXCEPT SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID JOIN activity AS T3 ON T2.actid  =  T2.actid WHERE T3.activity_name  =  "独木舟" OR T3.activity_name  =  "皮划艇"
Schema: CREATE TABLE Faculty (lname VARCHAR, facID VARCHAR), CREATE TABLE Faculty_participates_in (actid VARCHAR, facID VARCHAR), CREATE TABLE activity (activity_name VARCHAR)
user: 找出参加“独木舟”和“皮划艇”运动的教职员的名字。

assistant: SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID JOIN activity AS T3 ON T2.actid  =  T2.actid WHERE T3.activity_name  =  "独木舟" INTERSECT SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID JOIN activity AS T3 ON T2.actid  =  T2.actid WHERE T3.activity_name  =  "皮划艇"
Schema: CREATE TABLE Faculty (lname VARCHAR, facID VARCHAR), CREATE TABLE Faculty_participates_in (actid VARCHAR, facID VARCHAR), CREATE TABLE activity (activity_name VARCHAR)
user: 那些同时玩“独木舟”和“皮划艇”的教职员叫什么名字？

assistant: SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID JOIN activity AS T3 ON T2.actid  =  T2.actid WHERE T3.activity_name  =  "独木舟" INTERSECT SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID JOIN activity AS T3 ON T2.actid  =  T2.actid WHERE T3.activity_name  =  "皮划艇"
Schema: CREATE TABLE participates_in (stuid VARCHAR), CREATE TABLE activity (actid VARCHAR, activity_name VARCHAR)
user: 找出参加“独木舟”和“皮划艇”运动的学生的ID。

assistant: SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid  =  T2.actid WHERE T2.activity_name  =  "独木舟" INTERSECT SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid  =  T2.actid WHERE T2.activity_name  =  "皮划艇"
Schema: CREATE TABLE participates_in (stuid VARCHAR), CREATE TABLE activity (actid VARCHAR, activity_name VARCHAR)
user: 哪些学生参加“独木舟”和“皮划艇”作为他们的活动？告诉我他们的学生ID 。

assistant: SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid  =  T2.actid WHERE T2.activity_name  =  "独木舟" INTERSECT SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid  =  T2.actid WHERE T2.activity_name  =  "皮划艇"
Schema: CREATE TABLE airports (city VARCHAR, name VARCHAR)
user: 找出“沈阳”市机场的名字。

assistant: SELECT name FROM airports WHERE city  =  "沈阳"
Schema: CREATE TABLE airports (city VARCHAR, name VARCHAR)
user: “沈阳”市的机场名称是什么？

assistant: SELECT name FROM airports WHERE city  =  "沈阳"
Schema: CREATE TABLE airports (country VARCHAR, city VARCHAR, name VARCHAR, elevation VARCHAR)
user: 查找“广州”市机场的名称、城市、国家和海拔高度。

assistant: SELECT name ,  city ,  country ,  elevation FROM airports WHERE city  =  "广州"
Schema: CREATE TABLE airports (country VARCHAR, city VARCHAR, name VARCHAR, elevation VARCHAR)
user: “广州”市每个机场的名称、城市、国家和海拔高度是多少？

assistant: SELECT name ,  city ,  country ,  elevation FROM airports WHERE city  =  "广州"
Schema: CREATE TABLE airlines (Id VARCHAR)
user: 有多少家航空公司？

assistant: SELECT count(*) FROM airlines
Schema: CREATE TABLE airlines (Id VARCHAR)
user: 航空公司的总数是多少？

assistant: SELECT count(*) FROM airlines
Schema: CREATE TABLE airlines (country VARCHAR)
user: “俄罗斯”有多少家航空公司？

assistant: SELECT count(*) FROM airlines WHERE country  =  "俄罗斯"
Schema: CREATE TABLE airlines (country VARCHAR)
user: “俄罗斯”航空公司的数量是多少？

assistant: SELECT count(*) FROM airlines WHERE country  =  "俄罗斯"
Schema: CREATE TABLE airports (country VARCHAR, elevation INTEGER)
user: “冰岛”所有机场的最大海拔是多少？

assistant: SELECT max(elevation) FROM airports WHERE country  =  "冰岛"
Schema: CREATE TABLE airports (country VARCHAR, elevation INTEGER)
user: “冰岛”国家机场的最高海拔是多少？

assistant: SELECT max(elevation) FROM airports WHERE country  =  "冰岛"
Schema: CREATE TABLE airports (country VARCHAR, name VARCHAR)
user: 查找位于“古巴”或“阿根廷”的机场名称。

assistant: SELECT name FROM airports WHERE country  =  "古巴" OR country  =  "阿根廷"
Schema: CREATE TABLE airports (country VARCHAR, name VARCHAR)
user: “古巴”或“阿根廷”所有机场的名字是什么？

assistant: SELECT name FROM airports WHERE country  =  "古巴" OR country  =  "阿根廷"
Schema: CREATE TABLE airlines (country VARCHAR, name VARCHAR)
user: 找出以“东方”开始的航空公司所在的国家的名字。

assistant: SELECT country FROM airlines WHERE name LIKE "%东方%"
Schema: CREATE TABLE airlines (country VARCHAR, name VARCHAR)
user: 所有以“东方”开始的航空公司的所在国家的名字是什么？

assistant: SELECT country FROM airlines WHERE name LIKE "%东方%"
Schema: CREATE TABLE airports (name VARCHAR, elevation VARCHAR)
user: 查出海拔在-50到50之间的机场名称。

assistant: SELECT name FROM airports WHERE elevation BETWEEN -50 AND 50
Schema: CREATE TABLE airports (name VARCHAR, elevation VARCHAR)
user: 海拔在-50到50之间的机场名称是什么？

assistant: SELECT name FROM airports WHERE elevation BETWEEN -50 AND 50
Schema: CREATE TABLE airports (country VARCHAR, elevation VARCHAR)
user: 哪一个国家是海拔最高的机场的所在地？

assistant: SELECT country FROM airports ORDER BY elevation DESC LIMIT 1
Schema: CREATE TABLE airports (country VARCHAR, elevation VARCHAR)
user: 海拔最高的机场是在哪个国家？

assistant: SELECT country FROM airports ORDER BY elevation DESC LIMIT 1
Schema: CREATE TABLE airports (name VARCHAR)
user: 找出包括“国际”一词的机场名称。

assistant: SELECT count(*) FROM airports WHERE name LIKE "%国际%"
Schema: CREATE TABLE airports (name VARCHAR)
user: 有多少机场名称中有“国际”这个词？

assistant: SELECT count(*) FROM airports WHERE name LIKE "%国际%"
Schema: CREATE TABLE airports (country VARCHAR, city VARCHAR)
user: “格陵兰岛”有多少个不同的城市有机场？

assistant: SELECT count(DISTINCT city) FROM airports WHERE country  =  "格陵兰岛"
Schema: CREATE TABLE airports (country VARCHAR, city VARCHAR)
user: “格陵兰岛”有多少城市的机场？

assistant: SELECT count(DISTINCT city) FROM airports WHERE country  =  "格陵兰岛"
Schema: CREATE TABLE airlines (alid VARCHAR, name VARCHAR), CREATE TABLE routes (alid VARCHAR)
user: 找出“山东航空公司”运营的航线数量。

assistant: SELECT count(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid  =  T2.alid WHERE T1.name  =  "山东航空公司"
Schema: CREATE TABLE airlines (alid VARCHAR, name VARCHAR), CREATE TABLE routes (alid VARCHAR)
user: “山东航空公司”有多少条航线？

assistant: SELECT count(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid  =  T2.alid WHERE T1.name  =  "山东航空公司"
Schema: CREATE TABLE airports (apid VARCHAR), CREATE TABLE routes (dst_apid VARCHAR)
user: 找出目的机场在“加拿大”的航线数。

assistant: SELECT count(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid  =  T2.dst_apid WHERE country  =  "加拿大"
Schema: CREATE TABLE airports (apid VARCHAR), CREATE TABLE routes (dst_apid VARCHAR)
user: 有多少条航线是以“加拿大”机场为终点的？

assistant: SELECT count(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid  =  T2.dst_apid WHERE country  =  "加拿大"
Schema: CREATE TABLE airports (country VARCHAR, city VARCHAR, name VARCHAR, elevation VARCHAR)
user: 找出最低海拔机场的名称，城市和国家。

assistant: SELECT name ,  city ,  country FROM airports ORDER BY elevation LIMIT 1
Schema: CREATE TABLE airports (country VARCHAR, city VARCHAR, name VARCHAR, elevation VARCHAR)
user: 最低海拔机场的名称，城市和国家是什么？

assistant: SELECT name ,  city ,  country FROM airports ORDER BY elevation LIMIT 1
Schema: CREATE TABLE airports (country VARCHAR, city VARCHAR, name VARCHAR, elevation VARCHAR)
user: 找出最高海拔机场的名称，城市和国家。

assistant: SELECT name ,  city ,  country FROM airports ORDER BY elevation DESC LIMIT 1
Schema: CREATE TABLE airports (country VARCHAR, city VARCHAR, name VARCHAR, elevation VARCHAR)
user: 最高海拔机场的名称，城市和国家是什么？

assistant: SELECT name ,  city ,  country FROM airports ORDER BY elevation DESC LIMIT 1
Schema: CREATE TABLE airports (apid VARCHAR, city VARCHAR, name VARCHAR), CREATE TABLE routes (dst_apid VARCHAR)
user: 找出以最多航线为目的地的机场的名称和城市。

assistant: SELECT T1.name ,  T1.city ,  T2.dst_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid  =  T2.dst_apid GROUP BY T2.dst_apid ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE airports (apid VARCHAR, city VARCHAR, name VARCHAR), CREATE TABLE routes (dst_apid VARCHAR)
user: 以最多航线为目的地的机场的名称和城市是什么？

assistant: SELECT T1.name ,  T1.city ,  T2.dst_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid  =  T2.dst_apid GROUP BY T2.dst_apid ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE airlines (alid VARCHAR, name VARCHAR), CREATE TABLE routes (alid VARCHAR)
user: 找出航线数量最多的前10名航空公司的名称。

assistant: SELECT T1.name ,  T2.alid FROM airlines AS T1 JOIN routes AS T2 ON T1.alid  =  T2.alid GROUP BY T2.alid ORDER BY count(*) DESC LIMIT 10
Schema: CREATE TABLE airlines (alid VARCHAR, name VARCHAR), CREATE TABLE routes (alid VARCHAR)
user: 对于航线数量最多的前10名航空公司，他们的名字是什么？

assistant: SELECT T1.name ,  T2.alid FROM airlines AS T1 JOIN routes AS T2 ON T1.alid  =  T2.alid GROUP BY T2.alid ORDER BY count(*) DESC LIMIT 10
Schema: CREATE TABLE airports (apid VARCHAR, city VARCHAR, name VARCHAR), CREATE TABLE routes (src_apid VARCHAR)
user: 找出最多航班路线来源的机场的名称和城市。

assistant: SELECT T1.name ,  T1.city ,  T2.src_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid  =  T2.src_apid GROUP BY T2.src_apid ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE airports (apid VARCHAR, city VARCHAR, name VARCHAR), CREATE TABLE routes (src_apid VARCHAR)
user: 从最多航线起始的机场的名称和城市是什么？

assistant: SELECT T1.name ,  T1.city ,  T2.src_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid  =  T2.src_apid GROUP BY T2.src_apid ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE airlines (alid VARCHAR, name VARCHAR), CREATE TABLE routes (alid VARCHAR)
user: 找出“山东航空公司”目的地的不同机场的数量。

assistant: SELECT count(DISTINCT dst_apid) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid  =  T2.alid WHERE T1.name  =  "山东航空公司"
Schema: CREATE TABLE airlines (alid VARCHAR, name VARCHAR), CREATE TABLE routes (alid VARCHAR)
user: “山东航空公司”目的地的不同机场的数量是多少？

assistant: SELECT count(DISTINCT dst_apid) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid  =  T2.alid WHERE T1.name  =  "山东航空公司"
Schema: CREATE TABLE airlines (country VARCHAR)
user: 哪些国家拥有最多的航空公司？

assistant: SELECT country FROM airlines GROUP BY country ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE airlines (country VARCHAR)
user: 国内航空公司数量最多的国家是什么？

assistant: SELECT country FROM airlines GROUP BY country ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE airlines (country VARCHAR, active VARCHAR)
user: 哪些国家拥有最多数量的起始状态是“Y”的航空公司？

assistant: SELECT country FROM airlines WHERE active  =  "Y" GROUP BY country ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE airlines (country VARCHAR, active VARCHAR)
user: 拥有最多数量的起始状态是“Y”的航空公司的国家是什么？

assistant: SELECT country FROM airlines WHERE active  =  "Y" GROUP BY country ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE airlines (country VARCHAR)
user: 按照航空公司数量的降序列出所有国家及其航空公司数量。

assistant: SELECT country ,  count(*) FROM airlines GROUP BY country ORDER BY count(*) DESC
Schema: CREATE TABLE airlines (country VARCHAR)
user: 按降序列出每个国家经营有多少家航空公司？

assistant: SELECT country ,  count(*) FROM airlines GROUP BY country ORDER BY count(*) DESC
Schema: CREATE TABLE airports (country VARCHAR)
user: 每个国家有多少个机场？按照机场数量降序来排列。

assistant: SELECT count(*) ,  country FROM airports GROUP BY country ORDER BY count(*) DESC
Schema: CREATE TABLE airports (country VARCHAR)
user: 每个国家由最多到最少的机场数量是多少？

assistant: SELECT count(*) ,  country FROM airports GROUP BY country ORDER BY count(*) DESC
Schema: CREATE TABLE airports (country VARCHAR, city VARCHAR)
user: “中国”每个城市有多少个机场？通过机场数量降序来排列城市。

assistant: SELECT count(*) ,  city FROM airports WHERE country  =  "中国" GROUP BY city ORDER BY count(*) DESC
Schema: CREATE TABLE airports (country VARCHAR, city VARCHAR)
user: “中国”每座城市由最多到最少有多少个机场？

assistant: SELECT count(*) ,  city FROM airports WHERE country  =  "中国" GROUP BY city ORDER BY count(*) DESC
Schema: CREATE TABLE airports (country VARCHAR, city VARCHAR)
user: 返回“中国”超过3个机场的城市。

assistant: SELECT city FROM airports WHERE country  =  "中国" GROUP BY city HAVING count(*)  >  3
Schema: CREATE TABLE airports (country VARCHAR, city VARCHAR)
user: “中国”有超过3个机场的城市数量是多少？

assistant: SELECT city FROM airports WHERE country  =  "中国" GROUP BY city HAVING count(*)  >  3
Schema: CREATE TABLE airports (city VARCHAR)
user: 有多少个城市有超过3个机场？

assistant: SELECT count(*) FROM (SELECT city FROM airports GROUP BY city HAVING count(*)  >  3)
Schema: CREATE TABLE airports (city VARCHAR)
user: 拥有超过3个机场的城市的数量是多少？

assistant: SELECT count(*) FROM (SELECT city FROM airports GROUP BY city HAVING count(*)  >  3)
Schema: CREATE TABLE airports (city VARCHAR)
user: 列出拥有一个以上机场的城市城市的数量。

assistant: SELECT city ,  count(*) FROM airports GROUP BY city HAVING count(*)  >  1
Schema: CREATE TABLE airports (city VARCHAR)
user: 有超过一个机场的所有城市的名字是什么？他们有多少个机场？

assistant: SELECT city ,  count(*) FROM airports GROUP BY city HAVING count(*)  >  1
Schema: CREATE TABLE airports (city VARCHAR)
user: 按机场数量列出拥有2个以上机场的城市。

assistant: SELECT city FROM airports GROUP BY city HAVING count(*)  >  2 ORDER BY count(*)
Schema: CREATE TABLE airports (city VARCHAR)
user: 按机场数量列出拥有2个以上机场的城市有哪些？

assistant: SELECT city FROM airports GROUP BY city HAVING count(*)  >  2 ORDER BY count(*)
Schema: CREATE TABLE airports (apid VARCHAR, name VARCHAR), CREATE TABLE routes (src_apid VARCHAR)
user: 找出每个起始机场的航线号码和机场名称。

assistant: SELECT count(*) ,  T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid  =  T2.src_apid GROUP BY T1.name
Schema: CREATE TABLE airports (apid VARCHAR, name VARCHAR), CREATE TABLE routes (src_apid VARCHAR)
user: 每一个机场名称，多少条航线在该机场出发？

assistant: SELECT count(*) ,  T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid  =  T2.src_apid GROUP BY T1.name
Schema: CREATE TABLE airports (apid VARCHAR, name VARCHAR), CREATE TABLE routes (src_apid VARCHAR)
user: 找出按路线数量降序排序的每个源机场的路线数量和机场名称。

assistant: SELECT count(*) ,  T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid  =  T2.src_apid GROUP BY T1.name ORDER BY count(*) DESC
Schema: CREATE TABLE airports (apid VARCHAR, name VARCHAR), CREATE TABLE routes (src_apid VARCHAR)
user: 对于每个机场名称，从最多到最少排序的机场有多少条航线？

assistant: SELECT count(*) ,  T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid  =  T2.src_apid GROUP BY T1.name ORDER BY count(*) DESC
Schema: CREATE TABLE airports (country VARCHAR, elevation INTEGER)
user: 找出每个国家的所有机场的平均海拔高度。

assistant: SELECT avg(elevation) ,  country FROM airports GROUP BY country
Schema: CREATE TABLE airports (country VARCHAR, elevation INTEGER)
user: 对于每个国家，该国机场的平均海拔是多少？

assistant: SELECT avg(elevation) ,  country FROM airports GROUP BY country
Schema: CREATE TABLE airports (city VARCHAR)
user: 找出有两个机场的城市。

assistant: SELECT city FROM airports GROUP BY city HAVING count(*)  =  2
Schema: CREATE TABLE airports (city VARCHAR)
user: 有两个机场的城市是什么？

assistant: SELECT city FROM airports GROUP BY city HAVING count(*)  =  2
Schema: CREATE TABLE airlines (country VARCHAR, alid VARCHAR, name VARCHAR), CREATE TABLE routes (alid VARCHAR)
user: 对于每个国家和航空公司的名字，有多少条路线？

assistant: SELECT T1.country ,  T1.name ,  count(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid  =  T2.alid GROUP BY T1.country ,  T1.name
Schema: CREATE TABLE airlines (country VARCHAR, alid VARCHAR, name VARCHAR), CREATE TABLE routes (alid VARCHAR)
user: 那个国家和每一个国家对应的航空公司的航线总数是多少？

assistant: SELECT T1.country ,  T1.name ,  count(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid  =  T2.alid GROUP BY T1.country ,  T1.name
Schema: CREATE TABLE routes (dst_apid VARCHAR), CREATE TABLE airports (country VARCHAR, apid VARCHAR)
user: 找出目的地机场在“意大利”的航线的数量。

assistant: SELECT count(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid  =  T2.apid WHERE T2.country  =  "意大利"
Schema: CREATE TABLE routes (dst_apid VARCHAR), CREATE TABLE airports (country VARCHAR, apid VARCHAR)
user: 以“意大利”机场为目的地的路线有多少？

assistant: SELECT count(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid  =  T2.apid WHERE T2.country  =  "意大利"
Schema: CREATE TABLE routes (dst_apid VARCHAR, alid VARCHAR), CREATE TABLE airports (country VARCHAR, apid VARCHAR), CREATE TABLE airlines (alid VARCHAR, name VARCHAR)
user: 返回由名为“山东航空公司”运营的以“意大利”机场为目的地的航线数。

assistant: SELECT count(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid  =  T2.apid JOIN airlines AS T3 ON T1.alid  =  T3.alid WHERE T2.country  =  "Italy" AND T3.name  =  "American Airlines"
Schema: CREATE TABLE routes (dst_apid VARCHAR, alid VARCHAR), CREATE TABLE airports (country VARCHAR, apid VARCHAR), CREATE TABLE airlines (alid VARCHAR, name VARCHAR)
user: “山东航空公司”运营的以“意大利”机场为目的地的航线数是多少？

assistant: SELECT count(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid  =  T2.apid JOIN airlines AS T3 ON T1.alid  =  T3.alid WHERE T2.country  =  "Italy" AND T3.name  =  "American Airlines"
Schema: CREATE TABLE airports (apid VARCHAR, name VARCHAR), CREATE TABLE routes (dst_apid VARCHAR)
user: 找出目的地是“首都国际机场”的航线数量。

assistant: SELECT count(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid  =  T2.dst_apid WHERE T1.name  =  "首都国际机场"
Schema: CREATE TABLE airports (apid VARCHAR, name VARCHAR), CREATE TABLE routes (dst_apid VARCHAR)
user: 以“首都国际机场”为的终点路线是多少？

assistant: SELECT count(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid  =  T2.dst_apid WHERE T1.name  =  "首都国际机场"
Schema: CREATE TABLE routes (src_apid VARCHAR, apid VARCHAR, dst_apid VARCHAR, country VARCHAR), CREATE TABLE airports (src_apid VARCHAR, apid VARCHAR, dst_apid VARCHAR, country VARCHAR)
user: 找出从“中国”到“加拿大”的路线数。

assistant: SELECT count(*) FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country  =  "加拿大") AND src_apid IN (SELECT apid FROM airports WHERE country  =  "中国")
Schema: CREATE TABLE routes (src_apid VARCHAR, apid VARCHAR, dst_apid VARCHAR, country VARCHAR), CREATE TABLE airports (src_apid VARCHAR, apid VARCHAR, dst_apid VARCHAR, country VARCHAR)
user: 从“中国”到“加拿大”有多少条路线？

assistant: SELECT count(*) FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country  =  "加拿大") AND src_apid IN (SELECT apid FROM airports WHERE country  =  "中国")
Schema: CREATE TABLE routes (dst_apid VARCHAR, src_apid VARCHAR, rid VARCHAR, country VARCHAR, apid VARCHAR), CREATE TABLE airports (dst_apid VARCHAR, src_apid VARCHAR, rid VARCHAR, country VARCHAR, apid VARCHAR)
user: 查找其源机场和目的地机场在“中国”的路线ID。

assistant: SELECT rid FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country  =  "中国") AND src_apid IN (SELECT apid FROM airports WHERE country  =  "中国")
Schema: CREATE TABLE routes (dst_apid VARCHAR, src_apid VARCHAR, rid VARCHAR, country VARCHAR, apid VARCHAR), CREATE TABLE airports (dst_apid VARCHAR, src_apid VARCHAR, rid VARCHAR, country VARCHAR, apid VARCHAR)
user: 源机场和目的地机场在“中国”的路线ID是什么？

assistant: SELECT rid FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country  =  "中国") AND src_apid IN (SELECT apid FROM airports WHERE country  =  "中国")
Schema: CREATE TABLE airlines (alid VARCHAR, name VARCHAR), CREATE TABLE routes (alid VARCHAR)
user: 查找航线数量最多的航空公司名称。

assistant: SELECT T1.name FROM airlines AS T1 JOIN routes AS T2 ON T1.alid  =  T2.alid GROUP BY T1.name ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE airlines (alid VARCHAR, name VARCHAR), CREATE TABLE routes (alid VARCHAR)
user: 航线最多的航空公司叫什么名字？

assistant: SELECT T1.name FROM airlines AS T1 JOIN routes AS T2 ON T1.alid  =  T2.alid GROUP BY T1.name ORDER BY count(*) DESC LIMIT 1