Dataset Viewer
Auto-converted to Parquet Duplicate
qid
stringlengths
24
24
db_id
stringclasses
146 values
question
stringlengths
3
191
gold
stringlengths
18
438
hardness
stringclasses
2 values
db_path
stringclasses
146 values
train-train_spider-00000
department_management
How many heads of the departments are older than 56 ?
SELECT count(*) FROM head WHERE age > 56
easy
data/raw/spider_zip/spider/database/department_management/department_management.sqlite
train-train_spider-00001
department_management
List the name, born state and age of the heads of departments ordered by age.
SELECT name , born_state , age FROM head ORDER BY age
medium
data/raw/spider_zip/spider/database/department_management/department_management.sqlite
train-train_spider-00002
department_management
List the creation year, name and budget of each department.
SELECT creation , name , budget_in_billions FROM department
medium
data/raw/spider_zip/spider/database/department_management/department_management.sqlite
train-train_spider-00003
department_management
What are the maximum and minimum budget of the departments?
SELECT max(budget_in_billions) , min(budget_in_billions) FROM department
medium
data/raw/spider_zip/spider/database/department_management/department_management.sqlite
train-train_spider-00004
department_management
What is the average number of employees of the departments whose rank is between 10 and 15?
SELECT avg(num_employees) FROM department WHERE ranking BETWEEN 10 AND 15
easy
data/raw/spider_zip/spider/database/department_management/department_management.sqlite
train-train_spider-00005
department_management
What are the names of the heads who are born outside the California state?
SELECT name FROM head WHERE born_state != 'California'
easy
data/raw/spider_zip/spider/database/department_management/department_management.sqlite
train-train_spider-00006
department_management
What are the distinct creation years of the departments managed by a secretary born in state 'Alabama'?
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 = 'Alabama'
medium
data/raw/spider_zip/spider/database/department_management/department_management.sqlite
train-train_spider-00007
department_management
What are the names of the states where at least 3 heads were born?
SELECT born_state FROM head GROUP BY born_state HAVING count(*) >= 3
easy
data/raw/spider_zip/spider/database/department_management/department_management.sqlite
train-train_spider-00009
department_management
Show the name and number of employees for the departments managed by heads whose temporary acting value is 'Yes'?
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 = 'Yes'
medium
data/raw/spider_zip/spider/database/department_management/department_management.sqlite
train-train_spider-00010
department_management
How many acting statuses are there?
SELECT count(DISTINCT temporary_acting) FROM management
easy
data/raw/spider_zip/spider/database/department_management/department_management.sqlite
train-train_spider-00012
department_management
What are the distinct ages of the heads who are acting?
SELECT DISTINCT T1.age FROM management AS T2 JOIN head AS T1 ON T1.head_id = T2.head_id WHERE T2.temporary_acting = 'Yes'
medium
data/raw/spider_zip/spider/database/department_management/department_management.sqlite
train-train_spider-00014
department_management
Which department has more than 1 head at a time? List the id, name and the number of heads.
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
medium
data/raw/spider_zip/spider/database/department_management/department_management.sqlite
train-train_spider-00015
department_management
Which head's name has the substring 'Ha'? List the id and name.
SELECT head_id , name FROM head WHERE name LIKE '%Ha%'
medium
data/raw/spider_zip/spider/database/department_management/department_management.sqlite
train-train_spider-00016
farm
How many farms are there?
SELECT count(*) FROM farm
easy
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00017
farm
Count the number of farms.
SELECT count(*) FROM farm
easy
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00018
farm
List the total number of horses on farms in ascending order.
SELECT Total_Horses FROM farm ORDER BY Total_Horses ASC
easy
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00019
farm
What is the total horses record for each farm, sorted ascending?
SELECT Total_Horses FROM farm ORDER BY Total_Horses ASC
easy
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00020
farm
What are the hosts of competitions whose theme is not "Aliens"?
SELECT Hosts FROM farm_competition WHERE Theme != 'Aliens'
easy
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00021
farm
Return the hosts of competitions for which the theme is not Aliens?
SELECT Hosts FROM farm_competition WHERE Theme != 'Aliens'
easy
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00022
farm
What are the themes of farm competitions sorted by year in ascending order?
SELECT Theme FROM farm_competition ORDER BY YEAR ASC
easy
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00023
farm
Return the themes of farm competitions, sorted by year ascending.
SELECT Theme FROM farm_competition ORDER BY YEAR ASC
easy
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00024
farm
What is the average number of working horses of farms with more than 5000 total number of horses?
SELECT avg(Working_Horses) FROM farm WHERE Total_Horses > 5000
easy
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00025
farm
Give the average number of working horses on farms with more than 5000 total horses.
SELECT avg(Working_Horses) FROM farm WHERE Total_Horses > 5000
easy
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00026
farm
What are the maximum and minimum number of cows across all farms.
SELECT max(Cows) , min(Cows) FROM farm
medium
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00027
farm
Return the maximum and minimum number of cows across all farms.
SELECT max(Cows) , min(Cows) FROM farm
medium
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00028
farm
How many different statuses do cities have?
SELECT count(DISTINCT Status) FROM city
easy
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00029
farm
Count the number of different statuses.
SELECT count(DISTINCT Status) FROM city
easy
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00030
farm
List official names of cities in descending order of population.
SELECT Official_Name FROM city ORDER BY Population DESC
easy
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00031
farm
What are the official names of cities, ordered descending by population?
SELECT Official_Name FROM city ORDER BY Population DESC
easy
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00032
farm
List the official name and status of the city with the largest population.
SELECT Official_Name , Status FROM city ORDER BY Population DESC LIMIT 1
medium
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00033
farm
What is the official name and status of the city with the most residents?
SELECT Official_Name , Status FROM city ORDER BY Population DESC LIMIT 1
medium
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00034
farm
Show the years and the official names of the host cities of competitions.
SELECT T2.Year , T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID
medium
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00035
farm
Give the years and official names of the cities of each competition.
SELECT T2.Year , T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID
medium
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00036
farm
Show the official names of the cities that have hosted more than one competition.
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
medium
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00037
farm
What are the official names of cities that have hosted more than one competition?
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
medium
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00040
farm
Please show the themes of competitions with host cities having populations larger than 1000.
SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID WHERE T1.Population > 1000
medium
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00041
farm
What are the themes of competitions that have corresponding host cities with more than 1000 residents?
SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID WHERE T1.Population > 1000
medium
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00042
farm
Please show the different statuses of cities and the average population of cities with each status.
SELECT Status , avg(Population) FROM city GROUP BY Status
medium
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00043
farm
What are the statuses and average populations of each city?
SELECT Status , avg(Population) FROM city GROUP BY Status
medium
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00044
farm
Please show the different statuses, ordered by the number of cities that have each.
SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) ASC
medium
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00045
farm
Return the different statuses of cities, ascending by frequency.
SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) ASC
medium
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00052
farm
Find the official names of cities with population bigger than 1500 or smaller than 500.
SELECT Official_Name FROM city WHERE Population > 1500 OR Population < 500
medium
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00053
farm
What are the official names of cities that have population over 1500 or less than 500?
SELECT Official_Name FROM city WHERE Population > 1500 OR Population < 500
medium
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00054
farm
Show the census ranking of cities whose status are not "Village".
SELECT Census_Ranking FROM city WHERE Status != "Village"
easy
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00055
farm
What are the census rankings of cities that do not have the status "Village"?
SELECT Census_Ranking FROM city WHERE Status != "Village"
easy
data/raw/spider_zip/spider/database/farm/farm.sqlite
train-train_spider-00060
student_assessment
what are the first name and last name of all candidates?
SELECT T2.first_name , T2.last_name FROM candidates AS T1 JOIN people AS T2 ON T1.candidate_id = T2.person_id
medium
data/raw/spider_zip/spider/database/student_assessment/student_assessment.sqlite
train-train_spider-00061
student_assessment
What are the first and last names of all the candidates?
SELECT T2.first_name , T2.last_name FROM candidates AS T1 JOIN people AS T2 ON T1.candidate_id = T2.person_id
medium
data/raw/spider_zip/spider/database/student_assessment/student_assessment.sqlite
train-train_spider-00064
student_assessment
List the id of students who attended some courses?
SELECT student_id FROM student_course_attendance
easy
data/raw/spider_zip/spider/database/student_assessment/student_assessment.sqlite
train-train_spider-00065
student_assessment
What are the ids of all students who have attended at least one course?
SELECT student_id FROM student_course_attendance
easy
data/raw/spider_zip/spider/database/student_assessment/student_assessment.sqlite
train-train_spider-00066
student_assessment
What are the ids of all students for courses and what are the names of those courses?
SELECT T1.student_id , T2.course_name FROM student_course_registrations AS T1 JOIN courses AS T2 ON T1.course_id = T2.course_id
medium
data/raw/spider_zip/spider/database/student_assessment/student_assessment.sqlite
train-train_spider-00069
student_assessment
How many students attend course English?
SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "English"
medium
data/raw/spider_zip/spider/database/student_assessment/student_assessment.sqlite
train-train_spider-00070
student_assessment
How many students are attending English courses?
SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "English"
medium
data/raw/spider_zip/spider/database/student_assessment/student_assessment.sqlite
train-train_spider-00071
student_assessment
How many courses do the student whose id is 171 attend?
SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T2.student_id = 171
medium
data/raw/spider_zip/spider/database/student_assessment/student_assessment.sqlite
train-train_spider-00072
student_assessment
How many courses does the student with id 171 actually attend?
SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T2.student_id = 171
medium
data/raw/spider_zip/spider/database/student_assessment/student_assessment.sqlite
train-train_spider-00073
student_assessment
Find id of the candidate whose email is stanley.monahan@example.org?
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"
medium
data/raw/spider_zip/spider/database/student_assessment/student_assessment.sqlite
train-train_spider-00074
student_assessment
What is the id of the candidate whose email is stanley.monahan@example.org?
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"
medium
data/raw/spider_zip/spider/database/student_assessment/student_assessment.sqlite
train-train_spider-00075
student_assessment
Find id of the candidate who most recently accessed the course?
SELECT candidate_id FROM candidate_assessments ORDER BY assessment_date DESC LIMIT 1
medium
data/raw/spider_zip/spider/database/student_assessment/student_assessment.sqlite
train-train_spider-00076
student_assessment
What is the id of the candidate who most recently accessed the course?
SELECT candidate_id FROM candidate_assessments ORDER BY assessment_date DESC LIMIT 1
medium
data/raw/spider_zip/spider/database/student_assessment/student_assessment.sqlite
train-train_spider-00079
student_assessment
List the id of students who registered some courses and the number of their registered courses?
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
medium
data/raw/spider_zip/spider/database/student_assessment/student_assessment.sqlite
train-train_spider-00080
student_assessment
For every student who is registered for some course, how many courses are they registered for?
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
medium
data/raw/spider_zip/spider/database/student_assessment/student_assessment.sqlite
train-train_spider-00081
student_assessment
How many registed students do each course have? List course name and the number of their registered students?
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
medium
data/raw/spider_zip/spider/database/student_assessment/student_assessment.sqlite
train-train_spider-00082
student_assessment
For each course id, how many students are registered and what are the course names?
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
medium
data/raw/spider_zip/spider/database/student_assessment/student_assessment.sqlite
train-train_spider-00083
student_assessment
Find id of candidates whose assessment code is "Pass"?
SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = "Pass"
easy
data/raw/spider_zip/spider/database/student_assessment/student_assessment.sqlite
train-train_spider-00084
student_assessment
What are the ids of the candidates that have an outcome code of Pass?
SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = "Pass"
easy
data/raw/spider_zip/spider/database/student_assessment/student_assessment.sqlite
train-train_spider-00085
student_assessment
Find the cell mobile number of the candidates whose assessment code is "Fail"?
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 = "Fail"
medium
data/raw/spider_zip/spider/database/student_assessment/student_assessment.sqlite
train-train_spider-00086
student_assessment
What are the cell phone numbers of the candidates that received an assessment code of "Fail"?
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 = "Fail"
medium
data/raw/spider_zip/spider/database/student_assessment/student_assessment.sqlite
train-train_spider-00087
student_assessment
What are the id of students who registered course 301?
SELECT student_id FROM student_course_attendance WHERE course_id = 301
easy
data/raw/spider_zip/spider/database/student_assessment/student_assessment.sqlite
train-train_spider-00088
student_assessment
What are the ids of the students who registered for course 301?
SELECT student_id FROM student_course_attendance WHERE course_id = 301
easy
data/raw/spider_zip/spider/database/student_assessment/student_assessment.sqlite
train-train_spider-00091
student_assessment
Find distinct cities of addresses of people?
SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id
easy
data/raw/spider_zip/spider/database/student_assessment/student_assessment.sqlite
train-train_spider-00092
student_assessment
What are the different cities where people live?
SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id
easy
data/raw/spider_zip/spider/database/student_assessment/student_assessment.sqlite
train-train_spider-00093
student_assessment
Find distinct cities of address of students?
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
easy
data/raw/spider_zip/spider/database/student_assessment/student_assessment.sqlite
train-train_spider-00094
student_assessment
What are the different cities where students live?
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
easy
data/raw/spider_zip/spider/database/student_assessment/student_assessment.sqlite
train-train_spider-00095
student_assessment
List the names of courses in alphabetical order?
SELECT course_name FROM courses ORDER BY course_name
easy
data/raw/spider_zip/spider/database/student_assessment/student_assessment.sqlite
train-train_spider-00096
student_assessment
What are the names of the courses in alphabetical order?
SELECT course_name FROM courses ORDER BY course_name
easy
data/raw/spider_zip/spider/database/student_assessment/student_assessment.sqlite
train-train_spider-00097
student_assessment
List the first names of people in alphabetical order?
SELECT first_name FROM people ORDER BY first_name
easy
data/raw/spider_zip/spider/database/student_assessment/student_assessment.sqlite
train-train_spider-00098
student_assessment
What are the first names of the people in alphabetical order?
SELECT first_name FROM people ORDER BY first_name
easy
data/raw/spider_zip/spider/database/student_assessment/student_assessment.sqlite
train-train_spider-00109
bike_1
Give me the dates when the max temperature was higher than 85.
SELECT date FROM weather WHERE max_temperature_f > 85
easy
data/raw/spider_zip/spider/database/bike_1/bike_1.sqlite
train-train_spider-00110
bike_1
What are the dates with a maximum temperature higher than 85?
SELECT date FROM weather WHERE max_temperature_f > 85
easy
data/raw/spider_zip/spider/database/bike_1/bike_1.sqlite
train-train_spider-00111
bike_1
What are the names of stations that have latitude lower than 37.5?
SELECT name FROM station WHERE lat < 37.5
easy
data/raw/spider_zip/spider/database/bike_1/bike_1.sqlite
train-train_spider-00112
bike_1
What are the names of all stations with a latitude smaller than 37.5?
SELECT name FROM station WHERE lat < 37.5
easy
data/raw/spider_zip/spider/database/bike_1/bike_1.sqlite
train-train_spider-00113
bike_1
For each city, return the highest latitude among its stations.
SELECT city , max(lat) FROM station GROUP BY city
medium
data/raw/spider_zip/spider/database/bike_1/bike_1.sqlite
train-train_spider-00114
bike_1
For each city, what is the highest latitude for its stations?
SELECT city , max(lat) FROM station GROUP BY city
medium
data/raw/spider_zip/spider/database/bike_1/bike_1.sqlite
train-train_spider-00115
bike_1
Give me the start station and end station for the trips with the three oldest id.
SELECT start_station_name , end_station_name FROM trip ORDER BY id LIMIT 3
medium
data/raw/spider_zip/spider/database/bike_1/bike_1.sqlite
train-train_spider-00116
bike_1
What is the station station and end station for the trips with the three smallest ids?
SELECT start_station_name , end_station_name FROM trip ORDER BY id LIMIT 3
medium
data/raw/spider_zip/spider/database/bike_1/bike_1.sqlite
train-train_spider-00117
bike_1
What is the average latitude and longitude of stations located in San Jose city?
SELECT avg(lat) , avg(long) FROM station WHERE city = "San Jose"
medium
data/raw/spider_zip/spider/database/bike_1/bike_1.sqlite
train-train_spider-00118
bike_1
What is the average latitude and longitude in San Jose?
SELECT avg(lat) , avg(long) FROM station WHERE city = "San Jose"
medium
data/raw/spider_zip/spider/database/bike_1/bike_1.sqlite
train-train_spider-00119
bike_1
What is the id of the trip that has the shortest duration?
SELECT id FROM trip ORDER BY duration LIMIT 1
medium
data/raw/spider_zip/spider/database/bike_1/bike_1.sqlite
train-train_spider-00120
bike_1
What is the id of the shortest trip?
SELECT id FROM trip ORDER BY duration LIMIT 1
medium
data/raw/spider_zip/spider/database/bike_1/bike_1.sqlite
train-train_spider-00121
bike_1
What is the total and maximum duration of trips with bike id 636?
SELECT sum(duration) , max(duration) FROM trip WHERE bike_id = 636
medium
data/raw/spider_zip/spider/database/bike_1/bike_1.sqlite
train-train_spider-00122
bike_1
What is the total and maximum duration for all trips with the bike id 636?
SELECT sum(duration) , max(duration) FROM trip WHERE bike_id = 636
medium
data/raw/spider_zip/spider/database/bike_1/bike_1.sqlite
train-train_spider-00125
bike_1
From the trip record, find the number of unique bikes.
SELECT count(DISTINCT bike_id) FROM trip
easy
data/raw/spider_zip/spider/database/bike_1/bike_1.sqlite
train-train_spider-00126
bike_1
How many different bike ids are there?
SELECT count(DISTINCT bike_id) FROM trip
easy
data/raw/spider_zip/spider/database/bike_1/bike_1.sqlite
train-train_spider-00127
bike_1
What is the number of distinct cities the stations are located at?
SELECT count(DISTINCT city) FROM station
easy
data/raw/spider_zip/spider/database/bike_1/bike_1.sqlite
train-train_spider-00128
bike_1
How many different cities have these stations?
SELECT count(DISTINCT city) FROM station
easy
data/raw/spider_zip/spider/database/bike_1/bike_1.sqlite
train-train_spider-00129
bike_1
How many stations does Mountain View city has?
SELECT COUNT(*) FROM station WHERE city = "Mountain View"
easy
data/raw/spider_zip/spider/database/bike_1/bike_1.sqlite
train-train_spider-00130
bike_1
How many stations are in Mountain View?
SELECT COUNT(*) FROM station WHERE city = "Mountain View"
easy
data/raw/spider_zip/spider/database/bike_1/bike_1.sqlite
train-train_spider-00131
bike_1
Return the unique name for stations that have ever had 7 bikes available.
SELECT DISTINCT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available = 7
medium
data/raw/spider_zip/spider/database/bike_1/bike_1.sqlite
train-train_spider-00132
bike_1
What are the different names for each station that has ever had 7 bikes available?
SELECT DISTINCT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available = 7
medium
data/raw/spider_zip/spider/database/bike_1/bike_1.sqlite
train-train_spider-00137
bike_1
How many days had both mean humidity above 50 and mean visibility above 8?
SELECT COUNT(*) FROM weather WHERE mean_humidity > 50 AND mean_visibility_miles > 8
medium
data/raw/spider_zip/spider/database/bike_1/bike_1.sqlite
train-train_spider-00138
bike_1
What is the number of days that had an average humity above 50 and an average visibility above 8?
SELECT COUNT(*) FROM weather WHERE mean_humidity > 50 AND mean_visibility_miles > 8
medium
data/raw/spider_zip/spider/database/bike_1/bike_1.sqlite
End of preview. Expand in Data Studio

RewardShield: Spider splits and gold trajectories

Schema-disjoint splits of Spider 1.0 (easy and medium questions) and the gold-SQL agent trajectories used to warm-start and control the RewardShield experiments (Lexsi AI Safety and Alignment Hackathon, Track 3). Code, results and caveats: https://github.com/shro-2002/rewardshield

Folder Contents
splits/ train (5,864 questions, 146 databases), its warm-start/pool partition (train_pool.jsonl), the 1,200-question pool, dev-A (340 / 10 databases), dev-B (379 / 10 databases); seed 20261114
gold_trajectories/ E01 warm-start set (1,500) and E07 control set (911): system prompt with schema, question, one run_sql call with the gold SQL, its real result rows from the Spider database, a templated reply

Licence: CC BY-SA 4.0. Everything here is derived from Spider 1.0 (Yu et al., 2018; CC BY-SA 4.0) plus formatting and templated text written by us, released under the same licence. Attribution: Tao Yu et al., "Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Task", EMNLP 2018.

Not included, and how to regenerate. Spider databases: download Spider 1.0 from its authors or the Kaggle mirror jeromeblanchet/yale-universitys-spider-10-nlp-dataset, then uv run python scripts/build_splits.py reproduces these splits byte for byte. Field db_path is a relative path into that download.

Known issues. flight_2 (dev-B) stores whitespace-padded codes, so 34 of its gold queries return empty sets or zero counts on the original database; see the GitHub RESULTS.md section E-6. Six question strings recur across splits on different databases (listed in the README, leak check).

Downloads last month
72

Collection including shro-2002/rewardshield-spider-splits