1sf/bird-sql-dev-xresults huggingface dataset:
Database: toxicology
Question: Of all the carcinogenic molecules, which one has the most double bonds?
Evidence: label = '+' mean molecules are carcinogenic; double bond refers to bond_type = ' = ';
SQL: SELECT T.molecule_id FROM ( SELECT T3.molecule_id, COUNT(T1.bond_type) FROM bond AS T1 INNER JOIN molecule AS T3 ON T1.molecule_id = T3.molecule_id WHERE T3.label = '+' AND T1.bond_type = '=' GROUP BY T3.molecule_id ORDER BY COUNT(T1.bond_type) DESC LIMIT 1 ) AS T
Database: toxicology
Question: What is the least common element of all carcinogenic molecules?
Evidence: label = '+' mean molecules are carcinogenic
SQL: SELECT T.element FROM ( SELECT T2.element, COUNT(DISTINCT T2.molecule_id) FROM molecule AS T1 INNER JOIN atom AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.label = '+' GROUP BY T2.element ORDER BY COUNT(DISTINCT T2.molecule_id) LIMIT 1 ) t
Database: toxicology
Question: What are the atoms that can bond with the atom that has the element lead?
Evidence: atom that has the element lead refers to atom_id where element = 'pb'
SQL: SELECT T2.atom_id, T2.atom_id2 FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T1.element = 'pb'
Database: toxicology
Question: List the elements of all the triple bonds.
Evidence: triple bond refers to bond_type = '#';
SQL: SELECT DISTINCT T3.element FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id INNER JOIN atom AS T3 ON T2.atom_id = T3.atom_id WHERE T1.bond_type = '#'
Database: toxicology
Question: What percentage of bonds have the most common combination of atoms' elements?
Evidence: DIVIDE(COUNT(bond_id), COUNT(atom_id where MAX(COUNT(atom_id)) ))
SQL: SELECT CAST((SELECT COUNT(T1.atom_id) FROM connected AS T1 INNER JOIN bond AS T2 ON T1.bond_id = T2.bond_id GROUP BY T2.bond_type ORDER BY COUNT(T2.bond_id) DESC LIMIT 1 ) AS REAL) * 100 / ( SELECT COUNT(atom_id) FROM connected )
Database: toxicology
Question: What proportion of single bonds are carcinogenic? Please provide your answer as a percentage with five decimal places.
Evidence: single bond refers to bond_type = '-'; label = '+' mean molecules are carcinogenic; proportion = DIVIDE(SUM(label = '+') * 100, COUNT(bond_id)) where bond_type = '-'
SQL: SELECT ROUND(CAST(COUNT(CASE WHEN T2.label = '+' THEN T1.bond_id ELSE NULL END) AS REAL) * 100 / COUNT(T1.bond_id),5) FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.bond_type = '-'
Database: toxicology
Question: Calculate the total atoms consisting of the element carbon and hydrogen.
Evidence: consisting of element carbon and hydrogen refers to element in('c', 'h')
SQL: SELECT COUNT(T.atom_id) FROM atom AS T WHERE T.element = 'c' OR T.element = 'h'
Database: toxicology
Question: List down atom id2 for atoms with element sulfur.
Evidence: element sulfur refers to element = 's'
SQL: SELECT DISTINCT T2.atom_id2 FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T1.element = 's'
Database: toxicology
Question: What are the bond type for atoms with element Tin?
Evidence: element Tin refers to element = 'sn'; double bond refers to bond_type = ' = '; single bond refers to bond_type = '-'; triple bond refers to bond_type = '#'
SQL: SELECT DISTINCT T3.bond_type FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id INNER JOIN bond AS T3 ON T3.bond_id = T2.bond_id WHERE T1.element = 'sn'
Database: toxicology
Question: How many elements are there for single bond molecules?
Evidence: single bond refers to bond_type = '-';
SQL: SELECT COUNT(DISTINCT T.element) FROM ( SELECT DISTINCT T2.molecule_id, T1.element FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN bond AS T3 ON T2.molecule_id = T3.molecule_id WHERE T3.bond_type = '-' ) AS T
Database: toxicology
Question: Calculate the total atoms with triple-bond molecules containing the element phosphorus or bromine.
Evidence: triple bond refers to bond_type = '#'; phosphorus refers to element = 'p'; bromine refers to element = 'br'
SQL: SELECT COUNT(T1.atom_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN bond AS T3 ON T2.molecule_id = T3.molecule_id WHERE T3.bond_type = '#' AND T1.element IN ('p', 'br')
Database: toxicology
Question: Write down bond id for molecules that are carcinogenic.
Evidence: label = '+' mean molecules are carcinogenic
SQL: SELECT DISTINCT T1.bond_id FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+'
Database: toxicology
Question: Among the single bond molecule id, which molecules are not carcinogenic?
Evidence: label = '-' means molecules are non-carcinogenic; single bond refers to bond_type = '-';
SQL: SELECT DISTINCT T1.molecule_id FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '-' AND T1.bond_type = '-'
Database: toxicology
Question: What is the composition of element chlorine in percentage among the single bond molecules?
Evidence: element chlorine refers to element = 'cl'; single bond refers to bond_type = '-'; percentage = DIVIDE(SUM(element = 'cl'), COUNT(atom_id)) as percent where bond_type = '-'
SQL: SELECT CAST(COUNT(CASE WHEN T.element = 'cl' THEN T.atom_id ELSE NULL END) AS REAL) * 100 / COUNT(T.atom_id) FROM ( SELECT T1.atom_id, T1.element FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN bond AS T3 ON T2.molecule_id = T3.molecule_id WHERE T3.bond_type = '-' ) AS T
Database: toxicology
Question: What are the labels for TR000, TR001 and TR002?
Evidence: TR000, TR001 and TR002 are molecule id; label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic
SQL: SELECT molecule_id, T.label FROM molecule AS T WHERE T.molecule_id IN ('TR000', 'TR001', 'TR002')
Database: toxicology
Question: List down the molecule id for non carcinogenic molecules.
Evidence: label = '-' means molecules are non-carcinogenic
SQL: SELECT T.molecule_id FROM molecule AS T WHERE T.label = '-'
Database: toxicology
Question: Calculate the total carcinogenic molecules for molecule id from TR000 to TR030.
Evidence: label = '+' mean molecules are carcinogenic
SQL: SELECT COUNT(T.molecule_id) FROM molecule AS T WHERE T.molecule_id BETWEEN 'TR000' AND 'TR030' AND T.label = '+'
Database: toxicology
Question: List down the bond type for molecules from molecule id TR000 to TR050.
Evidence: double bond refers to bond_type = ' = '; single bond refers to bond_type = '-'; triple bond refers to bond_type = '#';
SQL: SELECT T2.molecule_id, T2.bond_type FROM molecule AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.molecule_id BETWEEN 'TR000' AND 'TR050'
Database: toxicology
Question: What are the elements for bond id TR001_10_11?
Evidence: TR001_10_11 is the bond id;
SQL: SELECT T2.element FROM connected AS T1 INNER JOIN atom AS T2 ON T1.atom_id = T2.atom_id WHERE T1.bond_id = 'TR001_10_11'
Database: toxicology
Question: How many bond id have element iodine?
Evidence: iodine refers to element = 'i'
SQL: SELECT COUNT(T3.bond_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN bond AS T3 ON T2.molecule_id = T3.molecule_id WHERE T1.element = 'i'
Database: toxicology
Question: Among the molecules with element Calcium, are they mostly carcinogenic or non carcinogenic?
Evidence: calcium refers to element = 'ca'; label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic; MAX(label)
SQL: SELECT T2.label FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'ca' GROUP BY T2.label ORDER BY COUNT(T2.label) DESC LIMIT 1
Database: toxicology
Question: Does bond id TR001_1_8 have both element of chlorine and carbon?
Evidence: chlorine refers to element = 'cl'; carbon refers to element = 'c'
SQL: SELECT T2.bond_id, T2.atom_id2, T1.element AS flag_have_CaCl FROM atom AS T1 INNER JOIN connected AS T2 ON T2.atom_id = T1.atom_id WHERE T2.bond_id = 'TR001_1_8' AND (T1.element = 'c1' OR T1.element = 'c')
Database: toxicology
Question: List down two molecule id of triple bond non carcinogenic molecules with element carbon.
Evidence: carbon refers to element = 'c'; triple bond refers to bond_type = '#'; label = '-' means molecules are non-carcinogenic
SQL: SELECT DISTINCT T2.molecule_id FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN bond AS T3 ON T2.molecule_id = T3.molecule_id WHERE T3.bond_type = '#' AND T1.element = 'c' AND T2.label = '-'
Database: toxicology
Question: What is the percentage of element chlorine in carcinogenic molecules?
Evidence: chlorine refers to element = 'cl'; label = '+' mean molecules are carcinogenic; percentage = DIVIDE(SUM(element = 'pb'); COUNT(molecule_id)) as percentage where label = '+'
SQL: SELECT CAST(COUNT( CASE WHEN T1.element = 'cl' THEN T1.element ELSE NULL END) AS REAL) * 100 / COUNT(T1.element) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+'
Database: toxicology
Question: List the toxicology elements associated with molecule TR001.
Evidence: TR001 is the molecule id
SQL: SELECT DISTINCT T.element FROM atom AS T WHERE T.molecule_id = 'TR001'
Database: toxicology
Question: Give me the molecule ID of the double bond type.
Evidence: double bond refers to bond_type = ' = ';
SQL: SELECT DISTINCT T.molecule_id FROM bond AS T WHERE T.bond_type = '='
Database: toxicology
Question: Write down the atom IDs of the first and second atoms of triple bond type molecules.
Evidence: first atom refers to atom_id; second atom refers to atom_id2; triple bond refers to bond_type = '#';
SQL: SELECT T2.atom_id, T2.atom_id2 FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id WHERE T1.bond_type = '#'
Database: toxicology
Question: What are the toxicology elements associated with bond ID TR000_1_2?
Evidence: TR000_1_2 is the bond id;
SQL: SELECT T1.element FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T2.bond_id = 'TR000_1_2'
Database: toxicology
Question: How many of the single bond type molecules are non-carcinogenic?
Evidence: label = '-' means molecules are non-carcinogenic; single bond refers to bond_type = '-';
SQL: SELECT COUNT(DISTINCT T2.molecule_id) FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '-' AND T1.bond_type = '-'
Database: toxicology
Question: What is the label for bond ID TR001_10_11?
Evidence: label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic
SQL: SELECT T2.label FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.bond_id = 'TR001_10_11'
Database: toxicology
Question: Enumerate the bond ID of triple bond type molecules and tell me if they are carcinogenic or not.
Evidence: triple bond refers to bond_type = '#'; label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic
SQL: SELECT DISTINCT T1.bond_id, T2.label FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.bond_type = '#'
Database: toxicology
Question: Tally the toxicology element of the 4th atom of each molecule that was carcinogenic.
Evidence: label = '+' means molecules are carcinogenic; 4th atom of each molecule refers to substr(atom_id, 7, 1) = '4'; 
SQL: SELECT DISTINCT T1.element FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+' AND SUBSTR(T1.atom_id, -1) = '4' AND LENGTH(T1.atom_id) = 7
Database: toxicology
Question: What is the ratio of Hydrogen elements in molecule ID TR006? List the ratio with its label.
Evidence: hydrogen refers to element = 'h'; ratio = DIVIDE(SUM(element = 'h'), count(element)) where molecule_id = 'TR006' ; label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic
SQL: WITH SubQuery AS (SELECT DISTINCT T1.atom_id, T1.element, T1.molecule_id, T2.label FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.molecule_id = 'TR006') SELECT CAST(COUNT(CASE WHEN element = 'h' THEN atom_id ELSE NULL END) AS REAL) / (CASE WHEN COUNT(atom_id) = 0 THEN NULL ELSE COUNT(atom_id) END) AS ratio, label FROM SubQuery GROUP BY label
Database: toxicology
Question: Identify whether the chemical compound that contains Calcium is carcinogenic.
Evidence: calcium refers to element = 'ca'; label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic;
SQL: SELECT T2.label AS flag_carcinogenic FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'ca'
Database: toxicology
Question: Determine the bond type that is formed in the chemical compound containing element Carbon.
Evidence: Carbon refers to element = 'c'; double bond refers to bond_type = ' = '; single bond refers to bond_type = '-'; triple bond refers to bond_type = '#';
SQL: SELECT DISTINCT T2.bond_type FROM atom AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'c'
Database: toxicology
Question: Name chemical elements that form a bond TR001_10_11.
Evidence: element = 'cl' means Chlorine; element = 'c' means Carbon; element = 'h' means Hydrogen; element = 'o' means Oxygen, element = 's' means Sulfur; element = 'n' means Nitrogen, element = 'p' means Phosphorus, element = 'na' means Sodium, element = 'br' means Bromine, element = 'f' means Fluorine; element = 'i' means Iodine; element = 'sn' means Tin; element = 'pb' means Lead; element = 'te' means Tellurium; element = 'ca' means Calcium; TR001_10_11 is the bond id; molecule id refers to SUBSTR(bond_id, 1, 5); atom 1 refers to SUBSTR(bond_id, 7, 2); atom 2 refers to SUBSTR(bond_id, 10, 2)
SQL: SELECT T1.element FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id INNER JOIN bond AS T3 ON T2.bond_id = T3.bond_id WHERE T3.bond_id = 'TR001_10_11'
Database: toxicology
Question: Among all chemical compounds identified in the database, what percent of compounds form a triple-bond.
Evidence: triple bond refers to bond_type = '#';
SQL: SELECT CAST(COUNT(CASE WHEN T.bond_type = '#' THEN T.bond_id ELSE NULL END) AS REAL) * 100 / COUNT(T.bond_id) FROM bond AS T
Database: toxicology
Question: Among all chemical compounds that contain molecule TR047, identify the percent that form a double-bond.
Evidence: TR047 is the molecule id; double bond refers to bond_type = ' = '; percentage = DIVIDE(SUM(bond_type = ' = '), COUNT(all bond_id)) as percent where molecule_id = 'TR047'
SQL: SELECT CAST(COUNT(CASE WHEN T.bond_type = '=' THEN T.bond_id ELSE NULL END) AS REAL) * 100 / COUNT(T.bond_id) FROM bond AS T WHERE T.molecule_id = 'TR047'
Database: toxicology
Question: Identify whether the molecule that contains atom TR001_1 is carcinogenic.
Evidence: label = '+' mean molecules are carcinogenic;
SQL: SELECT T2.label AS flag_carcinogenic FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.atom_id = 'TR001_1'
Database: toxicology
Question: Is molecule TR151 carcinogenic?
Evidence: label = '+' mean molecules are carcinogenic;
SQL: SELECT T.label FROM molecule AS T WHERE T.molecule_id = 'TR151'
Database: toxicology
Question: Which toxic element can be found in the molecule TR151?
Evidence: element = 'cl' means Chlorine; element = 'c' means Carbon; element = 'h' means Hydrogen; element = 'o' means Oxygen, element = 's' means Sulfur; element = 'n' means Nitrogen, element = 'p' means Phosphorus, element = 'na' means Sodium, element = 'br' means Bromine, element = 'f' means Fluorine; element = 'i' means Iodine; element = 'sn' means Tin; element = 'pb' means Lead; element = 'te' means Tellurium; element = 'ca' means Calcium
SQL: SELECT DISTINCT T.element FROM atom AS T WHERE T.molecule_id = 'TR151'
Database: toxicology
Question: How many chemical compounds in the database are identified as carcinogenic.
Evidence: label = '+' mean molecules are carcinogenic;
SQL: SELECT COUNT(T.molecule_id) FROM molecule AS T WHERE T.label = '+'
Database: toxicology
Question: Identify the atoms belong to the molecule with ID between TR010 to TR050 that contain the element carbon.
Evidence: carbon refers to element = 'c'; between TR010 to TR050 refers to substr(molecule_id, 3, 3)>=10 AND substr(molecule_id, 3, 3) <= 50
SQL: SELECT T.atom_id FROM atom AS T WHERE T.molecule_id BETWEEN 'TR010' AND 'TR050' AND T.element = 'c'
Database: toxicology
Question: How many atoms belong to the molecule labeled with carcinogenic compounds?
Evidence: label = '+' mean molecules are carcinogenic;
SQL: SELECT COUNT(T1.atom_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+'
Database: toxicology
Question: Which bond ids are double-bond with carcinogenic compound?
Evidence: label = '+' mean molecules are carcinogenic; double bond refers to bond_type = ' = ';
SQL: SELECT T1.bond_id FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+' AND T1.bond_type = '='
Database: toxicology
Question: How many atoms belong to the molecule that element is hydrogen and labeled with carcinogenic compound?
Evidence: label = '+' mean molecules are carcinogenic; hydrogen refers to element = h'
SQL: SELECT COUNT(T1.atom_id) AS atomnums_h FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+' AND T1.element = 'h'
Database: toxicology
Question: Among the atoms that contain element carbon, which one does not contain compound carcinogenic?
Evidence: label = '-' means molecules are non-carcinogenic; carbon refers to element = 'c'
SQL: SELECT T1.atom_id FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'c' AND T2.label = '-'
Database: toxicology
Question: Calculate the percentage of molecules containing carcinogenic compounds that element is hydrogen.
Evidence: hydrogen refers to element = 'h'; label = '+' mean molecules are carcinogenic; percentage = DIVIDE(SUM(label = '+' and element = 'h'), COUNT(molecule_id)) * 100.0
SQL: SELECT CAST(COUNT(CASE WHEN T1.element = 'h' AND T2.label = '+' THEN T2.molecule_id ELSE NULL END) AS REAL) * 100 / COUNT(T2.molecule_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id
Database: toxicology
Question: Is molecule TR124 carcinogenic?
Evidence: label = '+' mean molecules are carcinogenic;
SQL: SELECT T.label FROM molecule AS T WHERE T.molecule_id = 'TR124'
Database: california_schools
Question: What is the postal street address for the school with the 7th highest Math average? Indicate the school's name.
Evidence: Postal street and mailing street are synonyms.
SQL: 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 6, 1
Database: california_schools
Question: What is the total number of schools whose total SAT scores are greater or equal to 1500 whose mailing city is Lakeport?
Evidence: Total SAT scores can be computed by AvgScrRead + AvgScrMath + AvgScrWrite
SQL: 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
Database: california_schools
Question: Please specify all of the schools and their related mailing zip codes that are under Avetik Atoian's administration.
SQL: SELECT School, MailZip FROM schools WHERE AdmFName1 = 'Avetik' AND AdmLName1 = 'Atoian'
Database: california_schools
Question: 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?
Evidence: Ratio = count(schools in Colusa) / count(schools in Humboldt)
SQL: 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'
Database: california_schools
Question: What are the websites for all the partially virtual chartered schools located in San Joaquin?
Evidence: Virtual = 'P' means partially virtual; Charter schools refers to Charter = 1 in the table schools
SQL: SELECT Website FROM schools WHERE County = 'San Joaquin' AND Virtual = 'P' AND Charter = 1
Database: california_schools
Question: How many chartered schools located in the city of Hickman are owned by the Elementary School District?
Evidence: Elementary School District refers to DOC = 52; Chartered schools refer to Charter = 1 in the table schools
SQL: SELECT COUNT(School) FROM schools WHERE DOC = 52 AND Charter = 1 AND City = 'Hickman'
Database: california_schools
Question: 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%?
Evidence: 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)`
SQL: 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
Database: california_schools
Question: 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
Evidence: Chartered schools refer to Charter = 1 in the table schools; Full name refers to first name, last name
SQL: SELECT AdmFName1, AdmLName1, School, City FROM schools WHERE Charter = 1 AND CharterNum = '00D2'
Database: california_schools
Question: What is the ratio in percentage of Santa Clara County schools that are locally funded compared to all other types of charter school funding?
Evidence: Ratio in percentage = (count(locally funded schools in Santa Clara) / count(all funding type schools in Santa Clara) * 100%
SQL: 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
Database: california_schools
Question: Between 1/1/2000 to 12/31/2005, how many directly funded schools opened in the county of Stanislaus?
Evidence: Directly funded schools refers to FundingType = 'Directly Funded'
SQL: SELECT COUNT(School) FROM schools WHERE strftime('%Y', OpenDate) BETWEEN '2000' AND '2005' AND County = 'Stanislaus' AND FundingType = 'Directly funded'
Database: california_schools
Question: Which county reported the most number of school closure in the 1980s with school wonership code belonging to Youth Authority Facilities (CEA)?
Evidence: Youth Authority Facilities (CEA) refers to SOC = 11; 1980s = years between 1980 and 1989
SQL: 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
Database: california_schools
Question: 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.
Evidence: State Special Schools means that SOC = 31.
SQL: SELECT NCESDist FROM schools WHERE SOC = 31
Database: california_schools
Question: What is the district code for the School that does not offer a magnet program in the city of Fresno?
Evidence: When magent is equal to 0 in the database, it means ths school doesn't offer a magnet program.
SQL: 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
Database: california_schools
Question: 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?
Evidence: State Special School means EdOpsCode = 'SSS'
SQL: 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