jtjt520j/CSpider_for_Qwen huggingface dataset:
问题: 列出金额在1000至3000之间的客户的姓名和姓氏。

SQL: SELECT first_name ,  last_name FROM Customers WHERE amount_outstanding BETWEEN 1000 AND 3000;
问题: 1000到3000美元之间的所有客户的名字和姓氏是什么？

SQL: SELECT first_name ,  last_name FROM Customers WHERE amount_outstanding BETWEEN 1000 AND 3000;
问题: 列出居住在“福州”市的客户的姓名和姓氏。

SQL: SELECT T1.first_name ,  T1.last_name FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T2.city = "福州";
问题: 住在“福州”市的所有客户的姓氏和姓氏是什么？

SQL: SELECT T1.first_name ,  T1.last_name FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T2.city = "福州";
问题: 名字是“诚”和姓氏是“钟”的顾客住在哪个国家？

SQL: SELECT T2.country FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = "诚" AND T1.last_name = "钟"
问题: 客户“钟”“诚”居住的国家是什么？

SQL: SELECT T2.country FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = "诚" AND T1.last_name = "钟"
问题: 名字是“诚”和姓氏是“钟”的顾客的邮政编码是什么？

SQL: SELECT T2.zip_postcode FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = "诚" AND T1.last_name = "钟"
问题: 客户“钟”“诚”的邮政编码是什么？

SQL: SELECT T2.zip_postcode FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = "诚" AND T1.last_name = "钟"
问题: 哪个城市有最多的客户？

SQL: SELECT T2.city FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id GROUP BY T2.city ORDER BY count(*) DESC LIMIT 1;
问题: 什么城市拥有最多的客户？

SQL: SELECT T2.city FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id GROUP BY T2.city ORDER BY count(*) DESC LIMIT 1;
问题: 名字是“诚”和姓氏是“钟”的顾客总共付了多少钱？

SQL: SELECT sum(T1.amount_payment) FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = "诚" AND T2.last_name = "钟"
问题: 顾客“钟”“诚”支付的总金额是多少？

SQL: SELECT sum(T1.amount_payment) FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = "诚" AND T2.last_name = "钟"
问题: 列出没有支付历史记录的客户数量。

SQL: SELECT count(*) FROM Customers WHERE customer_id NOT IN ( SELECT customer_id FROM Customer_Payments );
问题: 有多少客户没有付款记录？

SQL: SELECT count(*) FROM Customers WHERE customer_id NOT IN ( SELECT customer_id FROM Customer_Payments );
问题: 列出超过2次付款的客户的名字和姓氏。

SQL: SELECT T2.first_name ,  T2.last_name FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*)  >  2;
问题: 所有超过2次付款的客户的名字和姓氏是什么？

SQL: SELECT T2.first_name ,  T2.last_name FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*)  >  2;
问题: 列出所有付款方式和每种付款方式的付款次数。

SQL: SELECT payment_method_code ,  count(*) FROM Customer_Payments GROUP BY payment_method_code;
问题: 对于每种支付方式，支付了多少？

SQL: SELECT payment_method_code ,  count(*) FROM Customer_Payments GROUP BY payment_method_code;
问题: “取消”的课有多少？

SQL: SELECT count(*) FROM Lessons WHERE lesson_status_code = "取消";
问题: 有多少课被“取消”了？

SQL: SELECT count(*) FROM Lessons WHERE lesson_status_code = "取消";
问题: 列出名字是 “子君” ，姓氏是“温” ，昵称包含字“子”的职工教的课程ID。

SQL: SELECT T1.lesson_id FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "子君" AND T2.last_name = "温" AND nickname LIKE "%子%";
问题: 昵称包含字“子”的职员“温”“子君” ，她教的所有职员的ID是什么？

SQL: SELECT T1.lesson_id FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "子君" AND T2.last_name = "温" AND nickname LIKE "%子%";
问题: 名字中有“安”字的教职员教了多少课？

SQL: SELECT count(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE "%安%"
问题: 以“子君”为名字，“温”为姓氏的员工教的总课时有多长？

SQL: SELECT sum(lesson_time) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "子君" AND T2.last_name = "温";
问题: “温”“子君”教授的所有课程的总时间是多少？

SQL: SELECT sum(lesson_time) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "子君" AND T2.last_name = "温";
问题: 名字是 “子君” ，姓氏是“温” 的员工平均授课价格是多少？

SQL: SELECT avg(price) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "子君" AND T2.last_name = "温";
问题:  “温”“子君” 教授的课的平均价格是多少？

SQL: SELECT avg(price) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "子君" AND T2.last_name = "温";
问题: 名字叫“瑞”的客户上了多少课？

SQL: SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id  = T2.customer_id WHERE T2.first_name = "瑞"
问题: 客户和员工都使用哪些姓氏？

SQL: SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff
问题: 客户和员工使用的姓氏是什么？

SQL: SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff
问题: 没有给授课的员工的名字是什么？

SQL: SELECT first_name FROM Staff EXCEPT SELECT T2.first_name FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id  =  T2.staff_id
问题: 不教任何课程的员工的第一个名字是什么？

SQL: SELECT first_name FROM Staff EXCEPT SELECT T2.first_name FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id  =  T2.staff_id
问题: 在大部分时间里，车辆使用的ID和详细信息是什么？

SQL: SELECT T1.vehicle_id ,  T1.vehicle_details FROM Vehicles AS T1 JOIN Lessons AS T2 ON T1.vehicle_id  =  T2.vehicle_id GROUP BY T1.vehicle_id ORDER BY count(*) DESC LIMIT 1
问题: 我们有多少教员？

SQL: SELECT count(*) FROM Faculty
问题: 全体教员的总数是多少？

SQL: SELECT count(*) FROM Faculty
问题: 我们有什么等级的教员？

SQL: SELECT DISTINCT rank FROM Faculty
问题: 找出不同等级的教员。

SQL: SELECT DISTINCT rank FROM Faculty
问题: 显示所有有教学室的不同建筑。

SQL: SELECT DISTINCT building FROM Faculty
问题: 什么建筑有教学办公室？

SQL: SELECT DISTINCT building FROM Faculty
问题: 显示所有教员的等级、名字和姓氏。

SQL: SELECT rank ,  Fname ,  Lname FROM Faculty
问题: 教员的职称、名字和姓氏是什么？

SQL: SELECT rank ,  Fname ,  Lname FROM Faculty
问题: 显示所有“女”教员的姓名、姓氏和电话号码。

SQL: SELECT Fname ,  Lname ,  phone FROM Faculty WHERE Sex  =  "女"
问题: 所有“女”教员的名字、姓氏和电话号码是什么？

SQL: SELECT Fname ,  Lname ,  phone FROM Faculty WHERE Sex  =  "女"
问题: 显示所有“男”性教师的ID。

SQL: SELECT FacID FROM Faculty WHERE Sex  =  "男"
问题: 所有“男”性教职员工的教师ID是什么？

SQL: SELECT FacID FROM Faculty WHERE Sex  =  "男"
问题: 我们有多少“女”“教授”？

SQL: SELECT count(*) FROM Faculty WHERE Sex  =  "女" AND Rank  =  "教授"
问题: 统计一下我们有多少“女”“教授”。

SQL: SELECT count(*) FROM Faculty WHERE Sex  =  "女" AND Rank  =  "教授"
问题: 展示教师名为“王”“睿”的电话，房间，和建筑。

SQL: SELECT phone ,  room ,  building FROM Faculty WHERE Fname  =  "睿" AND Lname  =  "王"
问题: 教师“王”“睿”的电话、房间和建筑是什么？

SQL: SELECT phone ,  room ,  building FROM Faculty WHERE Fname  =  "睿" AND Lname  =  "王"
问题: “逸夫”楼有多少“教授”？

SQL: SELECT count(*) FROM Faculty WHERE Rank  =  "教授" AND building  =  "逸夫"
问题: 统计在“逸夫”楼拥有办公室的“教授”的数量。

SQL: SELECT count(*) FROM Faculty WHERE Rank  =  "教授" AND building  =  "逸夫"
问题: 显示所有“教员”的名字和姓氏。

SQL: SELECT fname ,  lname FROM Faculty WHERE Rank  =  "教员"
问题: 所有“教员”的名字和姓氏是什么？

SQL: SELECT fname ,  lname FROM Faculty WHERE Rank  =  "教员"
问题: 显示所有的建筑物以及建筑物的教职员数。

SQL: SELECT building ,  count(*) FROM Faculty GROUP BY building
问题: 每个建筑有多少教员？以建筑物的名称列出结果。

SQL: SELECT building ,  count(*) FROM Faculty GROUP BY building
问题: 哪一栋楼的教员最多？

SQL: SELECT building FROM Faculty GROUP BY building ORDER BY count(*) DESC LIMIT 1
问题: 找出拥有最多教员的建筑。

SQL: SELECT building FROM Faculty GROUP BY building ORDER BY count(*) DESC LIMIT 1
问题: 展示所有至少有10位“教授”的建筑。

SQL: SELECT building FROM Faculty WHERE rank  =  "教授" GROUP BY building HAVING count(*)  >=  10
问题: 在哪栋楼里至少有十位“教授”？

SQL: SELECT building FROM Faculty WHERE rank  =  "教授" GROUP BY building HAVING count(*)  >=  10
问题: 对于每一个教职员工等级，显示该等级有教职员工的人数。

SQL: SELECT rank ,  count(*) FROM Faculty GROUP BY rank
问题: 我们每个教员等级有多少教员？

SQL: SELECT rank ,  count(*) FROM Faculty GROUP BY rank
问题: 显示所有等级和各等级的男女教师人数。

SQL: SELECT rank ,  sex ,  count(*) FROM Faculty GROUP BY rank ,  sex
问题: 我们每个年级有多少教员和性别？

SQL: SELECT rank ,  sex ,  count(*) FROM Faculty GROUP BY rank ,  sex
问题: 哪一个教职员工人数最少？

SQL: SELECT rank FROM Faculty GROUP BY rank ORDER BY count(*) ASC LIMIT 1
问题: 找出最少人数的教员级别。

SQL: SELECT rank FROM Faculty GROUP BY rank ORDER BY count(*) ASC LIMIT 1
问题: 显示男女“助理教授”的数量。

SQL: SELECT sex ,  count(*) FROM Faculty WHERE rank  =  "助理教授" GROUP BY sex
问题: 我们有多少男女“助理教授”？

SQL: SELECT sex ,  count(*) FROM Faculty WHERE rank  =  "助理教授" GROUP BY sex
问题: “张”“晴”的导师的名字和姓氏是什么？

SQL: SELECT T1.fname ,  T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor WHERE T2.fname  =  "晴" AND T2.lname  =  "张"
问题: 谁是“张”“晴”的导师？给我名字和姓氏。

SQL: SELECT T1.fname ,  T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor WHERE T2.fname  =  "晴" AND T2.lname  =  "张"
问题: 显示导师是“教授”的学生的ID。

SQL: SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor WHERE T1.rank  =  "Professor"
问题: 哪些学生有“教授”作为他们的导师？找出他们的学生ID。

SQL: SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor WHERE T1.rank  =  "Professor"
问题: 显示“李”“斌”指导的所有学生的名字和姓氏。

SQL: SELECT T2.fname ,  T2.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor WHERE T1.fname  =  "斌" AND T1.lname  =  "李"
问题: “李”“斌”指导哪些学生？给我他们的名字和姓氏。

SQL: SELECT T2.fname ,  T2.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor WHERE T1.fname  =  "斌" AND T1.lname  =  "李"
问题: 显示教员的教员ID和他或她指导的学生人数。

SQL: SELECT T1.FacID ,  count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor GROUP BY T1.FacID
问题: 每个教员的教员ID和每个教员的学生人数是多少？

SQL: SELECT T1.FacID ,  count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor GROUP BY T1.FacID
问题: 显示所有教员等级和每个等级指导的学生人数。

SQL: SELECT T1.rank ,  count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor GROUP BY T1.rank
问题: 每一位教职工等级有多少指导学生？列出等级和学生人数。

SQL: SELECT T1.rank ,  count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor GROUP BY T1.rank
问题: 拥有最多学生的教师的名字和姓氏是什么？

SQL: SELECT T1.fname ,  T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1
问题: 请给出我给指导最多学生的老师的名字和姓氏。

SQL: SELECT T1.fname ,  T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1
问题: 为所有有至少2名学生的教职工的ID 。

SQL: SELECT T1.FacID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor GROUP BY T1.FacID HAVING count(*)  >=  2
问题: 哪个教职工指导两个以上的学生？给我他们的教职工ID。

SQL: SELECT T1.FacID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor GROUP BY T1.FacID HAVING count(*)  >=  2
问题: 显示不指导任何学生的教职工的ID 。

SQL: SELECT FacID FROM Faculty EXCEPT SELECT advisor FROM Student
问题: 不指导任何学生的教职工的ID是什么？

SQL: SELECT FacID FROM Faculty EXCEPT SELECT advisor FROM Student
问题: 我们有什么活动？

SQL: SELECT activity_name FROM Activity
问题: 列出我们所有的活动。

SQL: SELECT activity_name FROM Activity
问题: 我们有多少活动？

SQL: SELECT count(*) FROM Activity
问题: 找出可用的活动数。

SQL: SELECT count(*) FROM Activity
问题: 有多少教职工参加一项活动？

SQL: SELECT count(DISTINCT FacID) FROM Faculty_participates_in
问题: 给我参加活动的教职工人数

SQL: SELECT count(DISTINCT FacID) FROM Faculty_participates_in
问题: 显示不参与任何活动的教职工的ID。

SQL: SELECT FacID FROM Faculty EXCEPT SELECT FacID FROM Faculty_participates_in
问题: 哪些教职工不参与任何活动？找出他们的教职工ID。

SQL: SELECT FacID FROM Faculty EXCEPT SELECT FacID FROM Faculty_participates_in
问题: 请出示所有参加活动且指导学生的教职员工的ID。

SQL: SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student
问题: 哪些是既参加活动又指导学生的教职工的ID？

SQL: SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student
问题: “马”“文杰”参加了多少活动？

SQL: SELECT count(*) FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID WHERE T1.fname  =  "文杰" AND T1.lname  =  "马"
问题: 找出“马”“文杰”参与的活动数量。

SQL: SELECT count(*) FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID WHERE T1.fname  =  "文杰" AND T1.lname  =  "马"
问题: 显示“马”“文杰”参与的所有活动的名称。

SQL: SELECT T3.activity_name FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID JOIN Activity AS T3 ON T3.actid  =  T2.actid WHERE T1.fname  =  "文杰" AND T1.lname  =  "马"
问题: “马”“文杰”参与的活动的名称是什么？

SQL: SELECT T3.activity_name FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID JOIN Activity AS T3 ON T3.actid  =  T2.actid WHERE T1.fname  =  "文杰" AND T1.lname  =  "马"
问题: 显示所有参加某项活动的教职员工的名字和姓氏，以及他们参加的活动数量。

SQL: SELECT  T1.fname ,  T1.lname ,  count(*) ,  T1.FacID FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID GROUP BY T1.FacID
问题: 参加至少一项活动的教职员工的名字和姓氏是什么？对于他们中的每一个人，也显示他们参加的活动的数量。

SQL: SELECT  T1.fname ,  T1.lname ,  count(*) ,  T1.FacID FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID GROUP BY T1.FacID
问题: 显示所有活动名称和参与每个活动的教职工人数。

SQL: SELECT T1.activity_name ,  count(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID  =  T2.actID GROUP BY T1.actID
问题: 有多少教职工参加每一项活动？返回活动名称和教职工人数。

SQL: SELECT T1.activity_name ,  count(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID  =  T2.actID GROUP BY T1.actID
问题: 参加最多活动的教职工的姓名是什么？

SQL: 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
问题: 找出参与最多数量的活动的教员的名字和姓氏。

SQL: 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
问题: 教职工参与最多的活动名称是什么？

SQL: 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
问题: 哪些活动是教职工最多参加的活动？查出活动名称。

SQL: 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
问题: 显示不参与任何活动的学生的ID。

SQL: SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in
问题: 没有参与任何活动的学生的ID是什么？

SQL: SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in
问题: 显示所有20岁以下参加活动的学生ID 。

SQL: SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age  <  20
问题: 参加至少一项活动的20岁以下学生的ID是什么？

SQL: SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age  <  20
问题: 参加最多活动的学生的名字和姓氏是什么？

SQL: 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
问题: 告诉我参加最多数量活动的学生的姓氏和姓氏。

SQL: 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
问题: 参加最多数量活动的学生的姓氏和姓氏是什么？

SQL: 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
问题: 找出学生参与人数最多的活动的名称。

SQL: 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
问题: 找出正在玩“独木舟”或“皮划艇”的教职员的名字。

SQL: 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  =  "皮划艇"
问题: 哪个教职员在玩“独木舟”或“皮划艇”？告诉我他们的名字。

SQL: 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  =  "皮划艇"
问题: 找出不玩“独木舟”或“皮划艇”的“教授”的名字。

SQL: 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  =  "皮划艇"
问题: 不把“独木舟”或“皮划艇”作为活动的“教授”的名字是什么？

SQL: 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  =  "皮划艇"
问题: 找出参加“独木舟”和“皮划艇”运动的教职员的名字。

SQL: 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  =  "皮划艇"
问题: 那些同时玩“独木舟”和“皮划艇”的教职员叫什么名字？

SQL: 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  =  "皮划艇"
问题: 找出参加“独木舟”和“皮划艇”运动的学生的ID。

SQL: 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  =  "皮划艇"
问题: 哪些学生参加“独木舟”和“皮划艇”作为他们的活动？告诉我他们的学生ID 。

SQL: 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  =  "皮划艇"
问题: 找出“沈阳”市机场的名字。

SQL: SELECT name FROM airports WHERE city  =  "沈阳"
问题: “沈阳”市的机场名称是什么？

SQL: SELECT name FROM airports WHERE city  =  "沈阳"
问题: 查找“广州”市机场的名称、城市、国家和海拔高度。

SQL: SELECT name ,  city ,  country ,  elevation FROM airports WHERE city  =  "广州"
问题: “广州”市每个机场的名称、城市、国家和海拔高度是多少？

SQL: SELECT name ,  city ,  country ,  elevation FROM airports WHERE city  =  "广州"
问题: 有多少家航空公司？

SQL: SELECT count(*) FROM airlines
问题: 航空公司的总数是多少？

SQL: SELECT count(*) FROM airlines
问题: “俄罗斯”有多少家航空公司？

SQL: SELECT count(*) FROM airlines WHERE country  =  "俄罗斯"
问题: “俄罗斯”航空公司的数量是多少？

SQL: SELECT count(*) FROM airlines WHERE country  =  "俄罗斯"
问题: “冰岛”所有机场的最大海拔是多少？

SQL: SELECT max(elevation) FROM airports WHERE country  =  "冰岛"
问题: “冰岛”国家机场的最高海拔是多少？

SQL: SELECT max(elevation) FROM airports WHERE country  =  "冰岛"
问题: 查找位于“古巴”或“阿根廷”的机场名称。

SQL: SELECT name FROM airports WHERE country  =  "古巴" OR country  =  "阿根廷"
问题: “古巴”或“阿根廷”所有机场的名字是什么？

SQL: SELECT name FROM airports WHERE country  =  "古巴" OR country  =  "阿根廷"
问题: 找出以“东方”开始的航空公司所在的国家的名字。

SQL: SELECT country FROM airlines WHERE name LIKE "%东方%"
问题: 所有以“东方”开始的航空公司的所在国家的名字是什么？

SQL: SELECT country FROM airlines WHERE name LIKE "%东方%"
问题: 查出海拔在-50到50之间的机场名称。

SQL: SELECT name FROM airports WHERE elevation BETWEEN -50 AND 50
问题: 海拔在-50到50之间的机场名称是什么？

SQL: SELECT name FROM airports WHERE elevation BETWEEN -50 AND 50
问题: 哪一个国家是海拔最高的机场的所在地？

SQL: SELECT country FROM airports ORDER BY elevation DESC LIMIT 1
问题: 海拔最高的机场是在哪个国家？

SQL: SELECT country FROM airports ORDER BY elevation DESC LIMIT 1
问题: 找出包括“国际”一词的机场名称。

SQL: SELECT count(*) FROM airports WHERE name LIKE "%国际%"
问题: 有多少机场名称中有“国际”这个词？

SQL: SELECT count(*) FROM airports WHERE name LIKE "%国际%"
问题: “格陵兰岛”有多少个不同的城市有机场？

SQL: SELECT count(DISTINCT city) FROM airports WHERE country  =  "格陵兰岛"
问题: “格陵兰岛”有多少城市的机场？

SQL: SELECT count(DISTINCT city) FROM airports WHERE country  =  "格陵兰岛"
问题: 找出“山东航空公司”运营的航线数量。

SQL: SELECT count(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid  =  T2.alid WHERE T1.name  =  "山东航空公司"
问题: “山东航空公司”有多少条航线？

SQL: SELECT count(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid  =  T2.alid WHERE T1.name  =  "山东航空公司"
问题: 找出目的机场在“加拿大”的航线数。

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

SQL: SELECT count(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid  =  T2.dst_apid WHERE country  =  "加拿大"
问题: 找出最低海拔机场的名称，城市和国家。

SQL: SELECT name ,  city ,  country FROM airports ORDER BY elevation LIMIT 1
问题: 最低海拔机场的名称，城市和国家是什么？

SQL: SELECT name ,  city ,  country FROM airports ORDER BY elevation LIMIT 1
问题: 找出最高海拔机场的名称，城市和国家。

SQL: SELECT name ,  city ,  country FROM airports ORDER BY elevation DESC LIMIT 1
问题: 最高海拔机场的名称，城市和国家是什么？

SQL: SELECT name ,  city ,  country FROM airports ORDER BY elevation DESC LIMIT 1
问题: 找出以最多航线为目的地的机场的名称和城市。

SQL: 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
问题: 以最多航线为目的地的机场的名称和城市是什么？

SQL: 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
问题: 找出航线数量最多的前10名航空公司的名称。

SQL: 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
问题: 对于航线数量最多的前10名航空公司，他们的名字是什么？

SQL: 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
问题: 找出最多航班路线来源的机场的名称和城市。

SQL: 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
问题: 从最多航线起始的机场的名称和城市是什么？

SQL: 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
问题: 找出“山东航空公司”目的地的不同机场的数量。

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

SQL: SELECT count(DISTINCT dst_apid) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid  =  T2.alid WHERE T1.name  =  "山东航空公司"
问题: 哪些国家拥有最多的航空公司？

SQL: SELECT country FROM airlines GROUP BY country ORDER BY count(*) DESC LIMIT 1
问题: 国内航空公司数量最多的国家是什么？

SQL: SELECT country FROM airlines GROUP BY country ORDER BY count(*) DESC LIMIT 1
问题: 哪些国家拥有最多数量的起始状态是“Y”的航空公司？

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

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

SQL: SELECT country ,  count(*) FROM airlines GROUP BY country ORDER BY count(*) DESC
问题: 按降序列出每个国家经营有多少家航空公司？

SQL: SELECT country ,  count(*) FROM airlines GROUP BY country ORDER BY count(*) DESC
问题: 每个国家有多少个机场？按照机场数量降序来排列。

SQL: SELECT count(*) ,  country FROM airports GROUP BY country ORDER BY count(*) DESC
问题: 每个国家由最多到最少的机场数量是多少？

SQL: SELECT count(*) ,  country FROM airports GROUP BY country ORDER BY count(*) DESC
问题: “中国”每个城市有多少个机场？通过机场数量降序来排列城市。

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

SQL: SELECT count(*) ,  city FROM airports WHERE country  =  "中国" GROUP BY city ORDER BY count(*) DESC
问题: 返回“中国”超过3个机场的城市。

SQL: SELECT city FROM airports WHERE country  =  "中国" GROUP BY city HAVING count(*)  >  3
问题: “中国”有超过3个机场的城市数量是多少？

SQL: SELECT city FROM airports WHERE country  =  "中国" GROUP BY city HAVING count(*)  >  3
问题: 有多少个城市有超过3个机场？

SQL: SELECT count(*) FROM (SELECT city FROM airports GROUP BY city HAVING count(*)  >  3)
问题: 拥有超过3个机场的城市的数量是多少？

SQL: SELECT count(*) FROM (SELECT city FROM airports GROUP BY city HAVING count(*)  >  3)
问题: 列出拥有一个以上机场的城市城市的数量。

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

SQL: SELECT city ,  count(*) FROM airports GROUP BY city HAVING count(*)  >  1
问题: 按机场数量列出拥有2个以上机场的城市。

SQL: SELECT city FROM airports GROUP BY city HAVING count(*)  >  2 ORDER BY count(*)
问题: 按机场数量列出拥有2个以上机场的城市有哪些？

SQL: SELECT city FROM airports GROUP BY city HAVING count(*)  >  2 ORDER BY count(*)
问题: 找出每个起始机场的航线号码和机场名称。

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

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

SQL: 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
问题: 对于每个机场名称，从最多到最少排序的机场有多少条航线？

SQL: 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
问题: 找出每个国家的所有机场的平均海拔高度。

SQL: SELECT avg(elevation) ,  country FROM airports GROUP BY country
问题: 对于每个国家，该国机场的平均海拔是多少？

SQL: SELECT avg(elevation) ,  country FROM airports GROUP BY country
问题: 找出有两个机场的城市。

SQL: SELECT city FROM airports GROUP BY city HAVING count(*)  =  2