instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_4200 (
"Institution" text,
"Location - City" text,
"Location - State" text,
"Nickname" text,
"Founded" real,
"Affiliation" text,
"Enrollment" real,
"Primary Conference" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Wh... | SELECT "Location - City" FROM table_4200 WHERE "Institution" = 'Tiffin University' | wikisql |
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_da... | 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 = 'SAN FRANCISCO' AND date_day.day_number = 23 AND date_day.month_number = 4... | atis |
CREATE TABLE table_30498 (
"Week" real,
"Portraying" text,
"Song" text,
"Julian Clary" text,
"Emma Bunton" text,
"Guest Judge" text,
"Bonus Points" text,
"Total" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was ... | SELECT "Emma Bunton" FROM table_30498 WHERE "Total" = '22' | wikisql |
CREATE TABLE table_28567 (
"Finished" text,
"Performance Order" real,
"Percentage of votes" text,
"Artist" text,
"Act" text,
"Semi Finals Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the percentage of votes for violinist
| SELECT "Percentage of votes" FROM table_28567 WHERE "Act" = 'Violinist' | wikisql |
CREATE TABLE table_name_38 (
country VARCHAR,
finish VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What country had a finish of t42?
| SELECT country FROM table_name_38 WHERE finish = "t42" | sql_create_context |
CREATE TABLE grapes (
ID INTEGER,
Grape TEXT,
Color TEXT
)
CREATE TABLE appellations (
No INTEGER,
Appelation TEXT,
County TEXT,
State TEXT,
Area TEXT,
isAVA TEXT
)
CREATE TABLE wine (
No INTEGER,
Grape TEXT,
Winery TEXT,
Appelation TEXT,
State TEXT,
Name TE... | SELECT Year, AVG(MAX(Score)) FROM wine ORDER BY AVG(MAX(Score)) DESC | 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 MIN(t_kc24.MED_AMOUT), MAX(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '7379867' AND t_kc21.IN_DIAG_DIS_CD = 'T83.572') | css |
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
-- Using valid SQLite, answer the following questions for the... | SELECT T2.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name | nvbench |
CREATE TABLE table_6992 (
"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 SUM("Cultural and Educational Panel") FROM table_6992 WHERE "Administrative Panel" = '0' AND "Agricultural Panel" < '0' | wikisql |
CREATE TABLE table_65643 (
"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.
-- Which away team had a Score of 2 0?
| SELECT "Away team" FROM table_65643 WHERE "Score" = '2–0' | wikisql |
CREATE TABLE table_name_18 (
opponent VARCHAR,
week VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the opponent in a week below 14 on October 10, 1993?
| SELECT opponent FROM table_name_18 WHERE week < 14 AND date = "october 10, 1993" | sql_create_context |
CREATE TABLE table_67918 (
"Name" text,
"Period" text,
"Matches" real,
"Wins" real,
"Draws" real,
"Losses" real,
"Efficiency %" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest number of matches with less than 2 draws that ... | SELECT MAX("Matches") FROM table_67918 WHERE "Draws" < '2' AND "Efficiency %" = '25%' | wikisql |
CREATE TABLE table_43505 (
"Tournament" text,
"1978" text,
"1979" text,
"1980" text,
"1982" text,
"1983" text,
"1984" text,
"1985" text,
"1986" text,
"1987" text,
"1988" text,
"1989" text,
"1990" text,
"1991" text,
"1992" text,
"Career SR" text
)
-- Usin... | SELECT "1982" FROM table_43505 WHERE "1978" = 'a' AND "1985" = '4r' AND "1991" = '1r' | wikisql |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code tex... | SELECT intakeoutput.celllabel FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-203413')) AND intakeoutput.cellpath LIKE '%intake%' AND ... | eicu |
CREATE TABLE table_name_74 (
home_team VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the home teams score at Western Oval?
| SELECT home_team AS score FROM table_name_74 WHERE venue = "western oval" | sql_create_context |
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.admission_type = "URGENT" AND demographic.ethnicity = "ASIAN" | mimicsql_data |
CREATE TABLE table_32692 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- At what venue did a crowd larger than 11,000 see... | SELECT "Venue" FROM table_32692 WHERE "Crowd" > '11,000' AND "Away team score" = '11.10 (76)' | wikisql |
CREATE TABLE table_5076 (
"Game" real,
"October" real,
"Opponent" text,
"Score" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Opponent of @ atlanta flames had what game?
| SELECT "Game" FROM table_5076 WHERE "Opponent" = '@ atlanta flames' | wikisql |
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length int,
weight int,
capacity int,
pay_load int,
cruising_speed int,
range_... | 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_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER' AND flight.departure_time < 1000 AND flight.to_airport = AIRPORT_SERVICE_1.airpor... | atis |
CREATE TABLE table_name_98 (
score VARCHAR,
game VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Score of Game 4?
| SELECT score FROM table_name_98 WHERE game = "4" | sql_create_context |
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 prescription... | SELECT demographic.expire_flag FROM demographic WHERE demographic.name = "Jerry Deberry" | mimicsql_data |
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 jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE regions (
REGION_... | SELECT JOB_ID, SUM(DEPARTMENT_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY JOB_ID | nvbench |
CREATE TABLE table_19969 (
"Province" text,
"Prefecture" text,
"County" text,
"Tujia Population" real,
"% of Chinas Tujia Population" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the tujia population is 462444 what is the overall percentage o... | SELECT "% of Chinas Tujia Population" FROM table_19969 WHERE "Tujia Population" = '462444' | wikisql |
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
-- Using valid SQLite, answer the following questions for the... | SELECT Name, Code FROM Products WHERE Price BETWEEN 60 AND 120 | nvbench |
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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT demographic.admission_type, procedures.long_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Dawn Brill" | mimicsql_data |
CREATE TABLE table_42813 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( $ )" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- From Country is Vijay Singh?
| SELECT "Country" FROM table_42813 WHERE "Player" = 'vijay singh' | wikisql |
CREATE TABLE table_45439 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What date was the tournament in Indian Wells?
| SELECT "Date" FROM table_45439 WHERE "Tournament" = 'indian wells' | wikisql |
CREATE TABLE table_25586 (
"Region ( NUTS 2006)" text,
"Total (million \u20ac )" text,
"\u20ac per capita (2005)" real,
"PPP (million \u20ac)" real,
"PPP \u20ac per capita" real,
"% of EU average GDP (PPP)" text
)
-- Using valid SQLite, answer the following questions for the tables provided ab... | SELECT "Region ( NUTS 2006)" FROM table_25586 WHERE "PPP (million \u20ac)" = '23164' | wikisql |
CREATE TABLE table_name_45 (
home VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Home is on april 22?
| SELECT home FROM table_name_45 WHERE date = "april 22" | sql_create_context |
CREATE TABLE table_name_70 (
part_2 VARCHAR,
verb_meaning VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which part 2 has a verb that means to leap?
| SELECT part_2 FROM table_name_70 WHERE verb_meaning = "to leap" | sql_create_context |
CREATE TABLE table_28798161_3 (
Id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- in the leage what was the minimum 4wi
| SELECT MIN(4 AS wi) FROM table_28798161_3 | sql_create_context |
CREATE TABLE person (
name text,
age number,
city text,
gender text,
job text
)
CREATE TABLE personfriend (
name text,
friend text,
year number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the names of all of Alice's friends of fr... | SELECT DISTINCT T4.name FROM personfriend AS T1 JOIN person AS T2 ON T1.name = T2.name JOIN personfriend AS T3 ON T1.friend = T3.name JOIN personfriend AS T4 ON T3.friend = T4.name WHERE T2.name = 'Alice' AND T4.name <> 'Alice' | spider |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid num... | SELECT t1.culturesite FROM (SELECT microlab.culturesite, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM microlab GROUP BY microlab.culturesite) AS t1 WHERE t1.c1 <= 3 | eicu |
CREATE TABLE table_name_57 (
memory__gb_ VARCHAR,
number_of_cpus VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Memory (GB) has a Number of CPUs of 1 6?
| SELECT memory__gb_ FROM table_name_57 WHERE number_of_cpus = "1–6" | sql_create_context |
CREATE TABLE table_train_13 (
"id" int,
"active_infection" bool,
"procalcitonin" int,
"receiving_vasopressor" bool,
"sepsis" bool,
"septic_shock" bool,
"age" float,
"lactate" int,
"NOUSE" float
)
-- Using valid SQLite, answer the following questions for the tables provided above.
... | SELECT * FROM table_train_13 WHERE sepsis = 1 | criteria2sql |
CREATE TABLE CLASS (
CLASS_CODE varchar(5),
CRS_CODE varchar(10),
CLASS_SECTION varchar(2),
CLASS_TIME varchar(20),
CLASS_ROOM varchar(8),
PROF_NUM int
)
CREATE TABLE ENROLL (
CLASS_CODE varchar(5),
STU_NUM int,
ENROLL_GRADE varchar(50)
)
CREATE TABLE EMPLOYEE (
EMP_NUM int,
... | SELECT STU_FNAME, COUNT(STU_FNAME) FROM STUDENT AS T1 JOIN ENROLL AS T2 ON T1.STU_NUM = T2.STU_NUM WHERE T2.ENROLL_GRADE = 'C' OR T2.ENROLL_GRADE = 'A' GROUP BY STU_FNAME ORDER BY STU_FNAME DESC | nvbench |
CREATE TABLE table_59935 (
"Date" text,
"Name of ship" text,
"Flag" text,
"Tonnage" real,
"Fate" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Tonnage of the ship from Canada?
| SELECT MAX("Tonnage") FROM table_59935 WHERE "Flag" = 'canada' | wikisql |
CREATE TABLE mzjzjlb_jybgb (
YLJGDM_MZJZJLB text,
BGDH number,
YLJGDM number
)
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW te... | SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGDH = '08372229843' | css |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose... | SELECT COUNT(DISTINCT admissions.hadm_id) FROM admissions WHERE admissions.subject_id = 83901 AND STRFTIME('%y', admissions.admittime) >= '2105' | mimic_iii |
CREATE TABLE table_name_87 (
tie_no VARCHAR,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which tie did Huddersfield Town play as an away team?
| SELECT tie_no FROM table_name_87 WHERE away_team = "huddersfield town" | sql_create_context |
CREATE TABLE table_28211674_3 (
mixed_veteran VARCHAR,
womens_singles VARCHAR,
mens_singles VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When Naomi Owen won the Womens Singles and Ricardo Walther won the Mens Singles, who won the mixed veteran?
| SELECT mixed_veteran FROM table_28211674_3 WHERE womens_singles = "Naomi Owen" AND mens_singles = "Ricardo Walther" | sql_create_context |
CREATE TABLE table_76569 (
"Season" real,
"Date" text,
"Location" text,
"Discipline" text,
"Place" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the date of Super G in the 2010 season?
| SELECT "Date" FROM table_76569 WHERE "Discipline" = 'super g' AND "Season" = '2010' | wikisql |
CREATE TABLE table_name_74 (
soccer VARCHAR,
cross_country VARCHAR,
school_year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Soccer, when Cross Country is Lexington, and when School Year is 2011-12?
| SELECT soccer FROM table_name_74 WHERE cross_country = "lexington" AND school_year = "2011-12" | sql_create_context |
CREATE TABLE table_7109 (
"Gold Medals" real,
"Silver Medals" real,
"Bronze Medals" real,
"4th Place" real,
"5th Place" real,
"Appearances" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of 4th place that has 3 appearanc... | SELECT COUNT("4th Place") FROM table_7109 WHERE "Appearances" = '3' AND "Silver Medals" > '0' AND "Gold Medals" < '0' | wikisql |
CREATE TABLE table_54566 (
"Discipline" text,
"Season" real,
"Performance" text,
"Place" text,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What were the performance lengths in the 3000 m events in and after 2003?
| SELECT "Performance" FROM table_54566 WHERE "Season" > '2003' AND "Discipline" = '3000 m' | wikisql |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE intakeoutput (
i... | SELECT microlab.organism FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-19271')) AND microlab.culturesite = 'urine, catheter specimen' AND ST... | eicu |
CREATE TABLE table_39894 (
"Order" real,
"Minister" text,
"Party affiliation" text,
"Prime Minister" text,
"Term start" text,
"Term end" text,
"Term in office" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest order with a Mi... | SELECT MIN("Order") FROM table_39894 WHERE "Minister" = 'joe hockey' | wikisql |
CREATE TABLE party (
Party_ID int,
Party_Theme text,
Location text,
First_year text,
Last_year text,
Number_of_hosts int
)
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... | SELECT Nationality, COUNT(*) FROM host GROUP BY Nationality | nvbench |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CRE... | 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 = '021-79656')) AND medication.drugname = 'tramadol 50 mg tab' AND STRFTIME('%y',... | eicu |
CREATE TABLE table_78390 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What kind of surface was the Tournament at Sunderland played on?
| SELECT "Surface" FROM table_78390 WHERE "Tournament" = 'sunderland' | wikisql |
CREATE TABLE table_204_780 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- the 1990 european championships and the 1988 olympic games both resulted in what pos... | SELECT "position" FROM table_204_780 WHERE "year" = 1990 AND "competition" = 'european championships' | squall |
CREATE TABLE table_name_95 (
machine VARCHAR,
place VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What machine has 5 as the place?
| SELECT machine FROM table_name_95 WHERE place = 5 | sql_create_context |
CREATE TABLE table_name_78 (
competition VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What competition had a score of 8-1?
| SELECT competition FROM table_name_78 WHERE score = "8-1" | sql_create_context |
CREATE TABLE table_1310499_1 (
application VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 2nd ratio of 1996-2002 Dodge Viper?
| SELECT 2 AS nd FROM table_1310499_1 WHERE application = "1996-2002 Dodge Viper" | sql_create_context |
CREATE TABLE table_29181479_5 (
series VARCHAR,
game VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Lis the series for game 5.
| SELECT series FROM table_29181479_5 WHERE game = 5 | sql_create_context |
CREATE TABLE table_name_65 (
race_name VARCHAR,
city_location VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the race in Cleveland, Ohio?
| SELECT race_name FROM table_name_65 WHERE city_location = "cleveland, ohio" | sql_create_context |
CREATE TABLE table_2668169_2 (
party VARCHAR,
incumbent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which party does the incumbent Mathias Morris belong to?
| SELECT party FROM table_2668169_2 WHERE incumbent = "Mathias Morris" | sql_create_context |
CREATE TABLE table_name_25 (
year INTEGER,
formula VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest year with a formula of Grand Prix?
| SELECT MAX(year) FROM table_name_25 WHERE formula = "grand prix" | sql_create_context |
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE program (
program_id int,
name varchar,
college varc... | SELECT DISTINCT advisory_requirement FROM course WHERE department = 'LHC' AND number = 350 | advising |
CREATE TABLE table_53175 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which venue hosted the 2004 AFC Asian Cup qualification on November 18, 2003?
| SELECT "Venue" FROM table_53175 WHERE "Competition" = '2004 afc asian cup qualification' AND "Date" = 'november 18, 2003' | wikisql |
CREATE TABLE flight (
flno number,
origin text,
destination text,
distance number,
departure_date time,
arrival_date time,
price number,
aid number
)
CREATE TABLE certificate (
eid number,
aid number
)
CREATE TABLE aircraft (
aid number,
name text,
distance number
)... | SELECT origin FROM flight GROUP BY origin ORDER BY COUNT(*) DESC LIMIT 1 | spider |
CREATE TABLE table_name_39 (
time VARCHAR,
round VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the total time for the match that ocurred in Round 3 with opponent Keith Wisniewski?
| SELECT time FROM table_name_39 WHERE round = "3" AND opponent = "keith wisniewski" | sql_create_context |
CREATE TABLE injury_accident (
game_id int,
id int,
Player text,
Injury text,
Number_of_matches text,
Source text
)
CREATE TABLE game (
stadium_id int,
id int,
Season int,
Date text,
Home_team text,
Away_team text,
Score text,
Competition text
)
CREATE TABLE sta... | SELECT Season, COUNT(Season) FROM game GROUP BY Away_team, Season ORDER BY Season | nvbench |
CREATE TABLE table_26683 (
"Region/Country" text,
"Local name" text,
"Main presenter" text,
"Network" text,
"Year premiered" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest year premiered when Benjamin Castaldi is main presenter?
| SELECT MAX("Year premiered") FROM table_26683 WHERE "Main presenter" = 'Benjamin Castaldi' | wikisql |
CREATE TABLE table_50738 (
"Region" text,
"Date" text,
"Label" text,
"Format" text,
"Catalog" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which label is in Australia?
| SELECT "Label" FROM table_50738 WHERE "Region" = 'australia' | wikisql |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_ID number
)
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD ... | SELECT COUNT(t_kc21.MED_SER_ORG_NO) FROM t_kc21 WHERE t_kc21.PERSON_ID = '22690907' AND t_kc21.IN_HOSP_DATE BETWEEN '2011-06-04' AND '2015-01-28' | css |
CREATE TABLE table_202_161 (
id number,
"dutch language group\nelectoral district (as of 2012)" text,
"dutch language group\nseats" text,
"french language group\nelectoral district (as of 2012)" text,
"french language group\nseats" text
)
-- Using valid SQLite, answer the following questions for t... | SELECT "french language group\nseats" FROM table_202_161 WHERE "french language group\nelectoral district (as of 2012)" = 'luxembourg' | squall |
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.gender = "F" AND lab.label = "Nucleated Red Cells" | mimicsql_data |
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text... | SELECT Id AS "post_link", CreationDate FROM Posts WHERE PostTypeId = 2 AND OwnerUserId = 510662 ORDER BY CreationDate DESC | sede |
CREATE TABLE table_204_148 (
id number,
"name" text,
"elected" text,
"term began" text,
"term ended" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who began their term in 1890 ?
| SELECT "name" FROM table_204_148 WHERE "term began" = 1890 | squall |
CREATE TABLE table_name_89 (
air_date VARCHAR,
episode_number VARCHAR,
event_1 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the air date the had atlasphere for event 1 before episode 11?
| SELECT air_date FROM table_name_89 WHERE episode_number < 11 AND event_1 = "atlasphere" | sql_create_context |
CREATE TABLE table_21313 (
"Position" real,
"best year" text,
"best 2-year period" text,
"best 3-year period" text,
"best 5-year period" text,
"best 10-year period" text,
"best 15-year period" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- W... | SELECT "best 10-year period" FROM table_21313 WHERE "best 15-year period" = 'Fischer' | wikisql |
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE cour... | SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND NOT COURSE_0.course_id IN (SELECT STUDENT_RECORDalias0.course_id FROM student_record AS STUDENT_RECORDalias0 WHERE STUDENT... | advising |
CREATE TABLE Documents_with_Expenses (
Document_ID INTEGER,
Budget_Type_Code CHAR(15),
Document_Details VARCHAR(255)
)
CREATE TABLE Documents (
Document_ID INTEGER,
Document_Type_Code CHAR(15),
Project_ID INTEGER,
Document_Date DATETIME,
Document_Name VARCHAR(255),
Document_Descript... | SELECT Project_ID, COUNT(*) FROM Documents GROUP BY Project_ID | nvbench |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code tex... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', treatment.treatmenttime)) FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-12313... | eicu |
CREATE TABLE table_30989 (
"Outcome" text,
"Year" real,
"Championship" text,
"Surface" text,
"Partner" text,
"Opponents" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the earliest year in which the result is championsh... | SELECT MIN("Year") FROM table_30989 WHERE "Championship" = 'US Open (2)' | wikisql |
CREATE TABLE music_festival (
id number,
music_festival text,
date_of_ceremony text,
category text,
volume number,
result text
)
CREATE TABLE artist (
artist_id number,
artist text,
age number,
famous_title text,
famous_release_date text
)
CREATE TABLE volume (
volume_i... | SELECT category FROM music_festival WHERE result = "Awarded" | spider |
CREATE TABLE table_77669 (
"Debut year" real,
"Player" text,
"Date of birth" text,
"Games" real,
"Goals" real,
"Years at club" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest number of games Jack Gaudion, who debut in 1936, pla... | SELECT MIN("Games") FROM table_77669 WHERE "Debut year" = '1936' AND "Player" = 'jack gaudion' | wikisql |
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE SuggestedEdits (
Id n... | SELECT *, COUNT(*) FROM (SELECT DATE(CAST(TIME_TO_STR(CreationDate, '%Y') AS TEXT) + '-' + CAST(TIME_TO_STR(CreationDate, '%m') AS TEXT) + '-01') AS Month, t.TagName FROM Posts AS p JOIN PostTags AS pt ON pt.PostId = p.Id JOIN Tags AS t ON t.Id = pt.TagId WHERE t.TagName IN ('julia')) AS tmptable WHERE month BETWEEN DA... | sede |
CREATE TABLE table_12000368_1 (
countries_sampled VARCHAR,
year_of_publication VARCHAR,
ranking_la__2_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many countries sampled with year of publication being 2007 and ranking l.a. (2) being 7th
| SELECT COUNT(countries_sampled) FROM table_12000368_1 WHERE year_of_publication = "2007" AND ranking_la__2_ = "7th" | sql_create_context |
CREATE TABLE table_name_15 (
total VARCHAR,
a_score VARCHAR,
b_score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total when the A score was less than 6.6, and the B score was 8.925?
| SELECT total FROM table_name_15 WHERE a_score < 6.6 AND b_score = 8.925 | sql_create_context |
CREATE TABLE fgwyjzb (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | SELECT SUM(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '9519124' AND gwyjzb.MED_ORG_DEPT_NM = '小儿青光眼科' UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '9519124' AND fgwyjzb.MED_ORG_DEPT_NM = '小儿青光眼科') A... | css |
CREATE TABLE table_60457 (
"Tournament" 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,
"2013" text
)
-- Using valid SQLite, answer the following qu... | SELECT "Tournament" FROM table_60457 WHERE "2012" = 'grand slam tournaments' | wikisql |
CREATE TABLE table_name_28 (
year VARCHAR,
total_matches VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHAT YEAR HAD 5 TOTAL MATCHES?
| SELECT year FROM table_name_28 WHERE total_matches = 5 | sql_create_context |
CREATE TABLE table_204_898 (
id number,
"seed" text,
"school" text,
"conf (overall)" text,
"tiebreaker" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which team finished last in this conference this season ?
| SELECT "school" FROM table_204_898 ORDER BY "seed" DESC LIMIT 1 | squall |
CREATE TABLE table_20906175_3 (
attempts VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many attempts did Charley Johnson have?
| SELECT COUNT(attempts) FROM table_20906175_3 WHERE name = "Charley Johnson" | 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 Id AS "user_link", DisplayName, Reputation, WebsiteUrl, Location FROM Users WHERE Location LIKE 'italy' ORDER BY Reputation DESC LIMIT 100 | sede |
CREATE TABLE table_57861 (
"Years" text,
"Engine" text,
"Displacement" text,
"Power" text,
"Torque" text,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is then engine when the notes state srt8?
| SELECT "Engine" FROM table_57861 WHERE "Notes" = 'srt8' | wikisql |
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,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM... | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN mzjzjlb JOIN zyjybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB AND zyjybgb.YLJGDM = jyjgzbb.YLJGDM AND zyjybgb... | css |
CREATE TABLE table_35819 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which district won when first elected in 1900?
| SELECT "District" FROM table_35819 WHERE "First elected" = '1900' | wikisql |
CREATE TABLE table_29602 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"First Star" text,
"Decision" text,
"Location" text,
"Attendance" real,
"Record" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Wh... | SELECT "Location" FROM table_29602 WHERE "Attendance" = '10056' | wikisql |
CREATE TABLE journalist (
journalist_ID int,
Name text,
Nationality text,
Age text,
Years_working int
)
CREATE TABLE news_report (
journalist_ID int,
Event_ID int,
Work_Type text
)
CREATE TABLE event (
Event_ID int,
Date text,
Venue text,
Name text,
Event_Attendance... | SELECT Nationality, AVG(Age) FROM journalist GROUP BY Nationality ORDER BY AVG(Age) DESC | nvbench |
CREATE TABLE table_14127 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- The game played at Sultan Qaboos Sports Complex, Muscat had what score?
| SELECT "Score" FROM table_14127 WHERE "Venue" = 'sultan qaboos sports complex, muscat' | wikisql |
CREATE TABLE table_8110 (
"Result" text,
"Race" text,
"Distance" text,
"Weight" real,
"Winner or 2nd" text,
"Pos'n" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the distance when the weight is 9.2?
| SELECT "Distance" FROM table_8110 WHERE "Weight" = '9.2' | wikisql |
CREATE TABLE table_12485020_1 (
ds_division VARCHAR,
divisional_secretary VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What DS division has S. L. M. Haneefa as the divisional secretary?
| SELECT ds_division FROM table_12485020_1 WHERE divisional_secretary = "S. L. M. Haneefa" | sql_create_context |
CREATE TABLE table_69401 (
"Language" text,
"Number" text,
"percentage (%)" text,
"males" text,
"females" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many males speak Russian?
| SELECT "males" FROM table_69401 WHERE "Language" = 'russian' | wikisql |
CREATE TABLE table_name_70 (
blagojevich__d_ VARCHAR,
source VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Blagojevich (D) has a Source of zogby/wsj, and a Date of october 16, 2006?
| SELECT blagojevich__d_ FROM table_name_70 WHERE source = "zogby/wsj" AND date = "october 16, 2006" | sql_create_context |
CREATE TABLE table_name_33 (
date VARCHAR,
competition VARCHAR,
runners_up VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What date did the Fai Cup with Derry City F.C. as runners-up take place?
| SELECT date FROM table_name_33 WHERE competition = "fai cup" AND runners_up = "derry city f.c." | sql_create_context |
CREATE TABLE table_61210 (
"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.
-- Which team won at the symmons plains raceway?
| SELECT "Team" FROM table_61210 WHERE "Circuit" = 'symmons plains raceway' | wikisql |
CREATE TABLE staff_roles (
role_code text,
role_description text
)
CREATE TABLE tasks (
task_id number,
project_id number,
task_details text,
eg agree objectives text
)
CREATE TABLE research_outcomes (
outcome_code text,
outcome_description text
)
CREATE TABLE project_outcomes (
p... | SELECT role_code FROM project_staff WHERE date_from > '2003-04-19 15:06:20' AND date_to < '2016-03-15 00:33:18' | spider |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.