jtjt520j/CSpider_for_Qwen huggingface dataset:
问题: 部门中有多少人年龄大于56岁？

SQL: SELECT count(*) FROM head WHERE age  >  56
问题: 列出按年龄排序的部门负责人的姓名、出生地和年龄。

SQL: SELECT name ,  born_state ,  age FROM head ORDER BY age
问题: 列出每个部门的创建年份、名称和预算。

SQL: SELECT creation ,  name ,  budget_in_billions FROM department
问题: 部门的最高预算和最低预算是多少？

SQL: SELECT max(budget_in_billions) ,  min(budget_in_billions) FROM department
问题: 排名在10到15之间的部门的平均雇员人数是多少？

SQL: SELECT avg(num_employees) FROM department WHERE ranking BETWEEN 10 AND 15
问题: 出生在“浙江”州以外的人的名字是什么？

SQL: SELECT name FROM head WHERE born_state != '浙江'
问题: 出生于“河南”州的秘书所管理的各部门的不同创建年份是什么？

SQL: SELECT DISTINCT T1.creation FROM department AS T1 JOIN management AS T2 ON T1.department_id  =  T2.department_id JOIN head AS T3 ON T2.head_id  =  T3.head_id WHERE T3.born_state  =  '河南'
问题: 至少有3个负责人出生的州的名字是什么？

SQL: SELECT born_state FROM head GROUP BY born_state HAVING count(*)  >=  3
问题: 大多数部门在哪一年成立？

SQL: SELECT creation FROM department GROUP BY creation ORDER BY count(*) DESC LIMIT 1
问题: 显示由临时代理值为“是”的负责人所管理的部门的员工姓名和数目？

SQL: SELECT T1.name ,  T1.num_employees FROM department AS T1 JOIN management AS T2 ON T1.department_id  =  T2.department_id WHERE T2.temporary_acting  =  '是'
问题: 有多少个代理状态？

SQL: SELECT count(DISTINCT temporary_acting) FROM management
问题: 有多少部门由没有提到的负责人领导？

SQL: SELECT count(*) FROM department WHERE department_id NOT IN (SELECT department_id FROM management);
问题: 那些正在代理的负责人有哪些不同的年龄？

SQL: SELECT DISTINCT T1.age FROM management AS T2 JOIN head AS T1 ON T1.head_id  =  T2.head_id WHERE T2.temporary_acting  =  '是'
问题: 列出“财政部”部门秘书和“国土安全部”秘书出生的州。

SQL: SELECT T3.born_state FROM department AS T1 JOIN management AS T2 ON T1.department_id  =  T2.department_id JOIN head AS T3 ON T2.head_id  =  T3.head_id WHERE T1.name  =  '财政部' INTERSECT SELECT T3.born_state FROM department AS T1 JOIN management AS T2 ON T1.department_id  =  T2.department_id JOIN head AS T3 ON T2.head_id  =  T3.head_id WHERE T1.name  =  '国土安全部'
问题: 哪个部门有不止一个负责人？列出ID、姓名和人数。

SQL: SELECT T1.department_id ,  T1.name ,  count(*) FROM management AS T2 JOIN department AS T1 ON T1.department_id  =  T2.department_id GROUP BY T1.department_id HAVING count(*)  >  1
问题: 哪个负责人的名字有“强”这个子串？列出ID和姓名。

SQL: SELECT head_id ,  name FROM head WHERE name LIKE '强'
问题: 那里有多少个农场？

SQL: SELECT count(*) FROM farm
问题: 计算农场的数量。

SQL: SELECT count(*) FROM farm
问题: 按升序列出农场里的马的总数。

SQL: SELECT Total_Horses FROM farm ORDER BY Total_Horses ASC
问题: 按照升序排列，每一个农场的马的总数是什么？

SQL: SELECT Total_Horses FROM farm ORDER BY Total_Horses ASC
问题: 什么主持人所主持比赛的主题不是“外星人”？

SQL: SELECT Hosts FROM farm_competition WHERE Theme !=  '外星人'
问题: 返回主题不是“外星人”的竞赛的主持人？

SQL: SELECT Hosts FROM farm_competition WHERE Theme !=  '外星人'
问题: 按年份排序的农场比赛的主题是什么？

SQL: SELECT Theme FROM farm_competition ORDER BY YEAR ASC
问题: 返回农场比赛的主题，按年份排序。

SQL: SELECT Theme FROM farm_competition ORDER BY YEAR ASC
问题: 拥有超过5000匹马的农场中，平均的工作马的数量是多少？

SQL: SELECT avg(Working_Horses) FROM farm WHERE Total_Horses  >  5000
问题: 给出有5000多匹马的农场的平均工作马的数量。

SQL: SELECT avg(Working_Horses) FROM farm WHERE Total_Horses  >  5000
问题: 所有农场中，奶牛的最大和最小数量是多少？

SQL: SELECT max(Cows) ,  min(Cows) FROM farm
问题: 返回所有农场奶牛的最大和最小数量。

SQL: SELECT max(Cows) ,  min(Cows) FROM farm
问题: 城市有多少种不同的地位？

SQL: SELECT count(DISTINCT Status) FROM city
问题: 统计不同地位的数量。

SQL: SELECT count(DISTINCT Status) FROM city
问题: 按人口降序列出城市的官方名称。

SQL: SELECT Official_Name FROM city ORDER BY Population DESC
问题: 按人口降序排列的城市的官方名称是什么？

SQL: SELECT Official_Name FROM city ORDER BY Population DESC
问题: 列出人口最多的城市的官方名称和状态。

SQL: SELECT Official_Name ,  Status FROM city ORDER BY Population DESC LIMIT 1
问题: 居住人数最多的城市的官方名称和状态是什么？

SQL: SELECT Official_Name ,  Status FROM city ORDER BY Population DESC LIMIT 1
问题: 展示主办比赛城市的年份和正式名称。

SQL: SELECT T2.Year ,  T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID  =  T2.Host_city_ID
问题: 给出每个竞赛的城市的年份和官方名称。

SQL: SELECT T2.Year ,  T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID  =  T2.Host_city_ID
问题: 展示举办了不止一次比赛的城市的官方名称。

SQL: SELECT T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID  =  T2.Host_city_ID GROUP BY T2.Host_city_ID HAVING COUNT(*)  >  1
问题: 举办了不止一次比赛的城市的官方名称是什么？

SQL: SELECT T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID  =  T2.Host_city_ID GROUP BY T2.Host_city_ID HAVING COUNT(*)  >  1
问题: 展示主办城市数量最多的城市的状态。

SQL: SELECT T1.Status FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID  =  T2.Host_city_ID GROUP BY T2.Host_city_ID ORDER BY COUNT(*) DESC LIMIT 1
问题: 主办过最多比赛的城市的状态如何？

SQL: SELECT T1.Status FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID  =  T2.Host_city_ID GROUP BY T2.Host_city_ID ORDER BY COUNT(*) DESC LIMIT 1
问题: 请显示拥有超过1000人的主办城市的比赛主题。

SQL: SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID  =  T2.Host_city_ID WHERE T1.Population  >  1000
问题: 有超过1000居民的主办城市的比赛主题是什么？

SQL: SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID  =  T2.Host_city_ID WHERE T1.Population  >  1000
问题: 请显示不同城市的地位和各个地位的城市平均人口。

SQL: SELECT Status ,  avg(Population) FROM city GROUP BY Status
问题: 每个城市的状态和平均人口是多少？

SQL: SELECT Status ,  avg(Population) FROM city GROUP BY Status
问题: 请按每个状态的城市的数量排列，显示不同的状态。

SQL: SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) ASC
问题: 返回城市的不同状态，按频率递增排序。

SQL: SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) ASC
问题: 列出城市中最常见的一种状态。

SQL: SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1
问题: 在所有城市中最常见的状态是什么？

SQL: SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1
问题: 列出没有比赛的城市的官方名称。

SQL: SELECT Official_Name FROM city WHERE City_ID NOT IN (SELECT Host_city_ID FROM farm_competition)
问题: 没有举办过农场比赛的城市的官方名称是什么？

SQL: SELECT Official_Name FROM city WHERE City_ID NOT IN (SELECT Host_city_ID FROM farm_competition)
问题: 显示人口大于1500和小于500的城市的状态。

SQL: SELECT Status FROM city WHERE Population  >  1500 INTERSECT SELECT Status FROM city WHERE Population  <  500
问题: 人口超过1500的城市和人口低于500的城市，其状态分别是什么？

SQL: SELECT Status FROM city WHERE Population  >  1500 INTERSECT SELECT Status FROM city WHERE Population  <  500
问题: 查找人口大于1500或小于500的城市的官方名称。

SQL: SELECT Official_Name FROM city WHERE Population  >  1500 OR Population  <  500
问题: 人口超过1500或少于500的城市的官方名称是什么？

SQL: SELECT Official_Name FROM city WHERE Population  >  1500 OR Population  <  500
问题: 显示不属于“乡村”的城市的人口普查排名。

SQL: SELECT Census_Ranking FROM city WHERE Status !=  "乡村"
问题: 没有“乡村”状态的城市的人口普查排名是多少？

SQL: SELECT Census_Ranking FROM city WHERE Status !=  "乡村"
问题: 注册学生最多的是哪门课程？

SQL: SELECT T1.course_name FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_Id GROUP BY T1.course_id ORDER BY count(*) DESC LIMIT 1
问题: 最多注册学生的课程名称是什么？

SQL: SELECT T1.course_name FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_Id GROUP BY T1.course_id ORDER BY count(*) DESC LIMIT 1
问题: 注册一些课程但注册课程最少的学生的ID是什么？

SQL: SELECT student_id FROM student_course_registrations GROUP BY student_id ORDER BY count(*) LIMIT 1
问题: 注册课程数量最少但是注册了一些课程的学生的ID是什么？

SQL: SELECT student_id FROM student_course_registrations GROUP BY student_id ORDER BY count(*) LIMIT 1
问题: 所有候选人的名字和姓氏是什么？

SQL: SELECT T2.first_name ,  T2.last_name FROM candidates AS T1 JOIN people AS T2 ON T1.candidate_id = T2.person_id
问题: 列出从不上课的学生的ID？

SQL: SELECT student_id FROM students WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance)
问题: 每一个从未上过课的学生的ID是什么？

SQL: SELECT student_id FROM students WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance)
问题: 列出参加过一些课程的学生的ID？

SQL: SELECT student_id FROM student_course_attendance
问题: 所有参加过至少一门课程的学生的ID是什么？

SQL: SELECT student_id FROM student_course_attendance
问题: 所有上课学生ID是什么？这些课程的名称是什么？

SQL: SELECT T1.student_id ,  T2.course_name FROM student_course_registrations AS T1 JOIN courses AS T2 ON T1.course_id = T2.course_id
问题: 最近注册课程的学生的具体信息是什么？

SQL: SELECT T2.student_details FROM student_course_registrations AS T1 JOIN students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.registration_date DESC LIMIT 1
问题: 关于最近注册课程的学生，我们有哪些信息？

SQL: SELECT T2.student_details FROM student_course_registrations AS T1 JOIN students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.registration_date DESC LIMIT 1
问题: 有多少学生参加英语课程？

SQL: SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "英语"
问题: 参加英语课程的有多少学生？

SQL: SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "英语"
问题: ID为171的学生参加了多少门课程？

SQL: SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T2.student_id = 171
问题: ID 171的学生实际参加了多少门课程？

SQL: SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T2.student_id = 171
问题: 找到电子邮箱为“stanley.monahan@example.org”的候选人的ID。

SQL: SELECT T2.candidate_id FROM people AS T1 JOIN candidates AS T2 ON T1.person_id = T2.candidate_id WHERE T1.email_address = "stanley.monahan@example.org"
问题: 候选人的ID是什么，他的电子邮件是“stanley.monahan@example.org”？

SQL: SELECT T2.candidate_id FROM people AS T1 JOIN candidates AS T2 ON T1.person_id = T2.candidate_id WHERE T1.email_address = "stanley.monahan@example.org"
问题: 找到最近访问课程的候选人的ID？

SQL: SELECT candidate_id FROM candidate_assessments ORDER BY assessment_date DESC LIMIT 1
问题: 最近访问课程的候选人的ID是什么？

SQL: SELECT candidate_id FROM candidate_assessments ORDER BY assessment_date DESC LIMIT 1
问题: 注册最多课程的学生的具体信息是什么？

SQL: SELECT T1.student_details FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1
问题: 注册课程最多的学生的详细情况是什么？

SQL: SELECT T1.student_details FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1
问题: 列出注册一些课程的学生的ID和注册课程的数量？

SQL: SELECT T1.student_id ,  count(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id
问题: 对于每个注册了某些课程的学生，他们注册了多少课程？

SQL: SELECT T1.student_id ,  count(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id
问题: 每门课程有多少注册学生？列出课程名称和注册的学生人数？

SQL: SELECT T3.course_name ,  count(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id JOIN courses AS T3 ON T2.course_id = T3.course_id GROUP BY T2.course_id
问题: 对于每个课程ID，注册了多少学生，课程名称是什么？

SQL: SELECT T3.course_name ,  count(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id JOIN courses AS T3 ON T2.course_id = T3.course_id GROUP BY T2.course_id
问题: 找到评估码为“通过”的候选人ID？

SQL: SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = "通过"
问题: 成绩代码为及格的候选人的ID是什么？

SQL: SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = "通过"
问题: 查找评估代码是“失败”的考生的手机号码？

SQL: SELECT T3.cell_mobile_number FROM candidates AS T1 JOIN candidate_assessments AS T2 ON T1.candidate_id = T2.candidate_id JOIN people AS T3 ON T1.candidate_id = T3.person_id WHERE T2.asessment_outcome_code = "失败"
问题: 收到“失败”评估码的候选人的手机号码是多少？

SQL: SELECT T3.cell_mobile_number FROM candidates AS T1 JOIN candidate_assessments AS T2 ON T1.candidate_id = T2.candidate_id JOIN people AS T3 ON T1.candidate_id = T3.person_id WHERE T2.asessment_outcome_code = "失败"
问题: 那些注册301课程的学生的ID是什么？

SQL: SELECT student_id FROM student_course_attendance WHERE course_id  =  301
问题: 注册301课程的学生的ID是什么？

SQL: SELECT student_id FROM student_course_attendance WHERE course_id  =  301
问题: 最近注册301课程的学生的ID是什么？

SQL: SELECT student_id FROM student_course_attendance WHERE course_id = 301 ORDER BY date_of_attendance DESC LIMIT 1
问题: 对于最近注册301课程的学生，他们的ID是什么？

SQL: SELECT student_id FROM student_course_attendance WHERE course_id = 301 ORDER BY date_of_attendance DESC LIMIT 1
问题: 找到人的地址的不同城市？

SQL: SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id
问题: 人们居住的不同城市有哪些？

SQL: SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id
问题: 找出学生地址的不同城市？

SQL: SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id JOIN students AS T3 ON T2.person_id = T3.student_id
问题: 学生居住的不同城市有哪些？

SQL: SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id JOIN students AS T3 ON T2.person_id = T3.student_id
问题: 按字母顺序列出课程名称？

SQL: SELECT course_name FROM courses ORDER BY course_name
问题: 按字母顺序排列的课程名称是什么？

SQL: SELECT course_name FROM courses ORDER BY course_name
问题: 按字母顺序列出人的名字？

SQL: SELECT first_name FROM people ORDER BY first_name
问题: 按字母顺序排列的人的名字是什么？

SQL: SELECT first_name FROM people ORDER BY first_name
问题: 注册课程或参加课程的学生的ID是什么？

SQL: SELECT student_id FROM student_course_registrations UNION SELECT student_id FROM student_course_attendance
问题: 注册或参加课程的学生的ID是什么？

SQL: SELECT student_id FROM student_course_registrations UNION SELECT student_id FROM student_course_attendance
问题: 查找ID为121的学生注册或参加的课程的ID？

SQL: SELECT course_id FROM student_course_registrations WHERE student_id = 121 UNION SELECT course_id FROM student_course_attendance WHERE student_id = 121
问题: ID是121的学生所注册或参加的课程的ID是什么？

SQL: SELECT course_id FROM student_course_registrations WHERE student_id = 121 UNION SELECT course_id FROM student_course_attendance WHERE student_id = 121
问题: 注册课程但不参加课程的学生都有哪些信息？

SQL: SELECT * FROM student_course_registrations WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance)
问题: 注册但没有参加任何课程的学生的详细情况是什么？

SQL: SELECT * FROM student_course_registrations WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance)
问题: 按照注册日期的顺序列出注册“统计学”课程的学生的ID。

SQL: SELECT T2.student_id FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "统计学" ORDER BY T2.registration_date
问题: 按注册日期顺序排序，注册“统计学”课程的学生的ID是什么？

SQL: SELECT T2.student_id FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "统计学" ORDER BY T2.registration_date
问题: 按照出勤日期的顺序列出参加“统计学”课程的学生的ID。

SQL: SELECT T2.student_id FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "统计学" ORDER BY T2.date_of_attendance
问题: 按照出勤日期的顺序，上“统计学”学院课程的学生的ID是什么？

SQL: SELECT T2.student_id FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "统计学" ORDER BY T2.date_of_attendance
问题: 给我最高温度高于85的日期。

SQL: SELECT date FROM weather WHERE max_temperature_f  >  85
问题: 最高温度高于85的日期是什么？

SQL: SELECT date FROM weather WHERE max_temperature_f  >  85
问题: 纬度低于37.5的车站名称是什么？

SQL: SELECT name FROM station WHERE lat  <  37.5
问题: 纬度小于37.5的所有车站的名称是什么？

SQL: SELECT name FROM station WHERE lat  <  37.5
问题: 对于每一个城市，返回所有车站的最高纬度。

SQL: SELECT city ,  max(lat) FROM station GROUP BY city
问题: 对于每一个城市来说，其车站的最高纬度是什么？

SQL: SELECT city ,  max(lat) FROM station GROUP BY city
问题: 给我三个ID最老的路线的起始站和结束站。

SQL: SELECT start_station_name ,  end_station_name FROM trip ORDER BY id LIMIT 3
问题: 三个最小ID的路线的起始站和终点站是什么？

SQL: SELECT start_station_name ,  end_station_name FROM trip ORDER BY id LIMIT 3
问题: “长沙”市车站平均纬度和经度是多少？

SQL: SELECT avg(lat) ,  avg(long) FROM station WHERE city  =  "长沙"
问题: “长沙”市的平均纬度和经度是多少？

SQL: SELECT avg(lat) ,  avg(long) FROM station WHERE city  =  "长沙"
问题: 长度最短的路线的ID是什么？

SQL: SELECT id FROM trip ORDER BY duration LIMIT 1
问题: 最短路线的ID是什么？

SQL: SELECT id FROM trip ORDER BY duration LIMIT 1
问题: ID为636的自行车的路线的总时间和最大持续时间是多少？

SQL: SELECT sum(duration) ,  max(duration) FROM trip WHERE bike_id  =  636
问题: ID为636自行车的所有路线的总时间和最大持续时间是多少？

SQL: SELECT sum(duration) ,  max(duration) FROM trip WHERE bike_id  =  636
问题: 对于每个邮编，返回那里8月的平均温度。

SQL: SELECT zip_code  ,  avg(mean_temperature_f) FROM weather WHERE date LIKE "八月" GROUP BY zip_code
问题: 对于每个邮政编码，以“8”开头的所有日期的平均温度是多少？

SQL: SELECT zip_code  ,  avg(mean_temperature_f) FROM weather WHERE date LIKE "八月" GROUP BY zip_code
问题: 从路线记录，找出不同的自行车的数量。

SQL: SELECT count(DISTINCT bike_id) FROM trip
问题: 有多少个不同的自行车ID？

SQL: SELECT count(DISTINCT bike_id) FROM trip
问题: 车站所处的不同城市的数量是多少？

SQL: SELECT count(DISTINCT city) FROM station
问题: 这些车站在多少个不同的城市？

SQL: SELECT count(DISTINCT city) FROM station
问题: “重庆”城有多少个车站？

SQL: SELECT COUNT(*) FROM station WHERE city  =  "重庆"
问题: “重庆”有多少车站？

SQL: SELECT COUNT(*) FROM station WHERE city  =  "重庆"
问题: 返回曾经有7辆可用自行车的车站的唯一名称。

SQL: SELECT DISTINCT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id  =  T2.station_id WHERE T2.bikes_available  =  7
问题: 每个曾经有7辆可用自行车的车站都有哪些不同的名字？

SQL: SELECT DISTINCT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id  =  T2.station_id WHERE T2.bikes_available  =  7
问题: 哪一个起点站从8月份开始的路线最多？请告诉我车站的名字和ID。

SQL: SELECT start_station_name ,  start_station_id FROM trip WHERE start_date LIKE "八月" GROUP BY start_station_name ORDER BY COUNT(*) DESC LIMIT 1
问题: 八月份出发次数最多的那个出发站的名称和ID是什么？

SQL: SELECT start_station_name ,  start_station_id FROM trip WHERE start_date LIKE "八月" GROUP BY start_station_name ORDER BY COUNT(*) DESC LIMIT 1
问题: 哪辆自行车路线在邮政编码94002的地区旅行最多？

SQL: SELECT bike_id FROM trip WHERE zip_code  =  94002 GROUP BY bike_id ORDER BY COUNT(*) DESC LIMIT 1
问题: 在邮政编码94002的地区中的旅行最多的自行车的ID是多少？

SQL: SELECT bike_id FROM trip WHERE zip_code  =  94002 GROUP BY bike_id ORDER BY COUNT(*) DESC LIMIT 1
问题: 有多少天平均湿度在50以上，平均能见度在8以上？

SQL: SELECT COUNT(*) FROM weather WHERE mean_humidity  >  50 AND mean_visibility_miles  >  8
问题: 平均湿度超过50，平均能见度超过8天的天数是多少？

SQL: SELECT COUNT(*) FROM weather WHERE mean_humidity  >  50 AND mean_visibility_miles  >  8
问题: 最短的路线开始的车站是的纬度、经度、城市是什么？

SQL: SELECT T1.lat ,  T1.long ,  T1.city FROM station AS T1 JOIN trip AS T2 ON T1.id  =  T2.start_station_id ORDER BY T2.duration LIMIT 1
问题: 从什么纬度、经度和城市的车站开始的路线最短？

SQL: SELECT T1.lat ,  T1.long ,  T1.city FROM station AS T1 JOIN trip AS T2 ON T1.id  =  T2.start_station_id ORDER BY T2.duration LIMIT 1
问题: 平均自行车可用数在10以上的“厦门”的站台ID是什么？

SQL: SELECT id FROM station WHERE city  =  "厦门" INTERSECT SELECT station_id FROM status GROUP BY station_id HAVING avg(bikes_available)  >  10
问题: “厦门”通常有超过10辆可用自行车的车站ID有哪些？

SQL: SELECT id FROM station WHERE city  =  "厦门" INTERSECT SELECT station_id FROM status GROUP BY station_id HAVING avg(bikes_available)  >  10
问题: 平均有14辆以上可用自行车或在12月份安装自行车的车站的名称和ID是什么？

SQL: SELECT T1.name ,  T1.id FROM station AS T1 JOIN status AS T2 ON T1.id  =  T2.station_id GROUP BY T2.station_id HAVING avg(T2.bikes_available)  >  14 UNION SELECT name ,  id FROM station WHERE installation_date LIKE "十二月"
问题: 平均有14辆以上可用自行车或在12月安装自行车的所有车站的名称和ID是什么？

SQL: SELECT T1.name ,  T1.id FROM station AS T1 JOIN status AS T2 ON T1.id  =  T2.station_id GROUP BY T2.station_id HAVING avg(T2.bikes_available)  >  14 UNION SELECT name ,  id FROM station WHERE installation_date LIKE "十二月"
问题: 在邮政编码94107的地区，3种最常见的云覆盖率是多少？

SQL: SELECT cloud_cover FROM weather WHERE zip_code  =  94107 GROUP BY cloud_cover ORDER BY COUNT (*) DESC LIMIT 3
问题: 94107邮政编码地区中最常见的3种云覆盖是什么？

SQL: SELECT cloud_cover FROM weather WHERE zip_code  =  94107 GROUP BY cloud_cover ORDER BY COUNT (*) DESC LIMIT 3
问题: 平均海平面气压最低的地区的邮编是多少？

SQL: SELECT zip_code FROM weather GROUP BY zip_code ORDER BY avg(mean_sea_level_pressure_inches) LIMIT 1
问题: 平均海平面气压最低的地区邮编是什么？

SQL: SELECT zip_code FROM weather GROUP BY zip_code ORDER BY avg(mean_sea_level_pressure_inches) LIMIT 1
问题: 不是位于“西安”市的车站里，自行车的平均可用数是多少？

SQL: SELECT avg(bikes_available) FROM status WHERE station_id NOT IN (SELECT id FROM station WHERE city  =  "西安")
问题: 不在“西安”市的车站的平均自行车可用率是多少？

SQL: SELECT avg(bikes_available) FROM status WHERE station_id NOT IN (SELECT id FROM station WHERE city  =  "西安")
问题: 从来没有超过10辆可用自行车的车站的平均经度是多少？

SQL: SELECT avg(long) FROM station WHERE id NOT IN (SELECT station_id FROM status GROUP BY station_id HAVING max(bikes_available)  >  10)
问题: 对于从来没有超过10辆可用自行车的所有车站，它们的平均经度是多少？

SQL: SELECT avg(long) FROM station WHERE id NOT IN (SELECT station_id FROM status GROUP BY station_id HAVING max(bikes_available)  >  10)
问题: 什么时候，在什么邮政编码地区最大温度达到80？

SQL: SELECT date ,  zip_code FROM weather WHERE max_temperature_f  >=  80
问题: 什么邮政编码地区有一个最高温度大于或等于80的车站，什么时候达到这个温度？

SQL: SELECT date ,  zip_code FROM weather WHERE max_temperature_f  >=  80
问题: 请给出平均温度高于60度的邮政编码区进行的所有路线的ID。

SQL: SELECT T1.id FROM trip AS T1 JOIN weather AS T2 ON T1.zip_code  =  T2.zip_code GROUP BY T2.zip_code HAVING avg(T2.mean_temperature_f)  >  60
问题: 对于每个邮政编码地区，找到所有具有平均温度在60以上的路线的ID？

SQL: SELECT T1.id FROM trip AS T1 JOIN weather AS T2 ON T1.zip_code  =  T2.zip_code GROUP BY T2.zip_code HAVING avg(T2.mean_temperature_f)  >  60
问题: 对于每个邮编地区，返回最大风速达到25的次数？

SQL: SELECT zip_code , count(*) FROM weather WHERE max_wind_Speed_mph  >=  25 GROUP BY zip_code
问题: 对于每一个邮政编码地区，多少次最大风速达到25英里每小时？

SQL: SELECT zip_code , count(*) FROM weather WHERE max_wind_Speed_mph  >=  25 GROUP BY zip_code
问题: 哪一天哪个地区的最小露点低于邮编94107地区中任何一天，这些地区的邮编是什么？

SQL: SELECT date ,  zip_code FROM weather WHERE min_dew_point_f  <  (SELECT min(min_dew_point_f) FROM weather WHERE zip_code  =  94107)
问题: 哪些天的最低露点比邮政编码94107中的任何一天都要小，在哪个邮政编码地区中进行测量的？

SQL: SELECT date ,  zip_code FROM weather WHERE min_dew_point_f  <  (SELECT min(min_dew_point_f) FROM weather WHERE zip_code  =  94107)
问题: 针对每个路线，返回其终点站的安装日期。

SQL: SELECT T1.id ,  T2.installation_date FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id  =  T2.id
问题: 每个旅程的终点站的安装日期是多少？

SQL: SELECT T1.id ,  T2.installation_date FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id  =  T2.id
问题: 哪一次旅行从码头数最多的车站开始？把旅行id给我。

SQL: SELECT T1.id FROM trip AS T1 JOIN station AS T2 ON T1.start_station_id  =  T2.id ORDER BY T2.dock_count DESC LIMIT 1
问题: 从码头数最高的车站出发的旅行ID是什么？

SQL: SELECT T1.id FROM trip AS T1 JOIN station AS T2 ON T1.start_station_id  =  T2.id ORDER BY T2.dock_count DESC LIMIT 1
问题: 统计不是结束在“厦门”市的旅行的次数。

SQL: SELECT count(*) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id  =  T2.id WHERE T2.city !=  "厦门"
问题: 有多少次旅行没有结束在“厦门”？

SQL: SELECT count(*) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id  =  T2.id WHERE T2.city != "厦门"
问题: 在邮政编码94107，在哪一天既没有“大雨”也没有观察到“大雾”？

SQL: SELECT date FROM weather WHERE zip_code  =  94107 AND EVENTS != "大雾" AND EVENTS != "大雨"
问题: 在94107的邮政编码哪一天既没有“大雨”也没有“大雾”？

SQL: SELECT date FROM weather WHERE zip_code  =  94107 AND EVENTS != "大雾" AND EVENTS != "大雨"
问题: 那些纬度在37.4以上、自行车可用率从来在7以下的车站的ID是多少？

SQL: SELECT id FROM station WHERE lat  >  37.4 EXCEPT SELECT station_id FROM status GROUP BY station_id HAVING min(bikes_available)  <  7
问题: 所有纬度在37.4以上、从来没有少于7辆可用自行车的车站的ID是什么？

SQL: SELECT id FROM station WHERE lat  >  37.4 EXCEPT SELECT station_id FROM status GROUP BY station_id HAVING min(bikes_available)  <  7
问题: 哪些车站的平均自行车供应量超过10而且不位于'“长沙”‘市？

SQL: SELECT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id  =  T2.station_id GROUP BY T2.station_id HAVING avg(bikes_available)  >  10 EXCEPT SELECT name FROM station WHERE city  =  "长沙"
问题: 有超过十辆自行车，而且不在'“长沙”‘的所有车站都叫什么名字？

SQL: SELECT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id  =  T2.station_id GROUP BY T2.station_id HAVING avg(bikes_available)  >  10 EXCEPT SELECT name FROM station WHERE city  =  "长沙"
问题: 最低纬度的车站的名称、纬度和城市是什么？

SQL: SELECT name ,  lat ,  city FROM station ORDER BY lat LIMIT 1
问题: 位于最南边的火车站的名称、纬度和城市是什么？

SQL: SELECT name ,  lat ,  city FROM station ORDER BY lat LIMIT 1
问题: 最大阵风速度最高的3天的日期、平均温度和平均湿度是多少？

SQL: SELECT date ,  mean_temperature_f ,  mean_humidity FROM weather ORDER BY max_gust_speed_mph DESC LIMIT 3
问题: 三个最大阵风速度的日子的日期、平均温度和平均湿度是多少？

SQL: SELECT date ,  mean_temperature_f ,  mean_humidity FROM weather ORDER BY max_gust_speed_mph DESC LIMIT 3
问题: 列出所有至少有15个站点的城市的名称和站点数量。

SQL: SELECT city ,  COUNT(*) FROM station GROUP BY city HAVING COUNT(*)  >=  15
问题: 每个至少有15个车站的城市叫什么名字？有多少个车站？

SQL: SELECT city ,  COUNT(*) FROM station GROUP BY city HAVING COUNT(*)  >=  15
问题: 查找至少有200个路线开始的站的ID和名称。

SQL: SELECT start_station_id ,  start_station_name FROM trip GROUP BY start_station_name HAVING COUNT(*)  >=  200
问题: 至少是200个路线的出发站的车站的ID和名称是什么？

SQL: SELECT start_station_id ,  start_station_name FROM trip GROUP BY start_station_name HAVING COUNT(*)  >=  200
问题: 找到平均能见度低于10的地区的邮政编码。

SQL: SELECT zip_code FROM weather GROUP BY zip_code HAVING avg(mean_visibility_miles)  <  10