query_id
int64
0
1.53k
database_id
stringclasses
11 values
table_id
sequencelengths
1
4
query
stringlengths
23
286
answer
stringlengths
29
1.45k
difficulty
stringclasses
3 values
evidence
stringlengths
0
591
0
california_schools
[ "frpm" ]
What is the highest eligible free rate for K-12 students in the schools in Alameda County?
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
Eligible free rate for K-12 = `Free Meal Count (K-12)` / `Enrollment (K-12)`
1
california_schools
[ "frpm" ]
Please list the lowest three eligible free rates for students aged 5-17 in continuation schools.
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
Eligible free rates for students aged 5-17 = `Free Meal Count (Ages 5-17)` / `Enrollment (Ages 5-17)`
2
california_schools
[ "frpm", "schools" ]
Please list the zip code of all the charter schools in Fresno County Office of Education.
SELECT T2.Zip FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.`District Name` = 'Fresno County Office of Education' AND T1.`Charter School (Y/N)` = 1
simple
Charter schools refers to `Charter School (Y/N)` = 1 in the table fprm
3
california_schools
[ "frpm", "schools" ]
What is the unabbreviated mailing address of the school with the highest FRPM count for K-12 students?
SELECT T2.MailStreet FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode ORDER BY T1.`FRPM Count (K-12)` DESC LIMIT 1
simple
4
california_schools
[ "frpm", "schools" ]
Please list the phone numbers of the direct charter-funded schools that are opened after 2000/1/1.
SELECT T2.Phone FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.`Charter Funding Type` = 'Directly funded' AND T1.`Charter School (Y/N)` = 1 AND T2.OpenDate > '2000-01-01'
moderate
Charter schools refers to `Charter School (Y/N)` = 1 in the frpm
5
california_schools
[ "schools", "satscores" ]
How many schools with an average score in Math under 400 in the SAT test are exclusively virtual?
SELECT COUNT(DISTINCT T2.School) FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.Virtual = 'F' AND T1.AvgScrMath < 400
simple
Exclusively virtual refers to Virtual = 'F'
6
california_schools
[ "schools", "satscores" ]
Among the schools with the SAT test takers of over 500, please list the schools that are magnet schools or offer a magnet program.
SELECT T2.School FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.Magnet = 1 AND T1.NumTstTakr > 500
simple
Magnet schools or offer a magnet program means that Magnet = 1
7
california_schools
[ "schools", "satscores" ]
What is the phone number of the school that has the highest number of test takers with an SAT score of over 1500?
SELECT T2.Phone FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.NumGE1500 DESC LIMIT 1
simple
8
california_schools
[ "frpm", "satscores" ]
What is the number of SAT test takers of the schools with the highest FRPM count for K-12 students?
SELECT NumTstTakr FROM satscores WHERE cds = ( SELECT CDSCode FROM frpm ORDER BY `FRPM Count (K-12)` DESC LIMIT 1 )
simple
9
california_schools
[ "frpm", "satscores" ]
Among the schools with the average score in Math over 560 in the SAT test, how many schools are directly charter-funded?
SELECT COUNT(T2.`School Code`) FROM satscores AS T1 INNER JOIN frpm AS T2 ON T1.cds = T2.CDSCode WHERE T1.AvgScrMath > 560 AND T2.`Charter Funding Type` = 'Directly funded'
simple
10
california_schools
[ "frpm", "satscores" ]
For the school with the highest average score in Reading in the SAT test, what is its FRPM count for students aged 5-17?
SELECT T2.`FRPM Count (Ages 5-17)` FROM satscores AS T1 INNER JOIN frpm AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.AvgScrRead DESC LIMIT 1
simple
11
california_schools
[ "frpm", "schools" ]
Please list the codes of the schools with a total enrollment of over 500.
SELECT T2.CDSCode FROM schools AS T1 INNER JOIN frpm AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.`Enrollment (K-12)` + T2.`Enrollment (Ages 5-17)` > 500
simple
Total enrollment can be represented by `Enrollment (K-12)` + `Enrollment (Ages 5-17)`
12
california_schools
[ "frpm", "satscores" ]
Among the schools with an SAT excellence rate of over 0.3, what is the highest eligible free rate for students aged 5-17?
SELECT MAX(CAST(T1.`Free Meal Count (Ages 5-17)` AS REAL) / T1.`Enrollment (Ages 5-17)`) FROM frpm AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds WHERE CAST(T2.NumGE1500 AS REAL) / T2.NumTstTakr > 0.3
moderate
Excellence rate = NumGE1500 / NumTstTakr; Eligible free rates for students aged 5-17 = `Free Meal Count (Ages 5-17)` / `Enrollment (Ages 5-17)`
13
california_schools
[ "satscores", "schools" ]
Please list the phone numbers of the schools with the top 3 SAT excellence rate.
SELECT T1.Phone FROM schools AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds ORDER BY CAST(T2.NumGE1500 AS REAL) / T2.NumTstTakr DESC LIMIT 3
simple
Excellence rate = NumGE1500 / NumTstTakr
14
california_schools
[ "frpm", "schools" ]
List the top five schools, by descending order, from the highest to the lowest, the most number of Enrollment (Ages 5-17). Please give their NCES school identification number.
SELECT T1.NCESSchool FROM schools AS T1 INNER JOIN frpm AS T2 ON T1.CDSCode = T2.CDSCode ORDER BY T2.`Enrollment (Ages 5-17)` DESC LIMIT 5
simple
15
california_schools
[ "satscores", "schools" ]
Which active district has the highest average score in Reading?
SELECT T1.District FROM schools AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds WHERE T1.StatusType = 'Active' ORDER BY T2.AvgScrRead DESC LIMIT 1
simple
16
california_schools
[ "satscores", "schools" ]
How many schools in merged Alameda have number of test takers less than 100?
SELECT COUNT(T1.CDSCode) FROM schools AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds WHERE T1.StatusType = 'Merged' AND T2.NumTstTakr < 100 AND T1.County = 'Alameda'
simple
17
california_schools
[ "satscores", "schools" ]
What is the charter number of the school that the average score in Writing is 499?
SELECT T1.CharterNum FROM schools AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds WHERE T2.AvgScrWrite = 499
simple
18
california_schools
[ "frpm", "satscores" ]
How many schools in Contra Costa (directly funded) have number of test takers not more than 250?
SELECT COUNT(T1.CDSCode) FROM frpm AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds WHERE T1.`Charter Funding Type` = 'Directly funded' AND T1.`County Name` = 'Contra Costa' AND T2.NumTstTakr <= 250
simple
19
california_schools
[ "satscores", "schools" ]
What is the phone number of the school that has the highest average score in Math?
SELECT T1.Phone FROM schools AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds ORDER BY T2.AvgScrMath DESC LIMIT 1
simple
20
california_schools
[ "frpm", "schools" ]
How many schools in Amador which the Low Grade is 9 and the High Grade is 12?
SELECT COUNT(T1.`School Name`) FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.County = 'Amador' AND T1.`Low Grade` = 9 AND T1.`High Grade` = 12
simple
21
california_schools
[ "frpm" ]
In Los Angeles how many schools have more than 500 free meals but less than 700 free or reduced price meals for K-12?
SELECT COUNT(CDSCode) FROM frpm WHERE `County Name` = 'Los Angeles' AND `Free Meal Count (K-12)` > 500 AND `Free Meal Count (K-12)` < 700
simple
22
california_schools
[ "satscores" ]
Which school in Contra Costa has the highest number of test takers?
SELECT sname FROM satscores WHERE cname = 'Contra Costa' AND sname IS NOT NULL ORDER BY NumTstTakr DESC LIMIT 1
simple
23
california_schools
[ "frpm", "schools" ]
List the names of schools with more than 30 difference in enrollements between K-12 and ages 5-17? Please also give the full street adress of the schools.
SELECT T1.School, T1.StreetAbr FROM schools AS T1 INNER JOIN frpm AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.`Enrollment (K-12)` - T2.`Enrollment (Ages 5-17)` > 30
moderate
Diffrence in enrollement = `Enrollment (K-12)` - `Enrollment (Ages 5-17)`
24
california_schools
[ "frpm", "satscores" ]
Give the names of the schools with the percent eligible for free meals in K-12 is more than 0.1 and test takers whose test score is greater than or equal to 1500?
SELECT T2.`School Name` FROM satscores AS T1 INNER JOIN frpm AS T2 ON T1.cds = T2.CDSCode WHERE CAST(T2.`Free Meal Count (K-12)` AS REAL) / T2.`Enrollment (K-12)` > 0.1 AND T1.NumGE1500 > 0
moderate
25
california_schools
[ "frpm", "satscores" ]
Name schools in Riverside which the average of average math score for SAT is grater than 400, what is the funding type of these schools?
SELECT T1.sname, T2.`Charter Funding Type` FROM satscores AS T1 INNER JOIN frpm AS T2 ON T1.cds = T2.CDSCode WHERE T2.`District Name` LIKE 'Riverside%' GROUP BY T1.sname, T2.`Charter Funding Type` HAVING CAST(SUM(T1.AvgScrMath) AS REAL) / COUNT(T1.cds) > 400
moderate
Average of average math = sum(average math scores) / count(schools).
26
california_schools
[ "frpm", "schools" ]
State the names and full communication address of high schools in Monterey which has more than 800 free or reduced price meals for ages 15-17?
SELECT T1.`School Name`, T2.Zip, T2.Street, T2.City, T2.State FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.County = 'Monterey' AND T1.`Free Meal Count (Ages 5-17)` > 800 AND T1.`School Type` = 'High Schools (Public)'
moderate
Full communication address should include Zip, Street, City, State
27
california_schools
[ "satscores", "schools" ]
What is the average score in writing for the schools that were opened after 1991 or closed before 2000? List the school names along with the score. Also, list the communication number of the schools if there is any.
SELECT T2.School, T1.AvgScrWrite, T2.Phone, strftime('%Y', T2.OpenDate), strftime('%Y', T2.ClosedDate) FROM schools AS T2 LEFT JOIN satscores AS T1 ON T2.CDSCode = T1.cds WHERE strftime('%Y', T2.OpenDate) > '1991' AND strftime('%Y', T2.ClosedDate) < '2000'
moderate
Communication number refers to phone number.
28
california_schools
[ "frpm", "schools" ]
Consider the average difference between K-12 enrollment and 15-17 enrollment of schools that are locally funded, list the names and DOC type of schools which has a difference above this average.
SELECT T2.School, T2.DOC FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.FundingType = 'Locally funded' AND (T1.`Enrollment (K-12)` - T1.`Enrollment (Ages 5-17)`) > (SELECT AVG(T3.`Enrollment (K-12)` - T3.`Enrollment (Ages 5-17)`) FROM frpm AS T3 INNER JOIN schools AS T4 ON T3.CDSCode = T4.CDSCode WHERE T4.FundingType = 'Locally funded')
challenging
Difference between K-12 enrollment and 15-17 enrollment can be computed by `Enrollment (K-12)` - `Enrollment (Ages 5-17)`
29
california_schools
[ "frpm", "schools" ]
When did the first-through-twelfth-grade school with the largest enrollment open?
SELECT T2.OpenDate FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode ORDER BY T1.`Enrollment (K-12)` DESC LIMIT 1
simple
K-12 means First-through-twelfth-grade
30
california_schools
[ "frpm", "schools" ]
Which cities have the top 5 lowest enrollment number for students in grades 1 through 12?
SELECT T2.City FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode GROUP BY T2.City ORDER BY SUM(T1.`Enrollment (K-12)`) ASC LIMIT 5
simple
K-12 refers to students in grades 1 through 12.
31
california_schools
[ "frpm" ]
What is the eligible free rate of the 10th and 11th schools with the highest enrolment for students in grades 1 through 12?
SELECT CAST(`Free Meal Count (K-12)` AS REAL) / `Enrollment (K-12)` FROM frpm ORDER BY `Enrollment (K-12)` DESC LIMIT 9, 2
moderate
K-12 refers to students in grades 1 through 12; Eligible free rate for K-12 = `Free Meal Count (K-12)` / `Enrollment (K-12)`
32
california_schools
[ "frpm", "schools" ]
What is the eligible free or reduced price meal rate for the top 5 schools in grades 1-12 with the highest free or reduced price meal count of the schools with the ownership code 66?
SELECT CAST(T1.`FRPM Count (K-12)` AS REAL) / T1.`Enrollment (K-12)` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.SOC = 66 ORDER BY T1.`FRPM Count (K-12)` DESC LIMIT 5
moderate
grades 1-12 means K-12; Eligible free or reduced price meal rate for K-12 = `FRPM Count (K-12)` / `Enrollment (K-12)`
33
california_schools
[ "frpm", "schools" ]
If there are any, what are the websites address of the schools with a free meal count of 1,900-2,000 to students aged 5-17? Include the name of the school.
SELECT T2.Website, T1.`School Name` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.`Free Meal Count (Ages 5-17)` BETWEEN 1900 AND 2000 AND T2.Website IS NOT NULL
moderate
34
california_schools
[ "frpm", "schools" ]
What is the free rate for students between the ages of 5 and 17 at the school run by Kacey Gibson?
SELECT CAST(T2.`Free Meal Count (Ages 5-17)` AS REAL) / T2.`Enrollment (Ages 5-17)` FROM schools AS T1 INNER JOIN frpm AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.AdmFName1 = 'Kacey' AND T1.AdmLName1 = 'Gibson'
moderate
Eligible free rates for students aged 5-17 = `Free Meal Count (Ages 5-17)` / `Enrollment (Ages 5-17)`
35
california_schools
[ "frpm", "schools" ]
What is the administrator's email address of the chartered school with the fewest students enrolled in grades 1 through 12?
SELECT T2.AdmEmail1 FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.`Charter School (Y/N)` = 1 ORDER BY T1.`Enrollment (K-12)` ASC LIMIT 1
moderate
Charted school means `Charter School (Y/N)` = 1 in the table frpm; Students enrolled in grades 1 through 12 refers to `Enrollment (K-12)`
36
california_schools
[ "schools", "satscores" ]
Under whose administration does the school with the highest number of test takers whose total SAT Scores are greater or equal to 1500 belong to? Indicate his or her full name.
SELECT T2.AdmFName1, T2.AdmLName1, T2.AdmFName2, T2.AdmLName2, T2.AdmFName3, T2.AdmLName3 FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.NumGE1500 DESC LIMIT 1
challenging
full name means first name, last name; There are at most 3 administrators for each school; SAT Scores are greater or equal to 1500 refers to NumGE1500
37
california_schools
[ "schools", "satscores" ]
What is the complete address of the school with the lowest excellence rate? Indicate the Street, City, Zip and State.
SELECT T2.Street, T2.City, T2.Zip, T2.State FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY CAST(T1.NumGE1500 AS REAL) / T1.NumTstTakr ASC LIMIT 1
moderate
Execellence Rate = NumGE1500 / NumTstTakr; complete address has Street, City, State, Zip code
38
california_schools
[ "schools", "satscores" ]
What are the webpages for the Los Angeles County school that has between 2,000 and 3,000 test takers?
SELECT T2.Website FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T1.NumTstTakr BETWEEN 2000 AND 3000 AND T2.County = 'Los Angeles'
simple
39
california_schools
[ "schools", "satscores" ]
What is the average number of test takers from Fresno schools that opened between 1/1/1980 and 12/31/1980?
SELECT AVG(T1.NumTstTakr) FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE strftime('%Y', T2.OpenDate) = '1980' AND T2.County = 'Fresno'
simple
between 1/1/1980 and 12/31/1980 means the year = 1980
40
california_schools
[ "schools", "satscores" ]
What is the telephone number for the school with the lowest average score in reading in Fresno Unified?
SELECT T2.Phone FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.District = 'Fresno Unified' AND T1.AvgScrRead IS NOT NULL ORDER BY T1.AvgScrRead ASC LIMIT 1
moderate
Fresno Unified is a name of district;
41
california_schools
[ "schools", "satscores" ]
Which exclusively virtual schools have the top 5 highest average reading scores?
SELECT T2.School FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.Virtual = 'F' ORDER BY T1.AvgScrRead DESC LIMIT 5
simple
Exclusively virtual refers to Virtual = 'F'.
42
california_schools
[ "schools", "satscores" ]
What is the type of education offered in the school who scored the highest average in Math?
SELECT T2.EdOpsName FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.AvgScrMath DESC LIMIT 1
simple
43
california_schools
[ "schools", "satscores" ]
What is the average math score of the school with the lowest average score for all subjects, and in which county is it located?
SELECT T1.AvgScrMath, T2.County FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T1.AvgScrMath IS NOT NULL ORDER BY T1.AvgScrMath + T1.AvgScrRead + T1.AvgScrWrite ASC LIMIT 1
moderate
Average score for all subjects can be computed by AvgScrMath + AvgScrRead + AvgScrWrite
44
california_schools
[ "schools", "satscores" ]
What is the average writing score of the school who has the highest number of test takers whose total SAT sscores are greater or equal to 1500? Indicate the city to where the school is situated.
SELECT T1.AvgScrWrite, T2.City FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.NumGE1500 DESC LIMIT 1
simple
45
california_schools
[ "schools", "satscores" ]
What is the average writing score of each of the schools managed by Ricci Ulrich? List the schools and the corresponding average writing scores.
SELECT T2.School, T1.AvgScrWrite FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.AdmFName1 = 'Ricci' AND T2.AdmLName1 = 'Ulrich'
moderate
Usually, administrators manage the school stuff.
46
california_schools
[ "frpm", "schools" ]
Which state special schools have the highest number of enrollees from grades 1 through 12?
SELECT T2.School FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.DOC = 31 ORDER BY T1.`Enrollment (K-12)` DESC LIMIT 1
simple
State Special Schools refers to DOC = 31; Grades 1 through 12 means K-12
47
california_schools
[ "schools" ]
What is the monthly average number of schools that opened in Alameda County under the jurisdiction of the Elementary School District in 1980?
SELECT CAST(COUNT(School) AS REAL) / 12 FROM schools WHERE DOC = 52 AND County = 'Alameda' AND strftime('%Y', OpenDate) = '1980'
moderate
Elementary School District refers to DOC = 52; Monthly average number of schools that opened in 2018 = count(schools that opened in 1980) / 12
48
california_schools
[ "schools" ]
What is the ratio of merged Unified School District schools in Orange County to merged Elementary School District schools?
SELECT CAST(SUM(CASE WHEN DOC = 54 THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN DOC = 52 THEN 1 ELSE 0 END) FROM schools WHERE StatusType = 'Merged' AND County = 'Orange'
moderate
Elementary School District refers to DOC = 52; Unified School District refers to DOC = 54.
49
california_schools
[ "schools" ]
Which different county has the most number of closed schools? Please provide the name of each school as well as the closure date.
SELECT DISTINCT County, School, ClosedDate FROM schools WHERE County = ( SELECT County FROM schools WHERE StatusType = 'Closed' GROUP BY County ORDER BY COUNT(School) DESC LIMIT 1 ) AND StatusType = 'Closed' AND school IS NOT NULL
moderate
Closure date and closed date are synonyms; 'Closed' was mentioned in schools.StatusType.
50
california_schools
[ "schools", "satscores" ]
What is the postal street address for the school with the 6th highest Math average? Indicate the school's name.
SELECT T2.MailStreet, T2.School FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.AvgScrMath DESC LIMIT 5, 1
simple
Postal street and mailing street are synonyms.
51
california_schools
[ "schools", "satscores" ]
In which mailing street address can you find the school that has the lowest average score in reading? Also give the school's name.
SELECT T2.MailStreet, T2.School FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T1.AvgScrRead IS NOT NULL ORDER BY T1.AvgScrRead ASC LIMIT 1
simple
52
california_schools
[ "schools", "satscores" ]
What is the total number of schools whose total SAT scores are greater or equal to 1500 whose mailing city is Lakeport?
SELECT COUNT(T1.cds) FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.MailCity = 'Lakeport' AND (T1.AvgScrRead + T1.AvgScrMath + T1.AvgScrWrite) >= 1500
simple
Total SAT scores can be computed by AvgScrRead + AvgScrMath + AvgScrWrite
53
california_schools
[ "schools", "satscores" ]
How many test takers are there at the school/s whose mailing city address is in Fresno?
SELECT T1.NumTstTakr FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.MailCity = 'Fresno'
simple
54
california_schools
[ "schools" ]
Please specify all of the schools and their related mailing zip codes that are under Avetik Atoian's administration.
SELECT School, MailZip FROM schools WHERE AdmFName1 = 'Avetik' AND AdmLName1 = 'Atoian'
simple
55
california_schools
[ "schools" ]
Of the schools with a mailing state address in California, what is the ratio of the schools located in the county of Colusa against the school located in the county of Humboldt?
SELECT CAST(SUM(CASE WHEN County = 'Colusa' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN County = 'Humboldt' THEN 1 ELSE 0 END) FROM schools WHERE MailState = 'CA'
moderate
Ratio = count(schools in Colusa) / count(schools in Humboldt)
56
california_schools
[ "schools" ]
Of all the schools with a mailing state address in California, how many are active in San Joaquin?
SELECT COUNT(CDSCode) FROM schools WHERE City = 'San Joaquin' AND MailState = 'CA' AND StatusType = 'Active'
simple
57
california_schools
[ "schools", "satscores" ]
What is the phone number and extension number for the school that had the 333rd highest average writing score?
SELECT T2.Phone, T2.Ext FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.AvgScrWrite DESC LIMIT 332, 1
simple
58
california_schools
[ "schools" ]
What is the phone number and extension number for the school with the zip code 95203-3704? Indicate the school's name.
SELECT Phone, Ext, School FROM schools WHERE Zip = '95203-3704'
simple
59
california_schools
[ "schools" ]
What is the website for the schools under the administrations of Mike Larson and Dante Alvarez?
SELECT Website FROM schools WHERE (AdmFName1 = 'Mike' AND AdmLName1 = 'Larson') OR (AdmFName1 = 'Dante' AND AdmLName1 = 'Alvarez')
simple
60
california_schools
[ "schools" ]
What are the websites for all the partially virtual chartered schools located in San Joaquin?
SELECT Website FROM schools WHERE County = 'San Joaquin' AND Virtual = 'P' AND Charter = 1
simple
Virtual = 'P' means partially virtual; Charter schools refers to Charter = 1 in the table schools
61
california_schools
[ "schools" ]
How many chartered schools located in the city of Hickman are owned by the Elementary School District?
SELECT COUNT(School) FROM schools WHERE DOC = 52 AND Charter = 1 AND City = 'Hickman'
simple
Elementary School District refers to DOC = 52; Chartered schools refer to Charter = 1 in the table schools
62
california_schools
[ "frpm", "schools" ]
What is the total number of non-chartered schools in the county of Los Angeles with a percent (%) of eligible free meals for grades 1 through 12 that is less than 0.18%?
SELECT COUNT(T2.School) FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.County = 'Los Angeles' AND T2.Charter = 0 AND CAST(T1.`Free Meal Count (K-12)` AS REAL) * 100 / T1.`Enrollment (K-12)` < 0.18
challenging
non-chartered schools refer to schools whose Charter = 0; K-12 means grades 1 through 12; percent of eligible free rate for K-12 = `Free Meal Count (K-12)` * 100 / `Enrollment (K-12)`
63
california_schools
[ "schools" ]
In chartered schools with charter number 00D2, what are the names of all the administrators? Include the name of the school and the city to which it belongs
SELECT AdmFName1, AdmLName1, School, City FROM schools WHERE Charter = 1 AND CharterNum = '00D2'
simple
Chartered schools refer to Charter = 1 in the table schools; Full name refers to first name, last name
64
california_schools
[ "schools" ]
What is the total number of schools with a mailing city in Hickman belonging to the charter number 00D4?
SELECT COUNT(*) FROM schools WHERE CharterNum = '00D4' AND MailCity = 'Hickman'
simple
65
california_schools
[ "schools" ]
What is the ratio in percentage of Santa Clara County schools that are locally funded compared to all other types of charter school funding?
SELECT CAST(SUM(CASE WHEN FundingType = 'Locally funded' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN FundingType != 'Locally funded' THEN 1 ELSE 0 END) FROM schools WHERE County = 'Santa Clara' AND Charter = 1
moderate
Ratio in percentage = (count(locally funded schools in Santa Clara) / count(all funding type schools in Santa Clara) * 100%
66
california_schools
[ "schools" ]
Between 1/1/2000 to 12/31/2005, how many directly funded schools opened in the county of Stanislaus?
SELECT COUNT(School) FROM schools WHERE strftime('%Y', OpenDate) BETWEEN '2000' AND '2005' AND County = 'Stanislaus' AND FundingType = 'Directly funded'
simple
Directly funded schools refers to FundingType = 'Directly Funded'
67
california_schools
[ "schools" ]
What is the total amount of Community College District closure in 1989 in the city of San Francisco?
SELECT COUNT(School) FROM schools WHERE strftime('%Y', ClosedDate) = '1989' AND City = 'San Francisco' AND DOCType = 'Community College District'
simple
68
california_schools
[ "schools" ]
Which county reported the most number of school closure in the 1980s with school wonership code belonging to Youth Authority Facilities (CEA)?
SELECT County FROM schools WHERE strftime('%Y', ClosedDate) BETWEEN '1980' AND '1989' AND StatusType = 'Closed' AND SOC = 11 GROUP BY County ORDER BY COUNT(School) DESC LIMIT 1
moderate
Youth Authority Facilities (CEA) refers to SOC = 11; 1980s = years between 1980 and 1989
69
california_schools
[ "schools" ]
Please provide the National Center for Educational Statistics school district identification number for all schools with a School Ownership Code that are part of the State Special Schools.
SELECT NCESDist FROM schools WHERE SOC = 31
simple
State Special Schools means that SOC = 31.
70
california_schools
[ "schools" ]
How many active and closed District Community Day Schools are there in the county of Alpine?
SELECT COUNT(School) FROM schools WHERE (StatusType = 'Closed' OR StatusType = 'Active') AND County = 'Alpine'
simple
71
california_schools
[ "frpm", "schools" ]
What is the district code for the School that does not offer a magnet program in the city of Fresno?
SELECT T1.`District Code` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.City = 'Fresno' AND T2.Magnet = 0
simple
When magent is equal to 0 in the database, it means ths school doesn't offer a magnet program.
72
california_schools
[ "frpm", "schools" ]
How many students from the ages of 5 to 17 are enrolled at the State Special School school in Fremont for the 2014-2015 academic year?
SELECT T1.`Enrollment (Ages 5-17)` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.EdOpsCode = 'SSS' AND T2.City = 'Fremont' AND T1.`Academic Year` BETWEEN 2014 AND 2015
moderate
State Special School means EdOpsCode = 'SSS'
73
california_schools
[ "frpm", "schools" ]
What is the free or reduced price meal count for ages 5 to 17 in the Youth Authority School with a mailing street address of PO Box 1040?
SELECT T1.`FRPM Count (Ages 5-17)` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.MailStreet = 'PO Box 1040' AND T2.SOCType = 'Youth Authority Facilities'
simple
74
california_schools
[ "frpm", "schools" ]
What is the lowest grade for the District Special Education Consortia School with National Center for Educational Statistics school district identification number of 613360?
SELECT MIN(T1.`Low Grade`) FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.NCESDist = 613360 AND T2.EdOpsCode = 'SPECON'
moderate
District Special Education Consortia School refers to EdOpsCode = 'SPECON'.
75
california_schools
[ "frpm", "schools" ]
What is the educational level name for the schools with Breakfast Provision 2 in county code 37? Indicate the name of the school.
SELECT T2.EILName, T2.School FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.`NSLP Provision Status` = 'Breakfast Provision 2' AND T1.`County Code` = 37
simple
76
california_schools
[ "frpm", "schools" ]
What is the city location of the high school level school with Lunch Provision 2 whose lowest grade is 9 and the highest grade is 12 in the county of Merced?
SELECT T2.City FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.`NSLP Provision Status` = 'Lunch Provision 2' AND T2.County = 'Merced' AND T1.`Low Grade` = 9 AND T1.`High Grade` = 12 AND T2.EILCode = 'HS'
moderate
High school can be represented as EILCode = 'HS'
77
california_schools
[ "frpm", "schools" ]
Which schools served a grade span of Kindergarten to 9th grade in the county of Los Angeles and what is its Percent (%) Eligible FRPM (Ages 5-17)?
SELECT T2.School, T1.`FRPM Count (Ages 5-17)` * 100 / T1.`Enrollment (Ages 5-17)` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.County = 'Los Angeles' AND T2.GSserved = 'K-9'
moderate
Percent (%) Eligible FRPM (Ages 5-17) can be acquired by `Free Meal Count (Ages 5-17)` / `Enrollment (Ages 5-17)` * 100%
78
california_schools
[ "schools" ]
What is the most common type of grade span served in the city of Adelanto?
SELECT GSserved FROM schools WHERE City = 'Adelanto' GROUP BY GSserved ORDER BY COUNT(GSserved) DESC LIMIT 1
simple
79
california_schools
[ "schools" ]
Between San Diego and Santa Barbara, which county offers the most number of schools that does not offer physical building? Indicate the amount.
SELECT County, COUNT(Virtual) FROM schools WHERE (County = 'San Diego' OR County = 'Santa Barbara') AND Virtual = 'F' GROUP BY County ORDER BY COUNT(Virtual) DESC LIMIT 1
moderate
'Does not offer physical building' means Virtual = F in the database.
80
california_schools
[ "frpm", "schools" ]
What is the school type of the school with the highest latitude? Indicate the name of the school as well as the latitude coordinates.
SELECT T1.`School Type`, T1.`School Name`, T2.Latitude FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode ORDER BY T2.Latitude DESC LIMIT 1
simple
81
california_schools
[ "frpm", "schools" ]
In which city can you find the school in the state of California with the lowest latitude coordinates and what is its lowest grade? Indicate the school name.
SELECT T2.City, T1.`Low Grade`, T1.`School Name` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.State = 'CA' ORDER BY T2.Latitude ASC LIMIT 1
moderate
State of California refers to state = 'CA'
82
california_schools
[ "schools" ]
What is the grade span offered in the school with the highest longitude?
SELECT GSoffered FROM schools ORDER BY ABS(longitude) DESC LIMIT 1
simple
83
california_schools
[ "frpm", "schools" ]
Of the schools that offers a magnet program serving a grade span of Kindergarten to 8th grade, how many offers Multiple Provision Types? List the number of cities that offers a Kindergarten to 8th grade span and indicate how many schools are there serving such grade span for each city.
SELECT T2.City, COUNT(T2.CDSCode) FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.Magnet = 1 AND T2.GSoffered = 'K-8' AND T1.`NSLP Provision Status` = 'Multiple Provision Types' GROUP BY T2.City
challenging
Kindergarten to 8th grade refers to K-8; 'Offers a magnet program' means Magnet = 1.
84
california_schools
[ "schools" ]
What are the two most common first names among the school administrators? Indicate the district to which they administer.
SELECT DISTINCT T1.AdmFName1, T1.District FROM schools AS T1 INNER JOIN ( SELECT admfname1 FROM schools GROUP BY admfname1 ORDER BY COUNT(admfname1) DESC LIMIT 2 ) AS T2 ON T1.AdmFName1 = T2.admfname1
simple
85
california_schools
[ "frpm", "schools" ]
What is the Percent (%) Eligible Free (K-12) in the school administered by an administrator whose first name is Alusine. List the district code of the school.
SELECT T1.`Free Meal Count (K-12)` * 100 / T1.`Enrollment (K-12)`, T1.`District Code` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.AdmFName1 = 'Alusine'
moderate
Percent (%) Eligible Free (K-12) = `Free Meal Count (K-12)` / `Enrollment (K-12)` * 100%
86
california_schools
[ "schools" ]
What is the administrator's last name that oversees the school with Charter number 40? Indicate the district, the county where the school is situated, and the name of the school.
SELECT AdmLName1, District, County, School FROM schools WHERE CharterNum = '0040'
simple
87
california_schools
[ "frpm", "schools" ]
What is the e-mail address of the administrator of the school located in the San Bernardino county, District of San Bernardino City Unified that opened between 1/1/2009 to 12/31/2010 whose school types are public Intermediate/Middle Schools and Unified Scools?
SELECT T2.AdmEmail1 FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.County = 'San Bernardino' AND T2.City = 'San Bernardino' AND T2.DOC = 54 AND strftime('%Y', T2.OpenDate) BETWEEN '2009' AND '2010' AND T2.SOC = 62
challenging
Intermediate/Middle Schools refers to SOC = 62; Unified School refers to DOC = 54; years between 2009 and 2010 can refer to 'between 1/1/2009 to 12/31/2010'
88
california_schools
[ "schools", "satscores" ]
What is the administrator's email address for the school with the highest number of test takers who received SAT scores of at least 1500?Provide the name of the school.
SELECT T2.AdmEmail1, T2.School FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.NumGE1500 DESC LIMIT 1
simple
89
financial
[ "account", "district" ]
How many accounts who choose issuance after transaction are staying in East Bohemia region?
SELECT COUNT(T1.district_id) FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id WHERE T1.A3 = 'East Bohemia' AND T2.frequency = 'POPLATEK PO OBRATU'
moderate
A3 contains the data of region; 'POPLATEK PO OBRATU' represents for 'issuance after transaction'.
90
financial
[ "account", "district", "loan" ]
How many accounts who have region in Prague are eligible for loans?
SELECT COUNT(T1.account_id) FROM account AS T1 INNER JOIN loan AS T2 ON T1.account_id = T2.account_id INNER JOIN district AS T3 ON T1.district_id = T3.district_id WHERE T3.A3 = 'Prague'
simple
A3 contains the data of region
91
financial
[ "district" ]
The average unemployment ratio of 1995 and 1996, which one has higher percentage?
SELECT DISTINCT IIF(AVG(A13) > AVG(A12), '1996', '1995') FROM district
simple
A12 refers to unemploymant rate 1995; A13 refers to unemploymant rate 1996
92
financial
[ "client", "district" ]
List out the no. of districts that have female average salary is more than 6000 but less than 10000?
SELECT DISTINCT T2.district_id FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.gender = 'F' AND T2.A11 BETWEEN 6000 AND 10000
simple
A11 refers to average salary; Female mapps to gender = 'F'
93
financial
[ "client", "district" ]
How many male customers who are living in North Bohemia have average salary greater than 8000?
SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.gender = 'M' AND T2.A3 = 'North Bohemia' AND T2.A11 > 8000
moderate
Male means that gender = 'M'; A3 refers to region; A11 pertains to average salary.
94
financial
[ "client", "account", "district" ]
List out the account numbers of female clients who are oldest and has lowest average salary, calculate the gap between this lowest average salary with the highest average salary?
SELECT T1.account_id , ( SELECT MAX(A11) - MIN(A11) FROM district ) FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.district_id = ( SELECT district_id FROM client WHERE gender = 'F' ORDER BY birth_date ASC LIMIT 1 ) ORDER BY T2.A11 DESC LIMIT 1
challenging
Female means gender = 'F'; A11 refers to average salary; Gap = highest average salary - lowest average salary; If the person A's birthdate > B's birthdate, it means that person B is order than person A.
95
financial
[ "client", "account", "district" ]
List out the account numbers of clients who are youngest and have highest average salary?
SELECT T1.account_id FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.district_id = ( SELECT district_id FROM client ORDER BY birth_date DESC LIMIT 1 ) ORDER BY T2.A11 DESC LIMIT 1
moderate
If the person A's birthdate < B's birthdate, it means that person B is younger than person A; A11 refers to average salary
96
financial
[ "account", "disp" ]
How many customers who choose statement of weekly issuance are Owner?
SELECT COUNT(T1.account_id) FROM account AS T1 INNER JOIN disp AS T2 ON T1.account_id = T2.account_id WHERE T2.type = 'Owner' AND T1.frequency = 'POPLATEK TYDNE'
simple
'POPLATEK TYDNE' stands for weekly issuance
97
financial
[ "account", "disp" ]
List out the clients who choose statement of issuance after transaction are Disponent?
SELECT T2.client_id FROM account AS T1 INNER JOIN disp AS T2 ON T1.account_id = T2.account_id WHERE T1.frequency = 'POPLATEK PO OBRATU' AND T2.type = 'DISPONENT'
simple
'POPLATEK PO OBRATU' stands for issuance after transaction
98
financial
[ "account", "loan" ]
Among the accounts who have approved loan date in 1997, list out the accounts that have the lowest approved amount and choose weekly issuance statement.
SELECT T2.account_id FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE STRFTIME('%Y', T1.date) = '1997' AND T2.frequency = 'POPLATEK TYDNE' ORDER BY T1.amount LIMIT 1
moderate
'POPLATEK TYDNE' stands for weekly issuance
99
financial
[ "disp", "loan" ]
Among the accounts who have loan validity more than 12 months, list out the accounts that have the highest approved amount and have account opening date in 1993.
SELECT T1.account_id FROM loan AS T1 INNER JOIN disp AS T2 ON T1.account_id = T2.account_id WHERE STRFTIME('%Y', T1.date) = '1993' AND T1.duration = 12 ORDER BY T1.amount DESC LIMIT 1
moderate
Loan validity more than 12 months refers to duration > 12