system
stringlengths
30
393
conversations
list
CREATE TABLE student_course_registrations (student_id VARCHAR), CREATE TABLE student_course_attendance (student_id VARCHAR)
[ { "from": "user", "value": "注册或参加课程的学生的ID是什么?" }, { "from": "assistant", "value": "SELECT student_id FROM student_course_registrations UNION SELECT student_id FROM student_course_attendance" } ]
CREATE TABLE student_course_registrations (course_id VARCHAR, student_id VARCHAR), CREATE TABLE student_course_attendance (course_id VARCHAR, student_id VARCHAR)
[ { "from": "user", "value": "查找ID为121的学生注册或参加的课程的ID?" }, { "from": "assistant", "value": "SELECT course_id FROM student_course_registrations WHERE student_id = 121 UNION SELECT course_id FROM student_course_attendance WHERE student_id = 121" } ]
CREATE TABLE student_course_registrations (course_id VARCHAR, student_id VARCHAR), CREATE TABLE student_course_attendance (course_id VARCHAR, student_id VARCHAR)
[ { "from": "user", "value": "ID是121的学生所注册或参加的课程的ID是什么?" }, { "from": "assistant", "value": "SELECT course_id FROM student_course_registrations WHERE student_id = 121 UNION SELECT course_id FROM student_course_attendance WHERE student_id = 121" } ]
CREATE TABLE student_course_registrations (student_id VARCHAR), CREATE TABLE student_course_attendance (student_id VARCHAR)
[ { "from": "user", "value": "注册课程但不参加课程的学生都有哪些信息?" }, { "from": "assistant", "value": "SELECT * FROM student_course_registrations WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance)" } ]
CREATE TABLE student_course_registrations (student_id VARCHAR), CREATE TABLE student_course_attendance (student_id VARCHAR)
[ { "from": "user", "value": "注册但没有参加任何课程的学生的详细情况是什么?" }, { "from": "assistant", "value": "SELECT * FROM student_course_registrations WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance)" } ]
CREATE TABLE courses (course_id VARCHAR, course_name VARCHAR), CREATE TABLE student_course_registrations (course_id VARCHAR, student_id VARCHAR, registration_date VARCHAR)
[ { "from": "user", "value": "按照注册日期的顺序列出注册“统计学”课程的学生的ID。" }, { "from": "assistant", "value": "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" } ]
CREATE TABLE courses (course_id VARCHAR, course_name VARCHAR), CREATE TABLE student_course_registrations (course_id VARCHAR, student_id VARCHAR, registration_date VARCHAR)
[ { "from": "user", "value": "按注册日期顺序排序,注册“统计学”课程的学生的ID是什么?" }, { "from": "assistant", "value": "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" } ]
CREATE TABLE courses (course_id VARCHAR, course_name VARCHAR), CREATE TABLE student_course_attendance (course_id VARCHAR, student_id VARCHAR, date_of_attendance VARCHAR)
[ { "from": "user", "value": "按照出勤日期的顺序列出参加“统计学”课程的学生的ID。" }, { "from": "assistant", "value": "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" } ]
CREATE TABLE courses (course_id VARCHAR, course_name VARCHAR), CREATE TABLE student_course_attendance (course_id VARCHAR, student_id VARCHAR, date_of_attendance VARCHAR)
[ { "from": "user", "value": "按照出勤日期的顺序,上“统计学”学院课程的学生的ID是什么?" }, { "from": "assistant", "value": "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" } ]
CREATE TABLE weather (max_temperature_f INTEGER, date VARCHAR)
[ { "from": "user", "value": "给我最高温度高于85的日期。" }, { "from": "assistant", "value": "SELECT date FROM weather WHERE max_temperature_f > 85" } ]
CREATE TABLE weather (max_temperature_f INTEGER, date VARCHAR)
[ { "from": "user", "value": "最高温度高于85的日期是什么?" }, { "from": "assistant", "value": "SELECT date FROM weather WHERE max_temperature_f > 85" } ]
CREATE TABLE station (name VARCHAR, lat INTEGER)
[ { "from": "user", "value": "纬度低于37.5的车站名称是什么?" }, { "from": "assistant", "value": "SELECT name FROM station WHERE lat < 37.5" } ]
CREATE TABLE station (name VARCHAR, lat INTEGER)
[ { "from": "user", "value": "纬度小于37.5的所有车站的名称是什么?" }, { "from": "assistant", "value": "SELECT name FROM station WHERE lat < 37.5" } ]
CREATE TABLE station (city VARCHAR, lat INTEGER)
[ { "from": "user", "value": "对于每一个城市,返回所有车站的最高纬度。" }, { "from": "assistant", "value": "SELECT city , max(lat) FROM station GROUP BY city" } ]
CREATE TABLE station (city VARCHAR, lat INTEGER)
[ { "from": "user", "value": "对于每一个城市来说,其车站的最高纬度是什么?" }, { "from": "assistant", "value": "SELECT city , max(lat) FROM station GROUP BY city" } ]
CREATE TABLE trip (start_station_name VARCHAR, id VARCHAR, end_station_name VARCHAR)
[ { "from": "user", "value": "给我三个ID最老的路线的起始站和结束站。" }, { "from": "assistant", "value": "SELECT start_station_name , end_station_name FROM trip ORDER BY id LIMIT 3" } ]
CREATE TABLE trip (start_station_name VARCHAR, id VARCHAR, end_station_name VARCHAR)
[ { "from": "user", "value": "三个最小ID的路线的起始站和终点站是什么?" }, { "from": "assistant", "value": "SELECT start_station_name , end_station_name FROM trip ORDER BY id LIMIT 3" } ]
CREATE TABLE station (city VARCHAR, long INTEGER, lat INTEGER)
[ { "from": "user", "value": "“长沙”市车站平均纬度和经度是多少?" }, { "from": "assistant", "value": "SELECT avg(lat) , avg(long) FROM station WHERE city = \"长沙\"" } ]
CREATE TABLE station (city VARCHAR, long INTEGER, lat INTEGER)
[ { "from": "user", "value": "“长沙”市的平均纬度和经度是多少?" }, { "from": "assistant", "value": "SELECT avg(lat) , avg(long) FROM station WHERE city = \"长沙\"" } ]
CREATE TABLE trip (duration VARCHAR, id VARCHAR)
[ { "from": "user", "value": "长度最短的路线的ID是什么?" }, { "from": "assistant", "value": "SELECT id FROM trip ORDER BY duration LIMIT 1" } ]
CREATE TABLE trip (duration VARCHAR, id VARCHAR)
[ { "from": "user", "value": "最短路线的ID是什么?" }, { "from": "assistant", "value": "SELECT id FROM trip ORDER BY duration LIMIT 1" } ]
CREATE TABLE trip (bike_id VARCHAR, duration INTEGER)
[ { "from": "user", "value": "ID为636的自行车的路线的总时间和最大持续时间是多少?" }, { "from": "assistant", "value": "SELECT sum(duration) , max(duration) FROM trip WHERE bike_id = 636" } ]
CREATE TABLE trip (bike_id VARCHAR, duration INTEGER)
[ { "from": "user", "value": "ID为636自行车的所有路线的总时间和最大持续时间是多少?" }, { "from": "assistant", "value": "SELECT sum(duration) , max(duration) FROM trip WHERE bike_id = 636" } ]
CREATE TABLE weather (mean_temperature_f INTEGER, zip_code VARCHAR, date VARCHAR)
[ { "from": "user", "value": "对于每个邮编,返回那里8月的平均温度。" }, { "from": "assistant", "value": "SELECT zip_code , avg(mean_temperature_f) FROM weather WHERE date LIKE \"八月\" GROUP BY zip_code" } ]
CREATE TABLE weather (mean_temperature_f INTEGER, zip_code VARCHAR, date VARCHAR)
[ { "from": "user", "value": "对于每个邮政编码,以“8”开头的所有日期的平均温度是多少?" }, { "from": "assistant", "value": "SELECT zip_code , avg(mean_temperature_f) FROM weather WHERE date LIKE \"八月\" GROUP BY zip_code" } ]
CREATE TABLE trip (bike_id VARCHAR)
[ { "from": "user", "value": "从路线记录,找出不同的自行车的数量。" }, { "from": "assistant", "value": "SELECT count(DISTINCT bike_id) FROM trip" } ]
CREATE TABLE trip (bike_id VARCHAR)
[ { "from": "user", "value": "有多少个不同的自行车ID?" }, { "from": "assistant", "value": "SELECT count(DISTINCT bike_id) FROM trip" } ]
CREATE TABLE station (city VARCHAR)
[ { "from": "user", "value": "车站所处的不同城市的数量是多少?" }, { "from": "assistant", "value": "SELECT count(DISTINCT city) FROM station" } ]
CREATE TABLE station (city VARCHAR)
[ { "from": "user", "value": "这些车站在多少个不同的城市?" }, { "from": "assistant", "value": "SELECT count(DISTINCT city) FROM station" } ]
CREATE TABLE station (city VARCHAR)
[ { "from": "user", "value": "“重庆”城有多少个车站?" }, { "from": "assistant", "value": "SELECT COUNT(*) FROM station WHERE city = \"重庆\"" } ]
CREATE TABLE station (city VARCHAR)
[ { "from": "user", "value": "“重庆”有多少车站?" }, { "from": "assistant", "value": "SELECT COUNT(*) FROM station WHERE city = \"重庆\"" } ]
CREATE TABLE station (id VARCHAR, name VARCHAR), CREATE TABLE status (bikes_available VARCHAR, station_id VARCHAR)
[ { "from": "user", "value": "返回曾经有7辆可用自行车的车站的唯一名称。" }, { "from": "assistant", "value": "SELECT DISTINCT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available = 7" } ]
CREATE TABLE station (id VARCHAR, name VARCHAR), CREATE TABLE status (bikes_available VARCHAR, station_id VARCHAR)
[ { "from": "user", "value": "每个曾经有7辆可用自行车的车站都有哪些不同的名字?" }, { "from": "assistant", "value": "SELECT DISTINCT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available = 7" } ]
CREATE TABLE trip (start_station_id VARCHAR, start_date VARCHAR, start_station_name VARCHAR)
[ { "from": "user", "value": "哪一个起点站从8月份开始的路线最多?请告诉我车站的名字和ID。" }, { "from": "assistant", "value": "SELECT start_station_name , start_station_id FROM trip WHERE start_date LIKE \"八月\" GROUP BY start_station_name ORDER BY COUNT(*) DESC LIMIT 1" } ]
CREATE TABLE trip (start_station_id VARCHAR, start_date VARCHAR, start_station_name VARCHAR)
[ { "from": "user", "value": "八月份出发次数最多的那个出发站的名称和ID是什么?" }, { "from": "assistant", "value": "SELECT start_station_name , start_station_id FROM trip WHERE start_date LIKE \"八月\" GROUP BY start_station_name ORDER BY COUNT(*) DESC LIMIT 1" } ]
CREATE TABLE trip (bike_id VARCHAR, zip_code VARCHAR)
[ { "from": "user", "value": "哪辆自行车路线在邮政编码94002的地区旅行最多?" }, { "from": "assistant", "value": "SELECT bike_id FROM trip WHERE zip_code = 94002 GROUP BY bike_id ORDER BY COUNT(*) DESC LIMIT 1" } ]
CREATE TABLE trip (bike_id VARCHAR, zip_code VARCHAR)
[ { "from": "user", "value": "在邮政编码94002的地区中的旅行最多的自行车的ID是多少?" }, { "from": "assistant", "value": "SELECT bike_id FROM trip WHERE zip_code = 94002 GROUP BY bike_id ORDER BY COUNT(*) DESC LIMIT 1" } ]
CREATE TABLE weather (mean_humidity INTEGER, mean_visibility_miles INTEGER)
[ { "from": "user", "value": "有多少天平均湿度在50以上,平均能见度在8以上?" }, { "from": "assistant", "value": "SELECT COUNT(*) FROM weather WHERE mean_humidity > 50 AND mean_visibility_miles > 8" } ]
CREATE TABLE weather (mean_humidity INTEGER, mean_visibility_miles INTEGER)
[ { "from": "user", "value": "平均湿度超过50,平均能见度超过8天的天数是多少?" }, { "from": "assistant", "value": "SELECT COUNT(*) FROM weather WHERE mean_humidity > 50 AND mean_visibility_miles > 8" } ]
CREATE TABLE station (long VARCHAR, lat VARCHAR, city VARCHAR, id VARCHAR), CREATE TABLE trip (duration VARCHAR, start_station_id VARCHAR)
[ { "from": "user", "value": "最短的路线开始的车站是的纬度、经度、城市是什么?" }, { "from": "assistant", "value": "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" } ]
CREATE TABLE station (long VARCHAR, lat VARCHAR, city VARCHAR, id VARCHAR), CREATE TABLE trip (duration VARCHAR, start_station_id VARCHAR)
[ { "from": "user", "value": "从什么纬度、经度和城市的车站开始的路线最短?" }, { "from": "assistant", "value": "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" } ]
CREATE TABLE station (city VARCHAR, station_id VARCHAR, id VARCHAR, bikes_available INTEGER), CREATE TABLE status (city VARCHAR, station_id VARCHAR, id VARCHAR, bikes_available INTEGER)
[ { "from": "user", "value": "平均自行车可用数在10以上的“厦门”的站台ID是什么?" }, { "from": "assistant", "value": "SELECT id FROM station WHERE city = \"厦门\" INTERSECT SELECT station_id FROM status GROUP BY station_id HAVING avg(bikes_available) > 10" } ]
CREATE TABLE station (city VARCHAR, station_id VARCHAR, id VARCHAR, bikes_available INTEGER), CREATE TABLE status (city VARCHAR, station_id VARCHAR, id VARCHAR, bikes_available INTEGER)
[ { "from": "user", "value": "“厦门”通常有超过10辆可用自行车的车站ID有哪些?" }, { "from": "assistant", "value": "SELECT id FROM station WHERE city = \"厦门\" INTERSECT SELECT station_id FROM status GROUP BY station_id HAVING avg(bikes_available) > 10" } ]
CREATE TABLE station (id VARCHAR, name VARCHAR, installation_date VARCHAR), CREATE TABLE status (station_id VARCHAR, bikes_available INTEGER)
[ { "from": "user", "value": "平均有14辆以上可用自行车或在12月份安装自行车的车站的名称和ID是什么?" }, { "from": "assistant", "value": "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 \"十二月\"" } ]
CREATE TABLE station (id VARCHAR, name VARCHAR, installation_date VARCHAR), CREATE TABLE status (station_id VARCHAR, bikes_available INTEGER)
[ { "from": "user", "value": "平均有14辆以上可用自行车或在12月安装自行车的所有车站的名称和ID是什么?" }, { "from": "assistant", "value": "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 \"十二月\"" } ]
CREATE TABLE weather (cloud_cover VARCHAR, zip_code VARCHAR)
[ { "from": "user", "value": "在邮政编码94107的地区,3种最常见的云覆盖率是多少?" }, { "from": "assistant", "value": "SELECT cloud_cover FROM weather WHERE zip_code = 94107 GROUP BY cloud_cover ORDER BY COUNT (*) DESC LIMIT 3" } ]
CREATE TABLE weather (cloud_cover VARCHAR, zip_code VARCHAR)
[ { "from": "user", "value": "94107邮政编码地区中最常见的3种云覆盖是什么?" }, { "from": "assistant", "value": "SELECT cloud_cover FROM weather WHERE zip_code = 94107 GROUP BY cloud_cover ORDER BY COUNT (*) DESC LIMIT 3" } ]
CREATE TABLE weather (mean_sea_level_pressure_inches INTEGER, zip_code VARCHAR)
[ { "from": "user", "value": "平均海平面气压最低的地区的邮编是多少?" }, { "from": "assistant", "value": "SELECT zip_code FROM weather GROUP BY zip_code ORDER BY avg(mean_sea_level_pressure_inches) LIMIT 1" } ]
CREATE TABLE weather (mean_sea_level_pressure_inches INTEGER, zip_code VARCHAR)
[ { "from": "user", "value": "平均海平面气压最低的地区邮编是什么?" }, { "from": "assistant", "value": "SELECT zip_code FROM weather GROUP BY zip_code ORDER BY avg(mean_sea_level_pressure_inches) LIMIT 1" } ]
CREATE TABLE status (city VARCHAR, station_id VARCHAR, bikes_available INTEGER, id VARCHAR), CREATE TABLE station (city VARCHAR, station_id VARCHAR, bikes_available INTEGER, id VARCHAR)
[ { "from": "user", "value": "不是位于“西安”市的车站里,自行车的平均可用数是多少?" }, { "from": "assistant", "value": "SELECT avg(bikes_available) FROM status WHERE station_id NOT IN (SELECT id FROM station WHERE city = \"西安\")" } ]
CREATE TABLE status (city VARCHAR, station_id VARCHAR, bikes_available INTEGER, id VARCHAR), CREATE TABLE station (city VARCHAR, station_id VARCHAR, bikes_available INTEGER, id VARCHAR)
[ { "from": "user", "value": "不在“西安”市的车站的平均自行车可用率是多少?" }, { "from": "assistant", "value": "SELECT avg(bikes_available) FROM status WHERE station_id NOT IN (SELECT id FROM station WHERE city = \"西安\")" } ]
CREATE TABLE station (bikes_available INTEGER, station_id VARCHAR, id VARCHAR, long INTEGER), CREATE TABLE status (bikes_available INTEGER, station_id VARCHAR, id VARCHAR, long INTEGER)
[ { "from": "user", "value": "从来没有超过10辆可用自行车的车站的平均经度是多少?" }, { "from": "assistant", "value": "SELECT avg(long) FROM station WHERE id NOT IN (SELECT station_id FROM status GROUP BY station_id HAVING max(bikes_available) > 10)" } ]
CREATE TABLE station (bikes_available INTEGER, station_id VARCHAR, id VARCHAR, long INTEGER), CREATE TABLE status (bikes_available INTEGER, station_id VARCHAR, id VARCHAR, long INTEGER)
[ { "from": "user", "value": "对于从来没有超过10辆可用自行车的所有车站,它们的平均经度是多少?" }, { "from": "assistant", "value": "SELECT avg(long) FROM station WHERE id NOT IN (SELECT station_id FROM status GROUP BY station_id HAVING max(bikes_available) > 10)" } ]
CREATE TABLE weather (zip_code VARCHAR, max_temperature_f INTEGER, date VARCHAR)
[ { "from": "user", "value": "什么时候,在什么邮政编码地区最大温度达到80?" }, { "from": "assistant", "value": "SELECT date , zip_code FROM weather WHERE max_temperature_f >= 80" } ]
CREATE TABLE weather (zip_code VARCHAR, max_temperature_f INTEGER, date VARCHAR)
[ { "from": "user", "value": "什么邮政编码地区有一个最高温度大于或等于80的车站,什么时候达到这个温度?" }, { "from": "assistant", "value": "SELECT date , zip_code FROM weather WHERE max_temperature_f >= 80" } ]
CREATE TABLE trip (zip_code VARCHAR, id VARCHAR), CREATE TABLE weather (mean_temperature_f INTEGER, zip_code VARCHAR)
[ { "from": "user", "value": "请给出平均温度高于60度的邮政编码区进行的所有路线的ID。" }, { "from": "assistant", "value": "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" } ]
CREATE TABLE trip (zip_code VARCHAR, id VARCHAR), CREATE TABLE weather (mean_temperature_f INTEGER, zip_code VARCHAR)
[ { "from": "user", "value": "对于每个邮政编码地区,找到所有具有平均温度在60以上的路线的ID?" }, { "from": "assistant", "value": "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" } ]
CREATE TABLE weather (zip_code VARCHAR, max_wind_Speed_mph INTEGER)
[ { "from": "user", "value": "对于每个邮编地区,返回最大风速达到25的次数?" }, { "from": "assistant", "value": "SELECT zip_code , count(*) FROM weather WHERE max_wind_Speed_mph >= 25 GROUP BY zip_code" } ]
CREATE TABLE weather (zip_code VARCHAR, max_wind_Speed_mph INTEGER)
[ { "from": "user", "value": "对于每一个邮政编码地区,多少次最大风速达到25英里每小时?" }, { "from": "assistant", "value": "SELECT zip_code , count(*) FROM weather WHERE max_wind_Speed_mph >= 25 GROUP BY zip_code" } ]
CREATE TABLE weather (zip_code VARCHAR, min_dew_point_f INTEGER, date VARCHAR)
[ { "from": "user", "value": "哪一天哪个地区的最小露点低于邮编94107地区中任何一天,这些地区的邮编是什么?" }, { "from": "assistant", "value": "SELECT date , zip_code FROM weather WHERE min_dew_point_f < (SELECT min(min_dew_point_f) FROM weather WHERE zip_code = 94107)" } ]
CREATE TABLE weather (zip_code VARCHAR, min_dew_point_f INTEGER, date VARCHAR)
[ { "from": "user", "value": "哪些天的最低露点比邮政编码94107中的任何一天都要小,在哪个邮政编码地区中进行测量的?" }, { "from": "assistant", "value": "SELECT date , zip_code FROM weather WHERE min_dew_point_f < (SELECT min(min_dew_point_f) FROM weather WHERE zip_code = 94107)" } ]
CREATE TABLE trip (end_station_id VARCHAR, id VARCHAR), CREATE TABLE station (id VARCHAR, installation_date VARCHAR)
[ { "from": "user", "value": "针对每个路线,返回其终点站的安装日期。" }, { "from": "assistant", "value": "SELECT T1.id , T2.installation_date FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id" } ]
CREATE TABLE trip (end_station_id VARCHAR, id VARCHAR), CREATE TABLE station (id VARCHAR, installation_date VARCHAR)
[ { "from": "user", "value": "每个旅程的终点站的安装日期是多少?" }, { "from": "assistant", "value": "SELECT T1.id , T2.installation_date FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id" } ]
CREATE TABLE trip (start_station_id VARCHAR, id VARCHAR), CREATE TABLE station (id VARCHAR, dock_count VARCHAR)
[ { "from": "user", "value": "哪一次旅行从码头数最多的车站开始?把旅行id给我。" }, { "from": "assistant", "value": "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" } ]
CREATE TABLE trip (start_station_id VARCHAR, id VARCHAR), CREATE TABLE station (id VARCHAR, dock_count VARCHAR)
[ { "from": "user", "value": "从码头数最高的车站出发的旅行ID是什么?" }, { "from": "assistant", "value": "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" } ]
CREATE TABLE trip (end_station_id VARCHAR), CREATE TABLE station (city VARCHAR, id VARCHAR)
[ { "from": "user", "value": "统计不是结束在“厦门”市的旅行的次数。" }, { "from": "assistant", "value": "SELECT count(*) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id WHERE T2.city != \"厦门\"" } ]
CREATE TABLE trip (end_station_id VARCHAR), CREATE TABLE station (city VARCHAR, id VARCHAR)
[ { "from": "user", "value": "有多少次旅行没有结束在“厦门”?" }, { "from": "assistant", "value": "SELECT count(*) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id WHERE T2.city != \"厦门\"" } ]
CREATE TABLE weather (zip_code VARCHAR, EVENTS VARCHAR, date VARCHAR)
[ { "from": "user", "value": "在邮政编码94107,在哪一天既没有“大雨”也没有观察到“大雾”?" }, { "from": "assistant", "value": "SELECT date FROM weather WHERE zip_code = 94107 AND EVENTS != \"大雾\" AND EVENTS != \"大雨\"" } ]
CREATE TABLE weather (zip_code VARCHAR, EVENTS VARCHAR, date VARCHAR)
[ { "from": "user", "value": "在94107的邮政编码哪一天既没有“大雨”也没有“大雾”?" }, { "from": "assistant", "value": "SELECT date FROM weather WHERE zip_code = 94107 AND EVENTS != \"大雾\" AND EVENTS != \"大雨\"" } ]
CREATE TABLE station (bikes_available INTEGER, station_id VARCHAR, id VARCHAR, lat INTEGER), CREATE TABLE status (bikes_available INTEGER, station_id VARCHAR, id VARCHAR, lat INTEGER)
[ { "from": "user", "value": "那些纬度在37.4以上、自行车可用率从来在7以下的车站的ID是多少?" }, { "from": "assistant", "value": "SELECT id FROM station WHERE lat > 37.4 EXCEPT SELECT station_id FROM status GROUP BY station_id HAVING min(bikes_available) < 7" } ]
CREATE TABLE station (bikes_available INTEGER, station_id VARCHAR, id VARCHAR, lat INTEGER), CREATE TABLE status (bikes_available INTEGER, station_id VARCHAR, id VARCHAR, lat INTEGER)
[ { "from": "user", "value": "所有纬度在37.4以上、从来没有少于7辆可用自行车的车站的ID是什么?" }, { "from": "assistant", "value": "SELECT id FROM station WHERE lat > 37.4 EXCEPT SELECT station_id FROM status GROUP BY station_id HAVING min(bikes_available) < 7" } ]
CREATE TABLE station (city VARCHAR, name VARCHAR, bikes_available INTEGER), CREATE TABLE status (station_id VARCHAR)
[ { "from": "user", "value": "哪些车站的平均自行车供应量超过10而且不位于'“长沙”‘市?" }, { "from": "assistant", "value": "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 = \"长沙\"" } ]
CREATE TABLE station (city VARCHAR, name VARCHAR, bikes_available INTEGER), CREATE TABLE status (station_id VARCHAR)
[ { "from": "user", "value": "有超过十辆自行车,而且不在'“长沙”‘的所有车站都叫什么名字?" }, { "from": "assistant", "value": "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 = \"长沙\"" } ]
CREATE TABLE station (city VARCHAR, lat VARCHAR, name VARCHAR)
[ { "from": "user", "value": "最低纬度的车站的名称、纬度和城市是什么?" }, { "from": "assistant", "value": "SELECT name , lat , city FROM station ORDER BY lat LIMIT 1" } ]
CREATE TABLE station (city VARCHAR, lat VARCHAR, name VARCHAR)
[ { "from": "user", "value": "位于最南边的火车站的名称、纬度和城市是什么?" }, { "from": "assistant", "value": "SELECT name , lat , city FROM station ORDER BY lat LIMIT 1" } ]
CREATE TABLE weather (mean_humidity VARCHAR, mean_temperature_f VARCHAR, max_gust_speed_mph VARCHAR, date VARCHAR)
[ { "from": "user", "value": "最大阵风速度最高的3天的日期、平均温度和平均湿度是多少?" }, { "from": "assistant", "value": "SELECT date , mean_temperature_f , mean_humidity FROM weather ORDER BY max_gust_speed_mph DESC LIMIT 3" } ]
CREATE TABLE weather (mean_humidity VARCHAR, mean_temperature_f VARCHAR, max_gust_speed_mph VARCHAR, date VARCHAR)
[ { "from": "user", "value": "三个最大阵风速度的日子的日期、平均温度和平均湿度是多少?" }, { "from": "assistant", "value": "SELECT date , mean_temperature_f , mean_humidity FROM weather ORDER BY max_gust_speed_mph DESC LIMIT 3" } ]
CREATE TABLE station (city VARCHAR)
[ { "from": "user", "value": "列出所有至少有15个站点的城市的名称和站点数量。" }, { "from": "assistant", "value": "SELECT city , COUNT(*) FROM station GROUP BY city HAVING COUNT(*) >= 15" } ]
CREATE TABLE station (city VARCHAR)
[ { "from": "user", "value": "每个至少有15个车站的城市叫什么名字?有多少个车站?" }, { "from": "assistant", "value": "SELECT city , COUNT(*) FROM station GROUP BY city HAVING COUNT(*) >= 15" } ]
CREATE TABLE trip (start_station_name VARCHAR, start_station_id VARCHAR)
[ { "from": "user", "value": "查找至少有200个路线开始的站的ID和名称。" }, { "from": "assistant", "value": "SELECT start_station_id , start_station_name FROM trip GROUP BY start_station_name HAVING COUNT(*) >= 200" } ]
CREATE TABLE trip (start_station_name VARCHAR, start_station_id VARCHAR)
[ { "from": "user", "value": "至少是200个路线的出发站的车站的ID和名称是什么?" }, { "from": "assistant", "value": "SELECT start_station_id , start_station_name FROM trip GROUP BY start_station_name HAVING COUNT(*) >= 200" } ]
CREATE TABLE weather (zip_code VARCHAR, mean_visibility_miles INTEGER)
[ { "from": "user", "value": "找到平均能见度低于10的地区的邮政编码。" }, { "from": "assistant", "value": "SELECT zip_code FROM weather GROUP BY zip_code HAVING avg(mean_visibility_miles) < 10" } ]
CREATE TABLE weather (zip_code VARCHAR, mean_visibility_miles INTEGER)
[ { "from": "user", "value": "对于每个邮政编码,选择那些平均可见度低于10的地区的邮政编码。" }, { "from": "assistant", "value": "SELECT zip_code FROM weather GROUP BY zip_code HAVING avg(mean_visibility_miles) < 10" } ]
CREATE TABLE station (city VARCHAR, lat INTEGER)
[ { "from": "user", "value": "按照每个城市站点的最高纬度的递减顺序列出所有城市。" }, { "from": "assistant", "value": "SELECT city FROM station GROUP BY city ORDER BY max(lat) DESC" } ]
CREATE TABLE station (city VARCHAR, lat INTEGER)
[ { "from": "user", "value": "对于每个城市,按其最高站点纬度降序排列,列出它们的名称。" }, { "from": "assistant", "value": "SELECT city FROM station GROUP BY city ORDER BY max(lat) DESC" } ]
CREATE TABLE weather (cloud_cover VARCHAR, date VARCHAR)
[ { "from": "user", "value": "前5的云覆盖率的日期是什么?并告诉我云的覆盖率。" }, { "from": "assistant", "value": "SELECT date , cloud_cover FROM weather ORDER BY cloud_cover DESC LIMIT 5" } ]
CREATE TABLE weather (cloud_cover VARCHAR, date VARCHAR)
[ { "from": "user", "value": "前5高的云覆盖率的日期是什么,覆盖率是多少?" }, { "from": "assistant", "value": "SELECT date , cloud_cover FROM weather ORDER BY cloud_cover DESC LIMIT 5" } ]
CREATE TABLE trip (duration VARCHAR, id VARCHAR)
[ { "from": "user", "value": "前3的持续时间的路线的ID和持续时间是什么?" }, { "from": "assistant", "value": "SELECT id , duration FROM trip ORDER BY duration DESC LIMIT 3" } ]
CREATE TABLE trip (duration VARCHAR, id VARCHAR)
[ { "from": "user", "value": "持续时间最长的路线ID是什么?路线时间多长?" }, { "from": "assistant", "value": "SELECT id , duration FROM trip ORDER BY duration DESC LIMIT 3" } ]
CREATE TABLE station (long VARCHAR, id VARCHAR, name VARCHAR), CREATE TABLE trip (start_station_id VARCHAR, duration INTEGER)
[ { "from": "user", "value": "对于每个站点,返回其经度和从该站点开始的路线的平均持续时间。" }, { "from": "assistant", "value": "SELECT T1.name , T1.long , avg(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id GROUP BY T2.start_station_id" } ]
CREATE TABLE station (long VARCHAR, id VARCHAR, name VARCHAR), CREATE TABLE trip (start_station_id VARCHAR, duration INTEGER)
[ { "from": "user", "value": "对于每个起始站ID,它的名称、经度和在那里开始的路线的平均持续时间是什么?" }, { "from": "assistant", "value": "SELECT T1.name , T1.long , avg(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id GROUP BY T2.start_station_id" } ]
CREATE TABLE station (lat VARCHAR, name VARCHAR, id VARCHAR), CREATE TABLE trip (end_station_id VARCHAR, duration INTEGER)
[ { "from": "user", "value": "对于每个车站,找到它的纬度和在这个车站结束的路线的最小持续时间。" }, { "from": "assistant", "value": "SELECT T1.name , T1.lat , min(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.end_station_id GROUP BY T2.end_station_id" } ]
CREATE TABLE station (lat VARCHAR, name VARCHAR, id VARCHAR), CREATE TABLE trip (end_station_id VARCHAR, duration INTEGER)
[ { "from": "user", "value": "对于每个终点站ID,它的名称、纬度和以此为终点站的路线的最短持续时间是什么?" }, { "from": "assistant", "value": "SELECT T1.name , T1.lat , min(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.end_station_id GROUP BY T2.end_station_id" } ]
CREATE TABLE trip (start_station_name VARCHAR, duration INTEGER)
[ { "from": "user", "value": "列出所有持续时间低于100的路线的不同起始车站。" }, { "from": "assistant", "value": "SELECT DISTINCT start_station_name FROM trip WHERE duration < 100" } ]
CREATE TABLE trip (start_station_name VARCHAR, duration INTEGER)
[ { "from": "user", "value": "对于持续时间不到100的路线,不同的起点站名是什么?" }, { "from": "assistant", "value": "SELECT DISTINCT start_station_name FROM trip WHERE duration < 100" } ]
CREATE TABLE weather (zip_code VARCHAR, max_dew_point_f INTEGER)
[ { "from": "user", "value": "查找所有最大露点从未达到70的邮政编码。" }, { "from": "assistant", "value": "SELECT DISTINCT zip_code FROM weather EXCEPT SELECT DISTINCT zip_code FROM weather WHERE max_dew_point_f >= 70" } ]
CREATE TABLE weather (zip_code VARCHAR, max_dew_point_f INTEGER)
[ { "from": "user", "value": "哪些地区的最大露点总是低于70,这些地区的不同邮编是多少?" }, { "from": "assistant", "value": "SELECT DISTINCT zip_code FROM weather EXCEPT SELECT DISTINCT zip_code FROM weather WHERE max_dew_point_f >= 70" } ]
CREATE TABLE trip (zip_code VARCHAR, id VARCHAR, duration INTEGER)
[ { "from": "user", "value": "在邮政编码94103地区中,查找至少与路线平均持续时间一样长的路线的id。" }, { "from": "assistant", "value": "SELECT id FROM trip WHERE duration >= (SELECT avg(duration) FROM trip WHERE zip_code = 94103)" } ]
CREATE TABLE trip (zip_code VARCHAR, id VARCHAR, duration INTEGER)
[ { "from": "user", "value": "邮政编码94103地区中持续时间和平均旅行持续时间一样长的所有路线的id是什么?" }, { "from": "assistant", "value": "SELECT id FROM trip WHERE duration >= (SELECT avg(duration) FROM trip WHERE zip_code = 94103)" } ]
CREATE TABLE weather (mean_sea_level_pressure_inches INTEGER, date VARCHAR)
[ { "from": "user", "value": "平均海平面气压在30.3到31之间的日期是什么?" }, { "from": "assistant", "value": "SELECT date FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31" } ]