instruction stringlengths 1.07k 3.45k | output stringlengths 19 508 | system stringclasses 1
value |
|---|---|---|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT student_id FROM student_course_registrations UNION SELECT student_id FROM student_course_attendance; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT course_id FROM student_course_registrations WHERE student_id = 121 UNION SELECT course_id FROM student_course_attendance WHERE student_id = 121; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT course_id FROM student_course_registrations WHERE student_id = 121 UNION SELECT course_id FROM student_course_attendance WHERE student_id = 121; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT * FROM student_course_registrations WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance); | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT * FROM student_course_registrations WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance); | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | 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 = "statistics" ORDER BY t2.registration_date; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | 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 = "statistics" ORDER BY t2.registration_date; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | 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 = "statistics" ORDER BY t2.date_of_attendance; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | 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 = "statistics" ORDER BY t2.date_of_attendance; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT date FROM weather WHERE max_temperature_f > 85; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT date FROM weather WHERE max_temperature_f > 85; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT name FROM station WHERE lat < 37.5; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT name FROM station WHERE lat < 37.5; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT city, max(lat) FROM station GROUP BY city; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT city, max(lat) FROM station GROUP BY city; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT start_station_name, end_station_name FROM trip ORDER BY id LIMIT 3; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT start_station_name, end_station_name FROM trip ORDER BY id LIMIT 3; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT avg(lat), avg(long) FROM station WHERE city = "San Jose"; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT avg(lat), avg(long) FROM station WHERE city = "San Jose"; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT id FROM trip ORDER BY duration LIMIT 1; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT id FROM trip ORDER BY duration LIMIT 1; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT sum(duration), max(duration) FROM trip WHERE bike_id = 636; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT sum(duration), max(duration) FROM trip WHERE bike_id = 636; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT zip_code , avg(mean_temperature_f) FROM weather WHERE date LIKE "8/%" GROUP BY zip_code; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT zip_code , avg(mean_temperature_f) FROM weather WHERE date LIKE "8/%" GROUP BY zip_code; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT count(DISTINCT bike_id) FROM trip; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT count(DISTINCT bike_id) FROM trip; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT count(DISTINCT city) FROM station; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT count(DISTINCT city) FROM station; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT count(*) FROM station WHERE city = "Mountain View"; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT count(*) FROM station WHERE city = "Mountain View"; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT DISTINCT t1.name FROM station AS t1 JOIN status AS t2 ON t1.id = t2.station_id WHERE t2.bikes_available = 7; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT DISTINCT t1.name FROM station AS t1 JOIN status AS t2 ON t1.id = t2.station_id WHERE t2.bikes_available = 7; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT start_station_name, start_station_id FROM trip WHERE start_date LIKE "8/%" GROUP BY start_station_name ORDER BY count(*) DESC LIMIT 1; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT start_station_name, start_station_id FROM trip WHERE start_date LIKE "8/%" GROUP BY start_station_name ORDER BY count(*) DESC LIMIT 1; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT bike_id FROM trip WHERE zip_code = 94002 GROUP BY bike_id ORDER BY count(*) DESC LIMIT 1; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT bike_id FROM trip WHERE zip_code = 94002 GROUP BY bike_id ORDER BY count(*) DESC LIMIT 1; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT count(*) FROM weather WHERE mean_humidity > 50 AND mean_visibility_miles > 8; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT count(*) FROM weather WHERE mean_humidity > 50 AND mean_visibility_miles > 8; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | 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; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | 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; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT id FROM station WHERE city = "San Francisco" INTERSECT SELECT station_id FROM status GROUP BY station_id HAVING avg(bikes_available) > 10; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT id FROM station WHERE city = "San Francisco" INTERSECT SELECT station_id FROM status GROUP BY station_id HAVING avg(bikes_available) > 10; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | 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 "12/%"; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | 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 "12/%"; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT cloud_cover FROM weather WHERE zip_code = 94107 GROUP BY cloud_cover ORDER BY COUNT (*) DESC LIMIT 3; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT cloud_cover FROM weather WHERE zip_code = 94107 GROUP BY cloud_cover ORDER BY COUNT (*) DESC LIMIT 3; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT zip_code FROM weather GROUP BY zip_code ORDER BY avg(mean_sea_level_pressure_inches) LIMIT 1; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT zip_code FROM weather GROUP BY zip_code ORDER BY avg(mean_sea_level_pressure_inches) LIMIT 1; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT avg(bikes_available) FROM status WHERE station_id NOT IN (SELECT id FROM station WHERE city = "Palo Alto"); | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT avg(bikes_available) FROM status WHERE station_id NOT IN (SELECT id FROM station WHERE city = "Palo Alto"); | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT avg(long) FROM station WHERE id NOT IN (SELECT station_id FROM status GROUP BY station_id HAVING max(bikes_available) > 10); | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT avg(long) FROM station WHERE id NOT IN (SELECT station_id FROM status GROUP BY station_id HAVING max(bikes_available) > 10); | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT date , zip_code FROM weather WHERE max_temperature_f >= 80; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT date , zip_code FROM weather WHERE max_temperature_f >= 80; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | 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; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | 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; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT zip_code, count(*) FROM weather WHERE max_wind_speed_mph >= 25 GROUP BY zip_code; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT zip_code, count(*) FROM weather WHERE max_wind_speed_mph >= 25 GROUP BY zip_code; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT date , zip_code FROM weather WHERE min_dew_point_f < (SELECT min(min_dew_point_f) FROM weather WHERE zip_code = 94107); | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT date , zip_code FROM weather WHERE min_dew_point_f < (SELECT min(min_dew_point_f) FROM weather WHERE zip_code = 94107); | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT t1.id, t2.installation_date FROM trip AS t1 JOIN station AS t2 ON t1.end_station_id = t2.id; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT t1.id, t2.installation_date FROM trip AS t1 JOIN station AS t2 ON t1.end_station_id = t2.id; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | 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; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | 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; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT count(*) FROM trip AS t1 JOIN station AS t2 ON t1.end_station_id = t2.id WHERE t2.city != "San Francisco"; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT count(*) FROM trip AS t1 JOIN station AS t2 ON t1.end_station_id = t2.id WHERE t2.city != "San Francisco"; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT date FROM weather WHERE zip_code = 94107 AND EVENTS != "Fog" AND EVENTS != "Rain"; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT date FROM weather WHERE zip_code = 94107 AND EVENTS != "Fog" AND EVENTS != "Rain"; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT id FROM station WHERE lat > 37.4 EXCEPT SELECT station_id FROM status GROUP BY station_id HAVING min(bikes_available) < 7; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT id FROM station WHERE lat > 37.4 EXCEPT SELECT station_id FROM status GROUP BY station_id HAVING min(bikes_available) < 7; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | 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 = "San Jose"; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | 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 = "San Jose"; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT name, lat, city FROM station ORDER BY lat LIMIT 1; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT name, lat, city FROM station ORDER BY lat LIMIT 1; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT date , mean_temperature_f, mean_humidity FROM weather ORDER BY max_gust_speed_mph DESC LIMIT 3; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT date , mean_temperature_f, mean_humidity FROM weather ORDER BY max_gust_speed_mph DESC LIMIT 3; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT city, count(*) FROM station GROUP BY city HAVING count(*) >= 15; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT city, count(*) FROM station GROUP BY city HAVING count(*) >= 15; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT start_station_id, start_station_name FROM trip GROUP BY start_station_name HAVING count(*) >= 200; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT start_station_id, start_station_name FROM trip GROUP BY start_station_name HAVING count(*) >= 200; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT zip_code FROM weather GROUP BY zip_code HAVING avg(mean_visibility_miles) < 10; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT zip_code FROM weather GROUP BY zip_code HAVING avg(mean_visibility_miles) < 10; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT city FROM station GROUP BY city ORDER BY max(lat) DESC; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT city FROM station GROUP BY city ORDER BY max(lat) DESC; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT date , cloud_cover FROM weather ORDER BY cloud_cover DESC LIMIT 5; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT date , cloud_cover FROM weather ORDER BY cloud_cover DESC LIMIT 5; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT id, duration FROM trip ORDER BY duration DESC LIMIT 3; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT id, duration FROM trip ORDER BY duration DESC LIMIT 3; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | 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; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | 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; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | 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; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | 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; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT DISTINCT start_station_name FROM trip WHERE duration < 100; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT DISTINCT start_station_name FROM trip WHERE duration < 100; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT DISTINCT zip_code FROM weather EXCEPT SELECT DISTINCT zip_code FROM weather WHERE max_dew_point_f >= 70; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT DISTINCT zip_code FROM weather EXCEPT SELECT DISTINCT zip_code FROM weather WHERE max_dew_point_f >= 70; | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT id FROM trip WHERE duration >= (SELECT avg(duration) FROM trip WHERE zip_code = 94103); | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT id FROM trip WHERE duration >= (SELECT avg(duration) FROM trip WHERE zip_code = 94103); | You are an experienced and professional database administrator.
|
Given [Database Schema] and [Foreign Keys], your task is to write a [SQL Query] to answer the [Question].
[Database Schema] Every table consists of several columns. Each line describes the name, type of the column and optional value examples. In some cases, column name can be ambiguous, and extra comment is provided t... | SELECT date FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31; | You are an experienced and professional database administrator.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.