instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_204_492 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many venues are there ?
| SELECT COUNT("competition") FROM table_204_492 | squall |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.discharge_location = "SNF" AND lab.label = "Potassium" | mimicsql_data |
CREATE TABLE table_20327 (
"Year" real,
"Matches" real,
"Wins" real,
"Losses" real,
"No Result" real,
"Tied" real,
"Success Rate" text,
"Position" text,
"Summary" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the summary for th... | SELECT "Summary" FROM table_20327 WHERE "Success Rate" = '68.75%' | wikisql |
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | SELECT School_ID, All_Games_Percent FROM basketball_match GROUP BY All_Games | nvbench |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | SELECT t_kc21.FLX_MED_ORG_ID FROM t_kc21 WHERE t_kc21.MED_CLINIC_ID = '56302259723' | css |
CREATE TABLE table_49209 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Series" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What i... | SELECT "Score" FROM table_49209 WHERE "Location Attendance" = 'madison square garden unknown' AND "High rebounds" = 'sidney green (10)' | wikisql |
CREATE TABLE table_train_212 (
"id" int,
"pregnancy_or_lactation" bool,
"postmeal_c_peptide" float,
"chemotherapy" bool,
"liver_disease" bool,
"alcohol_abuse" bool,
"NOUSE" float
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- pregnancy
| SELECT * FROM table_train_212 WHERE pregnancy_or_lactation = 1 | criteria2sql |
CREATE TABLE Player (
pID numeric(5,0),
pName varchar(20),
yCard varchar(3),
HS numeric(5,0)
)
CREATE TABLE Tryout (
pID numeric(5,0),
cName varchar(20),
pPos varchar(8),
decision varchar(3)
)
CREATE TABLE College (
cName varchar(20),
state varchar(2),
enr numeric(5,0)
)
... | SELECT cName, enr FROM College ORDER BY enr | nvbench |
CREATE TABLE protein (
common_name text,
protein_name text,
divergence_from_human_lineage real,
accession_number text,
sequence_length real,
sequence_identity_to_human_protein text,
Institution_id text
)
CREATE TABLE building (
building_id text,
Name text,
Street_address text,
... | SELECT Name, Height_feet FROM building AS T1 JOIN Institution AS T2 ON T1.building_id = T2.building_id WHERE T2.Founded > 1880 | nvbench |
CREATE TABLE seasons (
year number,
url text
)
CREATE TABLE results (
resultid number,
raceid number,
driverid number,
constructorid number,
number number,
grid number,
position number,
positiontext text,
positionorder number,
points number,
laps number,
time tex... | SELECT name FROM races WHERE year BETWEEN 2009 AND 2011 | spider |
CREATE TABLE table_train_53 (
"id" int,
"immune_suppression" bool,
"need_hemodialysis" bool,
"steroid_therapy" bool,
"cardiogenic_shock" bool,
"hematologic_disease" bool,
"coronary_syndrome" bool,
"NOUSE" float
)
-- Using valid SQLite, answer the following questions for the tables prov... | SELECT * FROM table_train_53 WHERE cardiogenic_shock = 1 | criteria2sql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "HOME HEALTH CARE" AND procedures.long_title = "Other and unspecified repair of atrial septal defect" | mimicsql_data |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "BRAIN MASS;INTRACRANIAL HEMORRHAGE" AND demographic.dob_year < "2056" | mimicsql_data |
CREATE TABLE table_64030 (
"Class to 1928" text,
"Class from 1928" text,
"Seats" text,
"Quantity" real,
"Year(s) of Manufacture" text,
"Remarks" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What were the remarks for the coach having a class fr... | SELECT "Remarks" FROM table_64030 WHERE "Class from 1928" = 'cid-21b' | wikisql |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.ethnicity = "BLACK/HAITIAN" AND procedures.short_title = "Open sigmoidectomy NEC" | mimicsql_data |
CREATE TABLE table_name_31 (
against INTEGER,
played VARCHAR,
drawn VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Against is the highest one that has a Drawn larger than 1, and a Team of corinthians, and a Played smaller than 7?
| SELECT MAX(against) FROM table_name_31 WHERE drawn > 1 AND team = "corinthians" AND played < 7 | sql_create_context |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | SELECT COUNT(*) FROM (SELECT jybgb.KSBM FROM zzmzjzjlb JOIN jybgb ON zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE zzmzjzjlb.YLJGDM = '7755077' AND jybgb.BGRQ BETWEEN '2011-03-10' AND '2017-06-16' GROUP BY jybgb.KSBM HAVING COUNT(*) < 10 UNION SELECT jybgb.KSBM FROM fzzmzjzjlb ... | css |
CREATE TABLE table_name_34 (
outcome VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the outcome for the India Open?
| SELECT outcome FROM table_name_34 WHERE venue = "india open" | sql_create_context |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE d... | SELECT STRFTIME('%j', patient.unitdischargetime) - STRFTIME('%j', patient.unitadmittime) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-46456') AND NOT patient.unitadmittime IS NULL ORDER BY patient.unitadmittime DESC LIMIT 1 | eicu |
CREATE TABLE ENROLL (
CLASS_CODE varchar(5),
STU_NUM int,
ENROLL_GRADE varchar(50)
)
CREATE TABLE PROFESSOR (
EMP_NUM int,
DEPT_CODE varchar(10),
PROF_OFFICE varchar(50),
PROF_EXTENSION varchar(4),
PROF_HIGH_DEGREE varchar(5)
)
CREATE TABLE DEPARTMENT (
DEPT_CODE varchar(10),
D... | SELECT SCHOOL_CODE, COUNT(DISTINCT DEPT_ADDRESS) FROM DEPARTMENT ORDER BY SCHOOL_CODE DESC | nvbench |
CREATE TABLE table_39428 (
"Category" text,
"Type" text,
"Attribute" text,
"Bubbles" text,
"Cancelable" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the type with cancelable of no and attribute of ondragend
| SELECT "Type" FROM table_39428 WHERE "Cancelable" = 'no' AND "Attribute" = 'ondragend' | wikisql |
CREATE TABLE mzjybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH number,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
... | SELECT COUNT(*) FROM zyjybgb WHERE zyjybgb.YLJGDM = '7241145' AND zyjybgb.BGRQ BETWEEN '2008-07-10' AND '2012-10-17' UNION SELECT COUNT(*) FROM mzjybgb WHERE mzjybgb.YLJGDM = '7241145' AND mzjybgb.BGRQ BETWEEN '2008-07-10' AND '2012-10-17' | css |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "0" AND diagnoses.short_title = "Hx-skin malignancy NEC" | mimicsql_data |
CREATE TABLE table_name_23 (
career_w_l VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the career W-L of the tournament that is listed as A in 1968 and 4R in 1974?
| SELECT career_w_l FROM table_name_23 WHERE 1968 = "a" AND 1974 = "4r" | sql_create_context |
CREATE TABLE table_203_756 (
id number,
"year" number,
"title" text,
"role" text,
"network" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the number of networks listed in the table ?
| SELECT COUNT(DISTINCT ("network")) FROM table_203_756 | squall |
CREATE TABLE table_name_1 (
gold INTEGER,
total VARCHAR,
participants VARCHAR,
rank VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest number of Golds that has Participants smaller than 14, and Rank of 1, and Total larger than 1?
| SELECT MIN(gold) FROM table_name_1 WHERE participants < 14 AND rank = 1 AND total > 1 | sql_create_context |
CREATE TABLE photos (
id int,
camera_lens_id int,
mountain_id int,
color text,
name text
)
CREATE TABLE camera_lens (
id int,
brand text,
name text,
focal_length_mm real,
max_aperture real
)
CREATE TABLE mountain (
id int,
name text,
Height real,
Prominence real... | SELECT color, COUNT(color) FROM photos GROUP BY color ORDER BY COUNT(color) | nvbench |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE medication (
medication... | SELECT diagnosis.diagnosistime FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-60616' AND NOT patient.hospitaldischargetime IS NULL ORDER BY... | eicu |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.diagnosis = "ACIDOSIS" | mimicsql_data |
CREATE TABLE table_19236587_4 (
series_no VARCHAR,
uk_viewers__million_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the series number of the episode seen by 2.43 million viewers in the UK?
| SELECT series_no FROM table_19236587_4 WHERE uk_viewers__million_ = "2.43" | sql_create_context |
CREATE TABLE people (
Birth_Date VARCHAR,
Birth_Place VARCHAR,
People_ID VARCHAR
)
CREATE TABLE body_builder (
People_ID VARCHAR,
Total VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the birth date and birth place of the body builder wi... | SELECT T2.Birth_Date, T2.Birth_Place FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC LIMIT 1 | sql_create_context |
CREATE TABLE table_name_8 (
location VARCHAR,
home_team VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the location of 11 April 2013 and Mexico Home team?
| SELECT location FROM table_name_8 WHERE home_team = "mexico" AND date = "11 april 2013" | sql_create_context |
CREATE TABLE table_26400041_2 (
weeks_in_top_10 INTEGER,
peak VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- if the peak is 9, how many weeks was it in the top 10?
| SELECT MAX(weeks_in_top_10) FROM table_26400041_2 WHERE peak = 9 | sql_create_context |
CREATE TABLE table_56598 (
"Season" real,
"Driver" text,
"Co-Driver" text,
"Team" text,
"Tuner" text,
"Governing Body" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the turner on Team MRF?
| SELECT "Tuner" FROM table_56598 WHERE "Team" = 'mrf' | wikisql |
CREATE TABLE table_15403 (
"School" text,
"Team" text,
"Division Record" text,
"Overall Record" text,
"Season Outcome" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the division record of Sussex Central?
| SELECT "Division Record" FROM table_15403 WHERE "School" = 'sussex central' | wikisql |
CREATE TABLE table_59918 (
"7:00 am" text,
"7:30 am" text,
"8:00 am" text,
"9:00 am" text,
"11:00 am" text,
"noon" text,
"12:30 pm" text,
"1:00 pm" text,
"1:30 pm" text,
"2:00 pm" text,
"3:00 pm" text,
"3:30 pm" text,
"4:00 pm" text,
"5:00 pm" text,
"6:30 pm" ... | SELECT "8:00 am" FROM table_59918 WHERE "2:00 pm" = 'another world' | wikisql |
CREATE TABLE table_1342013_10 (
party VARCHAR,
first_elected VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which party had a person who has been in the seat since 1914?
| SELECT party FROM table_1342013_10 WHERE first_elected = 1914 | sql_create_context |
CREATE TABLE table_name_8 (
opponents VARCHAR,
partner VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Opponents, when Partner is Mervana Jugi -Salki ?
| SELECT opponents FROM table_name_8 WHERE partner = "mervana jugić-salkić" | sql_create_context |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | SELECT t_kc21.MED_ORG_DEPT_NM, t_kc21.OUT_DIAG_DIS_NM, AVG(t_kc21.PERSON_AGE) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '5211360' GROUP BY t_kc21.MED_ORG_DEPT_NM, t_kc21.OUT_DIAG_DIS_NM HAVING AVG(t_kc21.PERSON_AGE) > 10 | css |
CREATE TABLE table_57855 (
"Country" text,
"Population" text,
"Area (km\u00b2)" text,
"GDP (nominal)" text,
"GDP per capita (nominal)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which GDP (nominal) has a Population of 5,550,239?
| SELECT "GDP (nominal)" FROM table_57855 WHERE "Population" = '5,550,239' | wikisql |
CREATE TABLE table_42220 (
"Former kingdom" text,
"Province" text,
"Hangul" text,
"Hanja" text,
"Capital" text,
"Modern equivalent" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which province has muju as the capital?
| SELECT "Province" FROM table_42220 WHERE "Capital" = 'muju' | wikisql |
CREATE TABLE table_name_44 (
power__kw_ VARCHAR,
location VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Davao's power (kW)?
| SELECT power__kw_ FROM table_name_44 WHERE location = "davao" | sql_create_context |
CREATE TABLE table_32102 (
"Title" text,
"Japan" text,
"North America" text,
"Europe" text,
"Australia" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me japan for jigsaw land: japan graffiti
| SELECT "Japan" FROM table_32102 WHERE "Title" = 'jigsaw land: japan graffiti' | wikisql |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGD... | css |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.insurance = "Self Pay" AND lab.label = "RBC, CSF" | mimicsql_data |
CREATE TABLE catalogs (
catalog_id number,
catalog_name text,
catalog_publisher text,
date_of_publication time,
date_of_latest_revision time
)
CREATE TABLE catalog_structure (
catalog_level_number number,
catalog_id number,
catalog_level_name text
)
CREATE TABLE attribute_definitions (... | SELECT t1.catalog_entry_name FROM catalog_contents AS t1 JOIN catalog_contents_additional_attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.catalog_level_number = "8" | spider |
CREATE TABLE table_48 (
"Star (Pismis24-#)" text,
"Spectral type" text,
"Magnitude (M bol )" text,
"Temperature (K)" real,
"Radius (R \u2609 )" real,
"Mass (M \u2609 )" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the smallest possible... | SELECT MIN("Radius (R \u2609 )") FROM table_48 | wikisql |
CREATE TABLE table_60999 (
"Semi-closed initial unstressed vowels" text,
"17th c." text,
"American" text,
"Australian" text,
"Examples" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the entry for the Australian sound that has a 17th century... | SELECT "Australian" FROM table_60999 WHERE "17th c." = 'ɐ' | wikisql |
CREATE TABLE table_33850 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Attendance of 29,000 occurred on what date?
| SELECT "Date" FROM table_33850 WHERE "Attendance" = '29,000' | wikisql |
CREATE TABLE table_21246 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What o... | SELECT "Team" FROM table_21246 WHERE "High assists" = 'Sebastian Telfair (7)' | wikisql |
CREATE TABLE table_name_97 (
record VARCHAR,
game VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Record has a Game of 41?
| SELECT record FROM table_name_97 WHERE game = 41 | sql_create_context |
CREATE TABLE table_204_299 (
id number,
"name of place" text,
"number of counties" number,
"principal county" text,
"lower zip code" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many total towns on the list are in montgomery county ?
| SELECT COUNT(*) FROM table_204_299 WHERE "principal county" = 'montgomery county' | squall |
CREATE TABLE table_name_61 (
open_cup VARCHAR,
playoffs VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In 2012, which round in the Open Cup did Real Colorado Foxes make it to the conference semifinal?
| SELECT open_cup FROM table_name_61 WHERE playoffs = "conference semifinal" AND year = 2012 | sql_create_context |
CREATE TABLE participates_in (
stuid number,
actid number
)
CREATE TABLE faculty_participates_in (
facid number,
actid number
)
CREATE TABLE faculty (
facid number,
lname text,
fname text,
rank text,
sex text,
phone number,
room text,
building text
)
CREATE TABLE activ... | SELECT stuid FROM student EXCEPT SELECT stuid FROM participates_in | spider |
CREATE TABLE table_11839306_2 (
track INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the smallest track number?
| SELECT MIN(track) FROM table_11839306_2 | sql_create_context |
CREATE TABLE table_2840 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was... | SELECT "Team" FROM table_2840 WHERE "Date" = 'January 26' | wikisql |
CREATE TABLE table_4496 (
"Name" text,
"Pole Position" text,
"Fastest Lap" text,
"Winning driver" text,
"Winning team" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Penske Racing's name?
| SELECT "Name" FROM table_4496 WHERE "Winning team" = 'penske racing' | wikisql |
CREATE TABLE Student_Course_Enrolment (
date_of_enrolment VARCHAR,
date_of_completion VARCHAR,
student_id VARCHAR
)
CREATE TABLE Students (
student_id VARCHAR,
family_name VARCHAR,
personal_name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
--... | SELECT T1.date_of_enrolment, T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.family_name = "Zieme" AND T2.personal_name = "Bernie" | sql_create_context |
CREATE TABLE person_info (
RYBH text,
XBDM number,
XBMC text,
XM text,
CSRQ time,
CSD text,
MZDM text,
MZMC text,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
XLDM text,
XLMC text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE jyjgzbb (
JYZBLSH text,
YLJGD... | SELECT CYZTDM FROM zyjzjlb WHERE JZLSH = '05849611972' | css |
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_fli... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA' AND date_day.day_number = 1 AND date_day.month_number = 6 AND da... | atis |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id... | SELECT procedures.short_title FROM procedures WHERE procedures.icd9_code = "3891" | mimicsql_data |
CREATE TABLE table_3205 (
"Team" text,
"#" real,
"Car Sponsor(s)" text,
"Driver(s)" text,
"Listed Owner(s)" text,
"Engine" text,
"Chassis" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What team is sponsored by hydroxycut?
| SELECT "Team" FROM table_3205 WHERE "Car Sponsor(s)" = 'HydroxyCut' | wikisql |
CREATE TABLE weather (
date TEXT,
max_temperature_f INTEGER,
mean_temperature_f INTEGER,
min_temperature_f INTEGER,
max_dew_point_f INTEGER,
mean_dew_point_f INTEGER,
min_dew_point_f INTEGER,
max_humidity INTEGER,
mean_humidity INTEGER,
min_humidity INTEGER,
max_sea_level_pre... | SELECT installation_date, COUNT(installation_date) FROM station | nvbench |
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | SELECT JOB_ID, COUNT(JOB_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY COUNT(JOB_ID) | nvbench |
CREATE TABLE table_name_39 (
sensor_resolution VARCHAR,
cpu_usage VARCHAR,
camera VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the sensor resolution with a minimal CPU usage for a naturalpoint trackir 3 pro?
| SELECT sensor_resolution FROM table_name_39 WHERE cpu_usage = "minimal" AND camera = "naturalpoint trackir 3 pro" | sql_create_context |
CREATE TABLE Person (
name varchar(20),
age INTEGER,
city TEXT,
gender TEXT,
job TEXT
)
CREATE TABLE PersonFriend (
name varchar(20),
friend varchar(20),
year INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Return a histogram on what ... | SELECT job, AVG(age) FROM Person WHERE gender = 'male' GROUP BY job ORDER BY AVG(age) | nvbench |
CREATE TABLE table_23779 (
"Epoch (UTC)" text,
"Periselene (km)" text,
"Aposelene (km)" text,
"Eccentricity" text,
"Inclination (deg) (to Moon equator)" text,
"Period (h)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is every entry for ep... | SELECT "Epoch (UTC)" FROM table_23779 WHERE "Periselene (km)" = '5,454.925' | wikisql |
CREATE TABLE table_name_51 (
tournament VARCHAR,
partner VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which tournament was Dieter Kindlmann a partner?
| SELECT tournament FROM table_name_51 WHERE partner = "dieter kindlmann" | sql_create_context |
CREATE TABLE table_24784769_1 (
round4 INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the most amount of points any team had in round 4?
| SELECT MAX(round4) FROM table_24784769_1 | sql_create_context |
CREATE TABLE table_name_76 (
against INTEGER,
_percentage_won INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total of Against with % Won larger than 100?
| SELECT SUM(against) FROM table_name_76 WHERE _percentage_won > 100 | sql_create_context |
CREATE TABLE savings (
custid VARCHAR,
balance INTEGER
)
CREATE TABLE checking (
custid VARCHAR,
balance INTEGER
)
CREATE TABLE accounts (
name VARCHAR,
custid VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the name of accounts whose c... | SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T2.balance > T3.balance | sql_create_context |
CREATE TABLE table_name_90 (
cyclist VARCHAR,
nation VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which cyclist is from Australia?
| SELECT cyclist FROM table_name_90 WHERE nation = "australia" | sql_create_context |
CREATE TABLE table_10085 (
"Round" real,
"Pick #" real,
"Player" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Richard Crump picked after the 114 pick was drafted in what round?
| SELECT "Round" FROM table_10085 WHERE "Pick #" > '114' AND "Player" = 'richard crump' | wikisql |
CREATE TABLE table_203_90 (
id number,
"religious\ngroup" text,
"population\n%" text,
"growth\n(1991-2001)" text,
"sex ratio\n(total)" number,
"literacy\n(%)" text,
"work participation\n(%)" text,
"sex ratio\n(rural)" number,
"sex ratio\n(urban)" number,
"sex ratio\n(child)" numb... | SELECT "religious\ngroup" FROM table_203_90 WHERE "literacy\n(%)" >= 90 | squall |
CREATE TABLE manager_award (
player_id text,
award_id text,
year number,
league_id text,
tie text,
notes number
)
CREATE TABLE manager_half (
player_id text,
year number,
team_id text,
league_id text,
inseason number,
half number,
g number,
w number,
l number... | SELECT T1.name_first, T1.name_last, T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY COUNT(*) DESC LIMIT 1 | spider |
CREATE TABLE table_79829 (
"Place" real,
"Team" text,
"Played" real,
"Draw" real,
"Lost" real,
"Goals Scored" real,
"Goals Conceded" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- For Once Municipal, what were the goals sc... | SELECT AVG("Goals Scored") FROM table_79829 WHERE "Place" > '1' AND "Team" = 'once municipal' AND "Points" < '27' | wikisql |
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownV... | SELECT c.Id AS "comment_link", c.Score FROM Comments AS c WHERE UserId = @UserId AND Score > 0 ORDER BY Score DESC | sede |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT demographic.gender FROM demographic WHERE demographic.name = "Jerry Deberry" | mimicsql_data |
CREATE TABLE table_name_27 (
noaa VARCHAR,
darwin VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the NOAA of the higher harmonics that have a Darwin of m sf?
| SELECT noaa FROM table_name_27 WHERE darwin = "m sf" | sql_create_context |
CREATE TABLE table_27302 (
"Team" text,
"#" real,
"Primary Sponsor" text,
"Driver(s)" text,
"Listed Owner(s)" text,
"Engine" text,
"Chassis" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What kind of chassis on the angie's list sponsored ca... | SELECT "Chassis" FROM table_27302 WHERE "Primary Sponsor" = 'Angie''s List' | wikisql |
CREATE TABLE table_name_54 (
year INTEGER,
silver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHAT YEAR HAS A SILVER FOR MATTHIAS MERZ?
| SELECT MIN(year) FROM table_name_54 WHERE silver = "matthias merz" | sql_create_context |
CREATE TABLE table_72922 (
"School" text,
"Est. Denotes original date of establishment of the school, changes in name and/or location noted in corresponding ootnote" real,
"Location Denotes location of school by Seattle neighborhood, does not necessary correspond with attendance area" text,
"Nickname" t... | SELECT MIN("11-12 Enrollment") FROM table_72922 WHERE "School" = 'Washington' | wikisql |
CREATE TABLE table_name_1 (
points INTEGER,
opponent VARCHAR,
game VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest number of points against the boston bruins on game 77?
| SELECT MAX(points) FROM table_name_1 WHERE opponent = "boston bruins" AND game = 77 | sql_create_context |
CREATE TABLE table_8261 (
"Name" text,
"Company" text,
"Tracking Method" text,
"Latest stable release" text,
"Price in USD" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Name has a Company of quantcast corporation?
| SELECT "Name" FROM table_8261 WHERE "Company" = 'quantcast corporation' | wikisql |
CREATE TABLE device (
Device_ID int,
Device text,
Carrier text,
Package_Version text,
Applications text,
Software_Platform text
)
CREATE TABLE shop (
Shop_ID int,
Shop_Name text,
Location text,
Open_Date text,
Open_Year int
)
CREATE TABLE stock (
Shop_ID int,
Device... | SELECT Software_Platform, COUNT(*) FROM device GROUP BY Software_Platform ORDER BY COUNT(*) | nvbench |
CREATE TABLE table_204_70 (
id number,
"pick #" number,
"nfl team" text,
"player" text,
"position" text,
"college" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- ed bauer was picked by the saints , what was his position ?
| SELECT "position" FROM table_204_70 WHERE "player" = 'ed bauer' | squall |
CREATE TABLE table_name_65 (
last_appearance VARCHAR,
school VARCHAR,
wins VARCHAR,
losses VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Last Appearance, when Wins is less than 1, when Losses is 1, and when School is Oklahoma State?
| SELECT last_appearance FROM table_name_65 WHERE wins < 1 AND losses = 1 AND school = "oklahoma state" | sql_create_context |
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | SELECT All_Games, Team_ID FROM basketball_match ORDER BY Team_ID | nvbench |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "LEFT INTERNAL JUGULAR VEIN THROMBOSIS;LEFT ARM EDEMA" AND demographic.dod_year <= "2131.0" | mimicsql_data |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text,
RYBH text
)
CREATE TABLE mzjzjlb (
YLJGDM text,
JZLSH text,
KH text,
KLX number,
MJZH text,
HZXM text,
NLS number,
NLY number,
ZSEBZ number,
JZZTDM number,
JZZTMC text,
JZJSSJ time,
TXBZ number,... | SELECT JCZBMC, JCZBJGDW, AVG(JCZBJGDL) FROM jyjgzbb WHERE YLJGDM = '4155340' AND BGRQ BETWEEN '2009-03-22' AND '2009-08-17' GROUP BY JCZBMC, JCZBJGDW ORDER BY AVG(JCZBJGDL) LIMIT 27 | css |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TI... | SELECT SALARY, MANAGER_ID FROM employees WHERE MANAGER_ID <> "null" | nvbench |
CREATE TABLE table_33977 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Attendance" real,
"Record" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- For the game with 6,126 in attendance, how many points did both team... | SELECT COUNT("Points") FROM table_33977 WHERE "Attendance" = '6,126' | wikisql |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | SELECT COUNT(*) FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_NM = '马晓霜' AND t_kc22.STA_DATE BETWEEN '2008-06-08' AND '2015-03-26' AND t_kc22.t_kc21_MED_SER_ORG_NO = '4875012' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' | css |
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownV... | SELECT Posts.LastEditorUserId AS "userid", COUNT(DISTINCT Posts.Id) AS "edited_posts" FROM Posts WHERE Posts.LastEditorUserId = '##UserId##' AND Posts.PostTypeId = 1 AND Posts.OwnerUserId != '##UserId##' AND Posts.ClosedDate IS NULL AND Posts.CommunityOwnedDate IS NULL GROUP BY Posts.LastEditorUserId | sede |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admityear < "2180" AND prescriptions.drug = "CefazoLIN" | mimicsql_data |
CREATE TABLE table_name_70 (
set_2 VARCHAR,
set_1 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the score for set 2 when the score of set 1 is 19 25?
| SELECT set_2 FROM table_name_70 WHERE set_1 = "19–25" | sql_create_context |
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE person_info_hz_info (
RYBH text,
... | SELECT * FROM person_info JOIN hz_info JOIN zyjzjlb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND person_info_hz_i... | css |
CREATE TABLE host (
Host_ID int,
Name text,
Nationality text,
Age text
)
CREATE TABLE party_host (
Party_ID int,
Host_ID int,
Is_Main_in_Charge bool
)
CREATE TABLE party (
Party_ID int,
Party_Theme text,
Location text,
First_year text,
Last_year text,
Number_of_host... | SELECT Nationality, COUNT(*) FROM host GROUP BY Nationality ORDER BY Nationality | nvbench |
CREATE TABLE table_name_30 (
ship VARCHAR,
location VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which ship was launched from Devonport, Devon?
| SELECT ship FROM table_name_30 WHERE location = "devonport, devon" | sql_create_context |
CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
)
CREATE TABLE lives_in (
stuid number,
dormid number,
room_number number
)
CREATE TABLE dorm_amenity (
amenid number,
amenity_name text
)... | SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.am... | spider |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.