instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_12330 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What place is Fred Funk in?
| SELECT "Place" FROM table_12330 WHERE "Player" = 'fred funk' | wikisql |
CREATE TABLE table_27434_2 (
period VARCHAR,
life_expectancy_total VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What period was the life expectancy at 62.4?
| SELECT period FROM table_27434_2 WHERE life_expectancy_total = "62.4" | sql_create_context |
CREATE TABLE table_name_11 (
occupation VARCHAR,
riding VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the occupation of the candidate that has a riding of labrador?
| SELECT occupation FROM table_name_11 WHERE riding = "labrador" | sql_create_context |
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END... | SELECT JOB_ID, SALARY FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY SALARY | nvbench |
CREATE TABLE employee (
eid number(9,0),
name varchar2(30),
salary number(10,2)
)
CREATE TABLE flight (
flno number(4,0),
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0)
)
CREATE... | SELECT destination, COUNT(destination) FROM flight GROUP BY destination ORDER BY COUNT(destination) | nvbench |
CREATE TABLE table_2152 (
"Country" text,
"1948/49 ($ millions)" real,
"1949/50 ($ millions)" real,
"1950/51 ($ millions)" real,
"Cumulative ($ millions)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How much was spent in 1949/50 (in $ millions) i... | SELECT MIN("1949/50 ($ millions)") FROM table_2152 WHERE "Cumulative ($ millions)" = '376' | wikisql |
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-48105')) AND intakeoutput.cellpath LIKE '%output%... | eicu |
CREATE TABLE table_12755786_8 (
league VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the tourney where the winner is kevin mckinlay?
| SELECT league AS Cup FROM table_12755786_8 WHERE player = "Kevin McKinlay" | sql_create_context |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_ID = '84027429' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' | css |
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE microlab (
microl... | SELECT medication.drugstarttime FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-158475' AND NOT patient.hospitaldischargetime IS NULL ORDE... | eicu |
CREATE TABLE table_name_99 (
result VARCHAR,
year VARCHAR,
category VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was album of the year after 2009?
| SELECT result FROM table_name_99 WHERE year > 2009 AND category = "album of the year" | sql_create_context |
CREATE TABLE table_27495117_3 (
team VARCHAR,
date_of_appointment VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many teams had an appointment date of 11 april 2011
| SELECT COUNT(team) FROM table_27495117_3 WHERE date_of_appointment = "11 April 2011" | sql_create_context |
CREATE TABLE table_42848 (
"Year" real,
"Chassis" text,
"Engine" text,
"Start" real,
"Finish" real,
"Entrant" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest year that has lola t93/00 as the chassis with a start leas than 14?
| SELECT MIN("Year") FROM table_42848 WHERE "Chassis" = 'lola t93/00' AND "Start" < '14' | 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 SUM(t_kc24.OVE_PAY) FROM gwyjzb JOIN t_kc24 ON gwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gwyjzb.MED_SER_ORG_NO = '1726621' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2000-08-09' AND '2019-06-18' UNION SELECT SUM(t_kc24.OVE_PAY) FROM fgwyjzb JOIN t_kc24 ON fgwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE fgwyj... | css |
CREATE TABLE table_52026 (
"Player" text,
"Nationality" text,
"Position" text,
"Years for Jazz" text,
"School/Club Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Years for Jazz Club at Oregon State?
| SELECT "Years for Jazz" FROM table_52026 WHERE "School/Club Team" = 'oregon state' | wikisql |
CREATE TABLE table_14081 (
"Year" real,
"Category" text,
"Nominee(s)" text,
"Episode" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which episode in year 2003 that have Gary Murphy and Neil Thompson?
| SELECT "Episode" FROM table_14081 WHERE "Nominee(s)" = 'gary murphy and neil thompson' AND "Year" = '2003' | wikisql |
CREATE TABLE table_21790203_1 (
result VARCHAR,
film_title_used_in_nomination VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the result for already famous
| SELECT result FROM table_21790203_1 WHERE film_title_used_in_nomination = "Already Famous" | sql_create_context |
CREATE TABLE table_20170644_5 (
player VARCHAR,
college VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What player went to montreal college?
| SELECT player FROM table_20170644_5 WHERE college = "Montreal" | sql_create_context |
CREATE TABLE zzmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZ... | SELECT jybgb.BGDH FROM hz_info JOIN zzmzjzjlb JOIN jybgb 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 WHERE hz_info.RYBH = '61732704' AND NOT jybgb.BGDH IN (SELECT jyjgzbb.BGDH FRO... | css |
CREATE TABLE table_name_10 (
location_attendance VARCHAR,
high_assists VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Can you tell me the Location Attendance that has the High assists of luke ridnour (10), and the Date of december 3?
| SELECT location_attendance FROM table_name_10 WHERE high_assists = "luke ridnour (10)" AND date = "december 3" | sql_create_context |
CREATE TABLE table_name_67 (
republican_ticket VARCHAR,
democratic_ticket VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who's the Republican ticket with a Democratic ticket of m. william bray?
| SELECT republican_ticket FROM table_name_67 WHERE democratic_ticket = "m. william bray" | sql_create_context |
CREATE TABLE table_60666 (
"State" text,
"GR\u00dcNE" text,
"FRITZ" text,
"RETT\u00d6" text,
"LINKE" text,
"STARK" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What percent did GR NE get in Tyrol where RETT got 0.6%?
| SELECT "GR\u00dcNE" FROM table_60666 WHERE "RETT\u00d6" = '0.6%' AND "State" = 'tyrol' | wikisql |
CREATE TABLE Restaurant (
ResID INTEGER,
ResName VARCHAR(100),
Address VARCHAR(100),
Rating INTEGER
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
)
CREATE T... | SELECT LName, COUNT(LName) FROM Student WHERE Major = 600 GROUP BY LName ORDER BY COUNT(LName) DESC | nvbench |
CREATE TABLE table_35150 (
"Tournament" text,
"1998" text,
"2000" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"Career SR" text,
"Caree... | SELECT "2003" FROM table_35150 WHERE "2012" = '1r' AND "2008" = '1r' | wikisql |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime... | SELECT t3.diagnosisname FROM (SELECT t2.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'hyper... | eicu |
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 zyjzjlb.ZYZDBM, zyjzjlb.ZYZDMC FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.person_info_XM = '陶清绮' | css |
CREATE TABLE t_kc21_t_kc24 (
MED_CLINIC_ID text,
MED_SAFE_PAY_ID number
)
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
... | SELECT SUM(t_kc24.MED_AMOUT) FROM t_kc21 JOIN t_kc24 JOIN t_kc21_t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc24.MED_CLINIC_ID AND t_kc21_t_kc24.MED_SAFE_PAY_ID = t_kc24.MED_SAFE_PAY_ID WHERE t_kc21.MED_SER_ORG_NO = '5586017' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2007-12-26' AND '2014-05-19' | css |
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE allergy (
allergy... | SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-34260')) AND intakeoutput.cellpath LIKE '%output%... | eicu |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate n... | SELECT COUNT(*) > 0 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-57922')) AND diagnosis.diagnosisname = 'hypocalcemia' | eicu |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text,
RYBH text
)
CREATE TABLE jybgb (
YLJGDM text,
YLJGDM_MZJZJLB text,
YLJGDM_ZYJZJLB text,
BGDH text,
BGRQ time,
JYLX number,
JZLSH text,
JZLSH_MZJZJLB text,
JZLSH_ZYJZJLB text,
JZLX number,
KSBM text,
... | SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE person_info.XM = '水凯复' AND hz_info.YLJGDM = '0439258' AND NOT mzjzjlb.JZZDSM LIKE '%酒精%' | css |
CREATE TABLE table_51133 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Country, when Player is 'Rives McBee'?
| SELECT "Country" FROM table_51133 WHERE "Player" = 'rives mcbee' | wikisql |
CREATE TABLE table_name_31 (
winner VARCHAR,
location VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the winner in philadelphia municipal stadium in 1939?
| SELECT winner FROM table_name_31 WHERE location = "philadelphia municipal stadium" AND year = 1939 | sql_create_context |
CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
description varchar,
num_semesters int,
num_enrolled int,
has_discussion varchar,
has_lab varchar,
has_p... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.has_exams = 'N' AND course.has_projects = 'Y' AND program_course.category LIKE 'ULCS' | advising |
CREATE TABLE table_name_60 (
date VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the date of the game against Hayes & Yeading United?
| SELECT date FROM table_name_60 WHERE opponent = "hayes & yeading united" | sql_create_context |
CREATE TABLE table_35286 (
"Date" text,
"Opponents" text,
"Venue" text,
"Result" text,
"Score F\u2013A" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Opponents of sheffield wednesday had what date?
| SELECT "Date" FROM table_35286 WHERE "Opponents" = 'sheffield wednesday' | wikisql |
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 p... | SELECT t3.culturesite FROM (SELECT t2.culturesite, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'antiarrhythmics - atropine' AND DATETIME(tre... | eicu |
CREATE TABLE table_48063 (
"Game" real,
"Date" text,
"Opponent" text,
"Result" text,
"Nets points" real,
"Opponent score" real,
"Record" text,
"Streak" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the opponent scored 96 points aft... | SELECT "Streak" FROM table_48063 WHERE "Game" > '61' AND "Opponent score" = '96' | wikisql |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | SELECT COUNT(*) FROM mzjzjlb WHERE mzjzjlb.ZZYSGH = '21789346' AND mzjzjlb.JZKSRQ BETWEEN '2006-07-08' AND '2008-09-02' | css |
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE code_des... | 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, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER'... | atis |
CREATE TABLE table_15288 (
"First game" real,
"Played" real,
"Drawn" real,
"Lost" real,
"Percentage" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was the earliest first game with 11 played and 12 games lost?
| SELECT MIN("First game") FROM table_15288 WHERE "Played" > '11' AND "Lost" = '12' | wikisql |
CREATE TABLE table_4989 (
"Result" text,
"Date" text,
"Race" text,
"Venue" text,
"Group" text,
"Distance" text,
"Weight (kg)" real,
"Jockey" text,
"Winner/2nd" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- with race of ranvet stakes... | SELECT "Group" FROM table_4989 WHERE "Race" = 'ranvet stakes' | 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 '2010-11-11' AND '2013-01-13' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC LIMIT 1 | css |
CREATE TABLE table_name_5 (
no_in_series INTEGER,
written_by VARCHAR,
no_in_season VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sum of the numbers in series written by sam meikle, which have 21 numbers in the season?
| SELECT SUM(no_in_series) FROM table_name_5 WHERE written_by = "sam meikle" AND no_in_season = 21 | sql_create_context |
CREATE TABLE table_75545 (
"Longi- tude" text,
"Usual translation" text,
"Chinese name \u00b9" text,
"Japanese name" text,
"Korean name \u00b2" text,
"Vietnamese name" text,
"Date \u00b3" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which ... | SELECT "Japanese name" FROM table_75545 WHERE "Korean name \u00b2" = '경칩 (驚蟄) gyeongchip' | wikisql |
CREATE TABLE table_name_5 (
venue VARCHAR,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the venue where the game played had an away team of Melbourne?
| SELECT venue FROM table_name_5 WHERE away_team = "melbourne" | sql_create_context |
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.age < "58" AND lab.label = "D-Dimer" | mimicsql_data |
CREATE TABLE table_76301 (
"noun root (meaning)" text,
"case suffix (case)" text,
"postposition" text,
"full word" text,
"English meaning" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Case Suffix (Case), when English Meaning is 'to Georgia... | SELECT "case suffix (case)" FROM table_76301 WHERE "English meaning" = 'to georgia, in georgia' | wikisql |
CREATE TABLE party (
Party_ID int,
Minister text,
Took_office text,
Left_office text,
Region_ID int,
Party_name text
)
CREATE TABLE party_events (
Event_ID int,
Event_Name text,
Party_ID int,
Member_in_charge_ID int
)
CREATE TABLE region (
Region_ID int,
Region_name tex... | SELECT Party_name, COUNT(*) FROM party_events AS T1 JOIN party AS T2 ON T1.Party_ID = T2.Party_ID GROUP BY T1.Party_ID ORDER BY Party_name | nvbench |
CREATE TABLE table_21937 (
"Round" text,
"Main date" text,
"Number of fixtures" real,
"Clubs" text,
"New entries this round" text,
"Prize money" text,
"Player of the Round" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the player of ... | SELECT "Player of the Round" FROM table_21937 WHERE "Number of fixtures" = '80' | wikisql |
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 text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT diagnoses.short_title, procedures.short_title FROM diagnoses INNER JOIN procedures ON diagnoses.hadm_id = procedures.hadm_id WHERE diagnoses.subject_id = "25167" | mimicsql_data |
CREATE TABLE table_name_87 (
competition VARCHAR,
club VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What competition did the maccabi haifa fc club play?
| SELECT competition FROM table_name_87 WHERE club = "maccabi haifa fc" | sql_create_context |
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CRE... | SELECT SUM(A.Score) FROM Posts AS A JOIN Posts AS Q ON A.ParentId = Q.Id JOIN PostTags ON PostTags.PostId = Q.Id JOIN Tags ON PostTags.TagId = Tags.Id WHERE A.OwnerUserId = '##UserId##' AND A.PostTypeId = 2 AND Q.PostTypeId = 1 AND TagName = 'algorithm' | sede |
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 (SELECT t_kc24.t_kc21_MED_ORG_DEPT_CD FROM t_kc24 WHERE t_kc24.t_kc21_MED_SER_ORG_NO = '5341312' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2014-05-20' AND '2019-06-16' GROUP BY t_kc24.t_kc21_MED_ORG_DEPT_CD HAVING SUM(t_kc24.MED_AMOUT) >= 2142.44) AS T | css |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX number,... | SELECT mzjzjlb.JZZTDM, mzjzjlb.JZZTMC FROM mzjzjlb WHERE mzjzjlb.JZLSH = '47624266393' | css |
CREATE TABLE geographic (
city_name varchar,
county varchar,
region varchar
)
CREATE TABLE restaurant (
id int,
name varchar,
food_type varchar,
city_name varchar,
rating "decimal
)
CREATE TABLE location (
restaurant_id int,
house_number int,
street_name varchar,
city_n... | SELECT location.house_number, restaurant.name FROM location, restaurant WHERE restaurant.city_name IN (SELECT GEOGRAPHICalias0.city_name FROM geographic AS GEOGRAPHICalias0 WHERE GEOGRAPHICalias0.region = 'bay area') AND restaurant.id = location.restaurant_id | restaurants |
CREATE TABLE table_204_846 (
id number,
"tie no" number,
"home team" text,
"score" text,
"away team" text,
"attendance" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- is ludvika ffl a d3 or a d2 ?
| SELECT "away team" FROM table_204_846 WHERE "away team" = 'ludvika ffi' | squall |
CREATE TABLE table_57524 (
"Class" text,
"Type" text,
"Introduced" text,
"Fleet Size" real,
"Numbers" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the fleet size of the Vanguard 0-6-0dh class?
| SELECT "Fleet Size" FROM table_57524 WHERE "Class" = 'vanguard 0-6-0dh' | wikisql |
CREATE TABLE Participants_in_Events (
Event_ID INTEGER,
Participant_ID INTEGER
)
CREATE TABLE Services (
Service_ID INTEGER,
Service_Type_Code CHAR(15)
)
CREATE TABLE Participants (
Participant_ID INTEGER,
Participant_Type_Code CHAR(15),
Participant_Details VARCHAR(255)
)
CREATE TABLE Eve... | SELECT Participant_Details, Participant_ID FROM Participants ORDER BY Participant_Details | nvbench |
CREATE TABLE t_kc21 (
MED_CLINIC_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
COMP_ID text,
PERSON_ID text,
PERSON_NM text,
IDENTITY_CARD text,
SOC_SRT_CARD text,
PERSON_SEX number,
PERSON_AGE number,
IN_HOSP_DATE time,
OUT_HOSP_DATE time,
DIFF_PLACE_FLG numb... | SELECT COUNT(*) FROM t_kc22 WHERE MED_ORG_DEPT_CD = '7944' AND STA_DATE BETWEEN '2006-08-03' AND '2019-10-05' AND SOC_SRT_DIRE_NM = '乌灵胶囊' | css |
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | SELECT 'Tag Wiki', PostTypeId FROM Posts WHERE Id = 3606997 UNION ALL SELECT 'Excerpt', PostTypeId FROM Posts WHERE Id = 3624963 | sede |
CREATE TABLE table_13314 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What date has wrexham as the home team?
| SELECT "Date" FROM table_13314 WHERE "Home team" = 'wrexham' | wikisql |
CREATE TABLE table_name_17 (
score VARCHAR,
loss VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Loss of lyon (5-4) had what score?
| SELECT score FROM table_name_17 WHERE loss = "lyon (5-4)" | sql_create_context |
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE diagnosis (
diagn... | SELECT SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t4.diagnosistime) > 3 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.uniquepid, t2.diagnosistime FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid... | eicu |
CREATE TABLE table_name_50 (
tournament VARCHAR,
runner_s__up VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What tournament was Laura Davies the runner-up?
| SELECT tournament FROM table_name_50 WHERE runner_s__up = "laura davies" | sql_create_context |
CREATE TABLE table_name_36 (
rank INTEGER,
profits__billion_$_ VARCHAR,
industry VARCHAR,
company VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the smallest rank for an industry of banking, a company of bank of america, and profits (billion ... | SELECT MIN(rank) FROM table_name_36 WHERE industry = "banking" AND company = "bank of america" AND profits__billion_$_ > 16.47 | sql_create_context |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
sy... | SELECT COUNT(*) FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '033-7332')) AND DATETIME(medication.drugstarttime) >= DATETIME(CURRENT_TIME(),... | eicu |
CREATE TABLE table_2741 (
"Rank" real,
"Census-designated place" text,
"Metropolitan area" text,
"State" text,
"Population (2000 census)" real,
"Land area (mi 2 )" text,
"Population density (people per mi 2 )" text
)
-- Using valid SQLite, answer the following questions for the tables prov... | SELECT COUNT("Census-designated place") FROM table_2741 WHERE "Population (2000 census)" = '10581' | wikisql |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE... | SELECT COUNT(DISTINCT t2.subject_id) FROM (SELECT t1.subject_id, t1.charttime FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_di... | mimic_iii |
CREATE TABLE driver (
Driver_ID int,
Name text,
Party text,
Home_city text,
Age int
)
CREATE TABLE school (
School_ID int,
Grade text,
School text,
Location text,
Type text
)
CREATE TABLE school_bus (
School_ID int,
Driver_ID int,
Years_Working int,
If_full_time... | SELECT Home_city, COUNT(Home_city) FROM driver GROUP BY Home_city ORDER BY Home_city | nvbench |
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.
-- Draw a bar chart for what i... | SELECT job, MIN(age) FROM Person GROUP BY job ORDER BY MIN(age) DESC | nvbench |
CREATE TABLE gas_station (
Station_ID int,
Open_Year int,
Location text,
Manager_Name text,
Vice_Manager_Name text,
Representative_Name text
)
CREATE TABLE station_company (
Station_ID int,
Company_ID int,
Rank_of_the_Year int
)
CREATE TABLE company (
Company_ID int,
Rank i... | SELECT Headquarters, COUNT(*) FROM company GROUP BY Headquarters ORDER BY Headquarters | nvbench |
CREATE TABLE table_11542 (
"Year" real,
"Date" text,
"Location" text,
"Score" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What day was the score 3-0 after 2011?
| SELECT "Date" FROM table_11542 WHERE "Score" = '3-0' AND "Year" = '2011' | wikisql |
CREATE TABLE table_44748 (
"Date" text,
"Series" text,
"Circuit" text,
"City / State" text,
"Winner" text,
"Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Date, when Team is Holden Racing Team, and when Circuit is Eastern Creek Rac... | SELECT "Date" FROM table_44748 WHERE "Team" = 'holden racing team' AND "Circuit" = 'eastern creek raceway' | wikisql |
CREATE TABLE table_73945 (
"Rank" real,
"Couple" text,
"Judges" real,
"Public" real,
"Total" real,
"Vote percentage" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the result for the total of 12?
| SELECT "Result" FROM table_73945 WHERE "Total" = '12' | wikisql |
CREATE TABLE table_name_35 (
circuit VARCHAR,
winning_driver VARCHAR,
race_name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What circuit did Innes Ireland win at for the I lombank trophy?
| SELECT circuit FROM table_name_35 WHERE winning_driver = "innes ireland" AND race_name = "i lombank trophy" | 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 jybgb (
BBCJBW text,
BBDM tex... | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = j... | css |
CREATE TABLE table_18207285_2 (
result VARCHAR,
attendance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the result of the game seen by 31095 people?
| SELECT result FROM table_18207285_2 WHERE attendance = 31095 | sql_create_context |
CREATE TABLE table_8085 (
"Season" text,
"President" text,
"General Sec" text,
"Treasurer" text,
"Fixtures Sec" text,
"Social Sec Bradford" text,
"Social Sec Leeds" text,
"Media Officer" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Wha... | SELECT "Social Sec Leeds" FROM table_8085 WHERE "Media Officer" = 'jason james' AND "Treasurer" = 'james davidson' | wikisql |
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 INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "57450" AND lab.flag = "delta" | mimicsql_data |
CREATE TABLE table_34290 (
"Round" real,
"Pick #" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the largest overall where the position was linebacker and the pick number was ... | SELECT MAX("Overall") FROM table_34290 WHERE "Position" = 'linebacker' AND "Pick #" > '9' | wikisql |
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
... | SELECT HIRE_DATE, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) | nvbench |
CREATE TABLE t_kc21 (
MED_CLINIC_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
COMP_ID text,
PERSON_ID text,
PERSON_NM text,
IDENTITY_CARD text,
SOC_SRT_CARD text,
PERSON_SEX number,
PERSON_AGE number,
IN_HOSP_DATE time,
OUT_HOSP_DATE time,
DIFF_PLACE_FLG numb... | SELECT MED_ORG_DEPT_CD, IN_DIAG_DIS_NM, AVG(PERSON_AGE) FROM t_kc21 WHERE MED_SER_ORG_NO = '1150862' GROUP BY MED_ORG_DEPT_CD, IN_DIAG_DIS_NM | css |
CREATE TABLE table_name_78 (
total INTEGER,
silver INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the smallest number of medals a country with more than 14 silver has?
| SELECT MIN(total) FROM table_name_78 WHERE silver > 14 | sql_create_context |
CREATE TABLE table_10327 (
"Year" text,
"Builder and model name" text,
"Length (feet)" real,
"Width (inches)" real,
"Engine" text,
"Numbers" text,
"Retired" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On buses ranging in numbr 401-484, wh... | SELECT MIN("Width (inches)") FROM table_10327 WHERE "Length (feet)" > '25' AND "Numbers" = '401-484' | wikisql |
CREATE TABLE table_77549 (
"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 ha... | SELECT "High rebounds" FROM table_77549 WHERE "Game" = '6' | wikisql |
CREATE TABLE table_41098 (
"Administrative Panel" real,
"Agricultural Panel" real,
"Cultural and Educational Panel" real,
"Industrial and Commercial Panel" real,
"Labour Panel" real,
"National University of Ireland" real,
"University of Dublin" real,
"Nominated by the Taoiseach" real,
... | SELECT AVG("Total") FROM table_41098 WHERE "Nominated by the Taoiseach" = '0' AND "Agricultural Panel" > '5' | wikisql |
CREATE TABLE table_7111 (
"Year" real,
"Conventional plans" text,
"HMOs" text,
"PPOs" text,
"POS plans" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which conventional plan has a POS of 13%?
| SELECT "Conventional plans" FROM table_7111 WHERE "POS plans" = '13%' | wikisql |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wa... | SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-232560')) AND intakeoutput.celllabel = 'outp... | eicu |
CREATE TABLE table_56996 (
"Round" real,
"Overall" real,
"Player" text,
"Nationality" text,
"Club team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the overall pick for Doug Sproule of the United States?
| SELECT "Overall" FROM table_56996 WHERE "Nationality" = 'united states' AND "Player" = 'doug sproule' | wikisql |
CREATE TABLE Ref_Detention_Type (
detention_type_code VARCHAR(10),
detention_type_description VARCHAR(80)
)
CREATE TABLE Addresses (
address_id INTEGER,
line_1 VARCHAR(120),
line_2 VARCHAR(120),
line_3 VARCHAR(120),
city VARCHAR(80),
zip_postcode VARCHAR(20),
state_province_county V... | SELECT other_details, AVG(monthly_rental) FROM Student_Addresses GROUP BY other_details ORDER BY monthly_rental DESC | nvbench |
CREATE TABLE table_45518 (
"Rank" text,
"Team" text,
"Athletes" text,
"Run 1" text,
"Run 2" text,
"Run 3" text,
"Run 4" text,
"Final" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Run 3 has a Run 1 of 2:20.10?
| SELECT "Run 3" FROM table_45518 WHERE "Run 1" = '2:20.10' | wikisql |
CREATE TABLE table_name_8 (
source VARCHAR,
attack VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Source has an Attack of 9,77%?
| SELECT source FROM table_name_8 WHERE attack = "9,77%" | sql_create_context |
CREATE TABLE table_39581 (
"Tournament" text,
"Wins" real,
"Top-5" real,
"Top-10" real,
"Top-25" real,
"Events" real,
"Cuts made" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average number of cuts made in events with fewer tha... | SELECT AVG("Cuts made") FROM table_39581 WHERE "Top-10" = '11' AND "Wins" < '1' | wikisql |
CREATE TABLE table_690 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Status" text,
"Opponent" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what's the party with opponent being marcy kaptur (d) 75.3% randy whitman (r... | SELECT "Party" FROM table_690 WHERE "Opponent" = 'Marcy Kaptur (D) 75.3% Randy Whitman (R) 24.7%' | wikisql |
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense text
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
Ex... | SELECT COUNT(DISTINCT (q.Id)) FROM Posts AS q INNER JOIN Posts AS a ON a.ParentId = q.Id INNER JOIN Posts AS aa ON aa.ParentId = q.Id WHERE q.PostTypeId = 1 AND a.PostTypeId = 2 AND aa.PostTypeId = 2 AND q.AcceptedAnswerId = a.Id AND q.AnswerCount >= 2 AND DATEDIFF(DAY, q.CreationDate, CreationDate) <= 7 AND DATEDIFF(D... | sede |
CREATE TABLE table_name_31 (
president VARCHAR,
year VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the President with a Year larger than 2011, and a Date with 23 may?
| SELECT president FROM table_name_31 WHERE year > 2011 AND date = "23 may" | sql_create_context |
CREATE TABLE table_name_67 (
draws INTEGER,
total VARCHAR,
goal_difference VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average number of draws that have a total of 1 and a goal difference of 2:0?
| SELECT AVG(draws) FROM table_name_67 WHERE total = 1 AND goal_difference = "2:0" | sql_create_context |
CREATE TABLE table_37281 (
"Rocket" text,
"Country" text,
"Type" text,
"Launches" real,
"Successes" real,
"Failures" real,
"Partial failures" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the fewest partial failures associated with... | SELECT MIN("Partial failures") FROM table_37281 WHERE "Launches" = '1' AND "Country" = 'india' AND "Type" = 'gslv' AND "Rocket" = 'gslv mk ii' | wikisql |
CREATE TABLE table_name_41 (
first_year VARCHAR,
title VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the first year for Popgun?
| SELECT first_year FROM table_name_41 WHERE title = "popgun" | sql_create_context |
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE com... | SELECT DISTINCT COURSE_1.department, COURSE_1.name, COURSE_1.number FROM course AS COURSE_0 INNER JOIN course_prerequisite ON COURSE_0.course_id = course_prerequisite.course_id INNER JOIN course AS COURSE_1 ON COURSE_1.course_id = course_prerequisite.pre_course_id WHERE COURSE_0.department = 'MKT' AND COURSE_0.number =... | advising |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.