Dataset Viewer
Auto-converted to Parquet Duplicate
question_id
int64
0
88
db_id
stringclasses
1 value
question
stringlengths
63
286
evidence
stringlengths
0
183
SQL
stringlengths
43
368
difficulty
stringclasses
3 values
input_seq
stringlengths
13.7k
14.1k
output_seq
stringlengths
997
4.07k
generate_sql
stringlengths
46
383
wrong_generate
listlengths
5
5
0
california_schools
What is the highest eligible free rate for K-12 students in the schools in Alameda County?
Eligible free rate for K-12 = `Free Meal Count (K-12)` / `Enrollment (K-12)`
SELECT `Free Meal Count (K-12)` / `Enrollment (K-12)` FROM frpm WHERE `County Name` = 'Alameda' ORDER BY (CAST(`Free Meal Count (K-12)` AS REAL) / `Enrollment (K-12)`) DESC LIMIT 1
simple
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: --- Schema for table: frpm --- CREATE TABLE frpm ( `CDSC...
### Step-by-Step Approach 1. **Identify the Relevant Table and Columns:** - The question is about Alameda County schools. - We need to calculate the highest eligible free rate for K-12 students, which is `Free Meal Count (K-12)` / `Enrollment (K-12)`. - From the schema, we see that both `Free Meal Count (K-12...
SELECT MAX(f."Free Meal Count (K-12)" / f."Enrollment (K-12)") AS HighestEligibleFreeRate FROM schools s INNER JOIN frpm f ON s.CDSCode = f.CDSCode WHERE s.County = 'Alameda';
null
1
california_schools
Please list the lowest three eligible free rates for students aged 5-17 in continuation schools.
Eligible free rates for students aged 5-17 = `Free Meal Count (Ages 5-17)` / `Enrollment (Ages 5-17)`
SELECT `Free Meal Count (Ages 5-17)` / `Enrollment (Ages 5-17)` FROM frpm WHERE `Educational Option Type` = 'Continuation School' AND `Free Meal Count (Ages 5-17)` / `Enrollment (Ages 5-17)` IS NOT NULL ORDER BY `Free Meal Count (Ages 5-17)` / `Enrollment (Ages 5-17)` ASC LIMIT 3
moderate
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: --- Schema for table: frpm --- CREATE TABLE frpm ( `CDSC...
Let's break down the question and the required steps to derive the correct SQL query: 1. **Identify the Relevant Table:** - The question involves data related to students aged 5-17, specifically the `Free Meal Count (Ages 5-17)` and `Enrollment (Ages 5-17)`. This information is found in the `frpm` table. 2. **Iden...
SELECT `Free Meal Count (Ages 5-17)` / `Enrollment (Ages 5-17)` FROM frpm WHERE `Educational Option Type` = 'Continuation School' AND `Free Meal Count (Ages 5-17)` / `Enrollment (Ages 5-17)` IS NOT NULL ORDER BY `Free Meal Count (Ages 5-17)` / `Enrollment (Ages 5-17)` ASC LIMIT 3
[ { "attempt": 1, "model_sql": "SELECT (CAST(`Free Meal Count (Ages 5-17)` AS REAL) / `Enrollment (Ages 5-17)`) AS EligibleFreeRate\nFROM frpm.frpm_school\nWHERE SOCType = 'Continuation School'\nORDER BY EligibleFreeRate ASC\nLIMIT 3;", "response": "### Step-by-Step Approach:\n\n1. **Identify the Relevant...
2
california_schools
Please list the zip code of all the charter schools in Fresno County Office of Education.
Charter schools refers to `Charter School (Y/N)` = 1 in the table fprm
"SELECT T2.Zip FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.`Distric(...TRUNCATED)
simple
"Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a(...TRUNCATED)
"### Step-by-Step Reasoning\n\n1. **Identify Relevant Tables and Columns:**\n - The question asks (...TRUNCATED)
"SELECT T2.Zip FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.`Distric(...TRUNCATED)
[{"attempt":1,"model_sql":"SELECT s.Zip\nFROM frpm f\nJOIN schools s ON f.School = s.School\nWHERE f(...TRUNCATED)
3
california_schools
"What is the unabbreviated mailing street address of the school with the highest FRPM count for K-12(...TRUNCATED)
"SELECT T2.MailStreet FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode ORDER BY T(...TRUNCATED)
simple
"Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a(...TRUNCATED)
"### Step-by-Step Reasoning:\n\n1. **Understand the Task:**\n - We need to find the unabbreviated (...TRUNCATED)
"SELECT T2.MailStreet FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode ORDER BY T(...TRUNCATED)
[{"attempt":1,"model_sql":"SELECT MailStreet\nFROM schools\nWHERE School = (\n SELECT School\n (...TRUNCATED)
4
california_schools
Please list the phone numbers of the direct charter-funded schools that are opened after 2000/1/1.
Charter schools refers to `Charter School (Y/N)` = 1 in the frpm
"SELECT T2.Phone FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.`Chart(...TRUNCATED)
moderate
"Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a(...TRUNCATED)
"Let's walk through the steps to ensure that the provided SQL query is correct based on the requirem(...TRUNCATED)
"SELECT T2.Phone FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.`Chart(...TRUNCATED)
[{"attempt":1,"model_sql":"SELECT s.Phone\nFROM frpm f\nJOIN schools s ON f.County = s.County AND f.(...TRUNCATED)
5
california_schools
"How many schools with an average score in Math greater than 400 in the SAT test are exclusively vir(...TRUNCATED)
Exclusively virtual refers to Virtual = 'F'
"SELECT COUNT(DISTINCT T2.School) FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCo(...TRUNCATED)
simple
"Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a(...TRUNCATED)
"### Step-by-Step Reasoning\n\n**Objective:** \nDetermine how many schools have an average SAT Math (...TRUNCATED)
"SELECT COUNT(DISTINCT T2.School) \nFROM satscores AS T1 \nINNER JOIN schools AS T2 ON T1.cds = T2.C(...TRUNCATED)
[{"attempt":1,"model_sql":"SELECT COUNT(s.School) AS NumberOfSchools\nFROM sats s\nJOIN schools sch (...TRUNCATED)
6
california_schools
"Among the schools with the SAT test takers of over 500, please list the schools that are magnet sch(...TRUNCATED)
Magnet schools or offer a magnet program means that Magnet = 1
"SELECT T2.School FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.Magn(...TRUNCATED)
simple
"Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a(...TRUNCATED)
"### Step-by-Step Reasoning\n\nLet's break down the requirements of the question and ensure that our(...TRUNCATED)
"SELECT T2.School FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.Magn(...TRUNCATED)
[{"attempt":1,"model_sql":"SELECT School\nFROM schools\nWHERE Magnet = 1 AND NumTstTakr > 500;","res(...TRUNCATED)
7
california_schools
"What is the phone number of the school that has the highest number of test takers with an SAT score(...TRUNCATED)
"SELECT T2.Phone FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.Nu(...TRUNCATED)
simple
"Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a(...TRUNCATED)
"### Step-by-Step Reasoning\n\nThe task is to find the phone number of the school with the highest n(...TRUNCATED)
"SELECT T2.Phone FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.Nu(...TRUNCATED)
[{"attempt":1,"model_sql":"SELECT T1.Phone\nFROM schools AS T1\nJOIN satscores AS T2 ON T1.School = (...TRUNCATED)
8
california_schools
"What is the number of SAT test takers of the schools with the highest FRPM count for K-12 students?(...TRUNCATED)
"SELECT NumTstTakr FROM satscores WHERE cds = ( SELECT CDSCode FROM frpm ORDER BY `FRPM Count (K-12)(...TRUNCATED)
simple
"Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a(...TRUNCATED)
"### Step-by-Step Reasoning:\n\n1. **Identify the Relevant Tables and Columns:**\n - We need data (...TRUNCATED)
"SELECT NumTstTakr FROM satscores WHERE cds = ( SELECT CDSCode FROM frpm ORDER BY `FRPM Count (K-12)(...TRUNCATED)
[{"attempt":1,"model_sql":"SELECT T1.School, T2.TotFrpm \nFROM schools AS T1 \nJOIN frpm AS T2 ON T1(...TRUNCATED)
9
california_schools
"Among the schools with the average score in Math over 560 in the SAT test, how many schools are dir(...TRUNCATED)
"SELECT COUNT(T2.`School Code`) FROM satscores AS T1 INNER JOIN frpm AS T2 ON T1.cds = T2.CDSCode WH(...TRUNCATED)
simple
"Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a(...TRUNCATED)
"### Step-by-Step Reasoning:\n\n1. **Understand the question**:\n - We need to find schools with a(...TRUNCATED)
"SELECT COUNT(T2.`School Code`) FROM satscores AS T1 INNER JOIN frpm AS T2 ON T1.cds = T2.CDSCode WH(...TRUNCATED)
[{"attempt":1,"model_sql":"SELECT COUNT(sc.School) AS DirectCharterFundSchools\nFROM sats s\nJOIN sc(...TRUNCATED)
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
120