instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_55793 (
"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.
-- What date has a Home team score of 11.18 (84)?
| SELECT "Date" FROM table_55793 WHERE "Home team score" = '11.18 (84)' | wikisql |
CREATE TABLE table_name_63 (
left_office VARCHAR,
political_party VARCHAR,
took_office VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Left Office, when Political Party is Ba'ath Party ( Syria Region ), and when Took Office is 7 March 1958?
| SELECT left_office FROM table_name_63 WHERE political_party = "ba'ath party ( syria region )" AND took_office = "7 march 1958" | sql_create_context |
CREATE TABLE table_66045 (
"Rank" real,
"Stadium" text,
"Capacity" text,
"Location" text,
"Home Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What home team has a rank greater than 6, and 94,392 as the capacity?
| SELECT "Home Team" FROM table_66045 WHERE "Rank" > '6' AND "Capacity" = '94,392' | wikisql |
CREATE TABLE table_name_88 (
tournament VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What tournament happened on 12 november 2006?
| SELECT tournament FROM table_name_88 WHERE date = "12 november 2006" | sql_create_context |
CREATE TABLE table_27635 (
"SlNo" real,
"Name of the City" text,
"Address" text,
"Contact Person" text,
"Telephone No" text,
"Facilities Offered" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the SlNo no of contact person SDE (P), Thir... | SELECT "SlNo" FROM table_27635 WHERE "Contact Person" = 'SDE (P), Thiruppattur' | wikisql |
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as varchar,
admit_term int,
predicted_graduation_semester int,
degree varchar,
minor varchar,
internship varch... | SELECT DISTINCT course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday, semester.semester, semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND c... | advising |
CREATE TABLE table_62254 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Results" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What district was a republican first elected in 2000?
| SELECT "District" FROM table_62254 WHERE "First elected" = '2000' AND "Party" = 'republican' | wikisql |
CREATE TABLE table_65390 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the place when the score was 65-70-72=207?
| SELECT "Place" FROM table_65390 WHERE "Score" = '65-70-72=207' | wikisql |
CREATE TABLE table_2268216_1 (
average_speed__mph_ VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many average speeds are listed in the year 2003?
| SELECT COUNT(average_speed__mph_) FROM table_2268216_1 WHERE year = "2003" | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "M" AND diagnoses.short_title = "Cong skin pigment anomal" | mimicsql_data |
CREATE TABLE Financial_transactions (
transaction_amount INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average and total transaction amount?
| SELECT AVG(transaction_amount), SUM(transaction_amount) FROM Financial_transactions | sql_create_context |
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense... | SELECT COUNT(*) FROM Users WHERE LastAccessDate > DATEADD(year, -1, GETDATE()) AND Reputation > 10 | sede |
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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.icd9_code = "3804" | mimicsql_data |
CREATE TABLE table_name_30 (
away_team VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score of the away team at princes park?
| SELECT away_team AS score FROM table_name_30 WHERE venue = "princes park" | sql_create_context |
CREATE TABLE table_64255 (
"Year" real,
"A-side" text,
"B-side" text,
"Catalog number" text,
"Label" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What year did the B-Side of Just Squeeze Me come out?
| SELECT "Year" FROM table_64255 WHERE "B-side" = 'just squeeze me' | wikisql |
CREATE TABLE table_23292220_3 (
first_broadcast VARCHAR,
daves_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the first broadcast date of the episode in which Dave's team is made up of Dave Johns and Sally Lindsay?
| SELECT first_broadcast FROM table_23292220_3 WHERE daves_team = "Dave Johns and Sally Lindsay" | sql_create_context |
CREATE TABLE table_48259 (
"Date" text,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponent in the final" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Date of the Vigo Tournament?
| SELECT "Date" FROM table_48259 WHERE "Tournament" = 'vigo' | wikisql |
CREATE TABLE table_69561 (
"Year" text,
"Start" text,
"Qual" text,
"Rank" text,
"Finish" text,
"Laps" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the Qual listed with a Rank of 27?
| SELECT "Qual" FROM table_69561 WHERE "Rank" = '27' | wikisql |
CREATE TABLE table_55975 (
"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.
-- How many spectators were at the away team Carlto... | SELECT "Crowd" FROM table_55975 WHERE "Away team" = 'carlton' | wikisql |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_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 job_history (
EMPLO... | SELECT HIRE_DATE, SUM(DEPARTMENT_ID) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) | nvbench |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost numbe... | SELECT COUNT(*) > 0 FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '017-59454') AND NOT patient.unitdischargetime IS NULL ORDER BY patie... | eicu |
CREATE TABLE table_203_665 (
id number,
"name" text,
"municipality" text,
"established" number,
"tower height\nin meters (ft)" text,
"focal plane\nin meters (ft)" text,
"current status" text,
"current condition" text
)
-- Using valid SQLite, answer the following questions for the table... | SELECT "municipality" FROM table_203_665 WHERE "name" IN ('cardona island light', 'caja de muertos light') | squall |
CREATE TABLE table_name_30 (
winners VARCHAR,
season VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the winner in 2011?
| SELECT winners FROM table_name_30 WHERE season = 2011 | sql_create_context |
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE Users (
Id number,
Reputation number,... | SELECT Id AS "post_link", LENGTH(Body) AS Length, LastActivityDate AS "last_activity_date" FROM Posts WHERE PostTypeId = 2 AND OwnerUserId = '##UserId##' ORDER BY Length DESC LIMIT 1000 | sede |
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 INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Ac/chr syst/dia hrt fail" AND lab.fluid = "Joint Fluid" | mimicsql_data |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | 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 = "V4281" AND lab.fluid = "Cerebrospinal Fluid (CSF)" | mimicsql_data |
CREATE TABLE table_3936 (
"Round" real,
"Race" text,
"Pole position" text,
"Fastest lap" text,
"Most laps led" text,
"Driver" text,
"Team" text,
"Manufacturer" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What race d... | SELECT "Race" FROM table_3936 WHERE "Most laps led" = 'Simon Pagenaud' | wikisql |
CREATE TABLE table_2796 (
"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.
-- Name th... | SELECT MIN("Game") FROM table_2796 WHERE "Score" = 'L 93–109 (OT)' | wikisql |
CREATE TABLE tracks (
name VARCHAR,
genre_id VARCHAR
)
CREATE TABLE albums (
id VARCHAR,
title VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- List name of all tracks in Balls to the Wall.
| SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = "Balls to the Wall" | sql_create_context |
CREATE TABLE table_54557 (
"Environment" text,
"Realization" text,
"Example" text,
"Pronunciation" text,
"Gloss" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the realization for 'to be, to do
| SELECT "Realization" FROM table_54557 WHERE "Gloss" = 'to be, to do' | wikisql |
CREATE TABLE table_5647 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the score of the tournament on 25 July 1994 with a cla... | SELECT "Score" FROM table_5647 WHERE "Surface" = 'clay' AND "Partner" = 'patricia tarabini' AND "Date" = '25 july 1994' | wikisql |
CREATE TABLE journal (
homepage varchar,
jid int,
name varchar
)
CREATE TABLE domain (
did int,
name varchar
)
CREATE TABLE domain_author (
aid int,
did int
)
CREATE TABLE author (
aid int,
homepage varchar,
name varchar,
oid int
)
CREATE TABLE writes (
aid int,
p... | SELECT title FROM publication WHERE citation_num > 200 AND year > 2000 | academic |
CREATE TABLE table_69327 (
"Name" text,
"Seasons" text,
"Matches" real,
"Inns" real,
"Runs" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Runs smaller than 6106, and Inns smaller than 146 has what total number of matches?
| SELECT COUNT("Matches") FROM table_69327 WHERE "Runs" < '6106' AND "Inns" < '146' | wikisql |
CREATE TABLE table_name_30 (
date VARCHAR,
winning_score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what Date was the Winning score of 72-67-68-67=274?
| SELECT date FROM table_name_30 WHERE winning_score = 72 - 67 - 68 - 67 = 274 | sql_create_context |
CREATE TABLE table_47051 (
"Volume:Issue" text,
"Issue Date(s)" text,
"Weeks on Top" text,
"Song" text,
"Artist" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the artist of ' bang bang boom '?
| SELECT "Artist" FROM table_47051 WHERE "Song" = ' bang bang boom ' | wikisql |
CREATE TABLE table_26410 (
"Season" text,
"Name" text,
"Teams" real,
"Relegated to league" text,
"Promoted to league" text,
"Promoted from league" text,
"Relegated from league" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many teams pa... | SELECT MAX("Teams") FROM table_26410 WHERE "Relegated to league" = 'Cornish All Blacks Pertemps Bees' | wikisql |
CREATE TABLE table_name_82 (
opponent VARCHAR,
week VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the opponent on week 7?
| SELECT opponent FROM table_name_82 WHERE week = "7" | sql_create_context |
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
Deletio... | SELECT Id, Title, CreationDate, Tags, ClosedDate, FavoriteCount, ViewCount, Score FROM Posts WHERE PostTypeId = 1 AND Tags LIKE '%##TagName1##%' AND Tags LIKE '%##TagName2##%' AND NOT Tags LIKE '%##ExcludedTag##%' AND Posts.CreationDate > CURRENT_TIMESTAMP() - 365 ORDER BY ViewCount DESC, FavoriteCount DESC, Score DESC... | sede |
CREATE TABLE table_59272 (
"Position" real,
"Club" text,
"Games played" real,
"Wins" real,
"Draws" real,
"Loses" real,
"Goals scored" real,
"Goals conceded" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sm... | SELECT MIN("Wins") FROM table_59272 WHERE "Goals conceded" < '26' AND "Draws" = '1' AND "Goals scored" < '74' | wikisql |
CREATE TABLE table_name_60 (
team VARCHAR,
race_title VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the team for launceston
| SELECT team FROM table_name_60 WHERE race_title = "launceston" | sql_create_context |
CREATE TABLE table_64905 (
"School" text,
"City" text,
"Team Name" text,
"County" text,
"Year Joined" text,
"Year Left" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which city has a school of North Vernon and a county of 40 Jennings?
| SELECT "City" FROM table_64905 WHERE "County" = '40 jennings' AND "School" = 'north vernon' | wikisql |
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 intakeoutput (
intakeou... | SELECT DISTINCT medication.routeadmin FROM medication WHERE medication.drugname = 'trandate' | eicu |
CREATE TABLE film (
film_id number,
title text,
description text,
release_year time,
language_id number,
original_language_id number,
rental_duration number,
rental_rate number,
length number,
replacement_cost number,
rating text,
special_features text,
last_update ti... | SELECT T1.first_name, T1.last_name FROM customer AS T1 JOIN rental AS T2 ON T1.customer_id = T2.customer_id ORDER BY T2.rental_date LIMIT 1 | spider |
CREATE TABLE table_29398373_2 (
captain VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the number of captains for barcelona
| SELECT COUNT(captain) FROM table_29398373_2 WHERE team = "Barcelona" | sql_create_context |
CREATE TABLE farm_competition (
Competition_ID int,
Year int,
Theme text,
Host_city_ID int,
Hosts text
)
CREATE TABLE competition_record (
Competition_ID int,
Farm_ID int,
Rank int
)
CREATE TABLE farm (
Farm_ID int,
Year int,
Total_Horses real,
Working_Horses real,
... | SELECT Status, AVG(Population) FROM city GROUP BY Status | nvbench |
CREATE TABLE table_17693171_1 (
laps INTEGER,
time_retired VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If the time/retired is +1 lap, what is the amount of maximum laps?
| SELECT MAX(laps) FROM table_17693171_1 WHERE time_retired = "+1 lap" | sql_create_context |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperio... | SELECT (SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'ards' AND DATETIME(diagnosis.diagnosistime) <= DATETIME(CURRENT_TIME(), '-3 year')) AS t1) - (SELECT... | eicu |
CREATE TABLE table_38880 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Location" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the score at game 31?
| SELECT "Score" FROM table_38880 WHERE "Game" = '31' | wikisql |
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 MAX(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 = '015-16479')) AND intakeoutput.celllabel = 'outpu... | eicu |
CREATE TABLE table_train_82 (
"id" int,
"mini_mental_state_examination_mmse" int,
"systolic_blood_pressure_sbp" int,
"diastolic_blood_pressure_dbp" int,
"body_mass_index_bmi" float,
"hypertension" bool,
"age" float,
"NOUSE" float
)
-- Using valid SQLite, answer the following questions ... | SELECT * FROM table_train_82 WHERE mini_mental_state_examination_mmse < 27 | criteria2sql |
CREATE TABLE Course_Authors_and_Tutors (
author_id INTEGER,
author_tutor_ATB VARCHAR(3),
login_name VARCHAR(40),
password VARCHAR(40),
personal_name VARCHAR(80),
middle_name VARCHAR(80),
family_name VARCHAR(80),
gender_mf VARCHAR(1),
address_line_1 VARCHAR(80)
)
CREATE TABLE Student... | SELECT date_of_completion, COUNT(date_of_completion) FROM Student_Course_Enrolment GROUP BY date_of_completion | nvbench |
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
... | SELECT Id AS "comment_link", Text FROM Comments WHERE LOWER(Text) LIKE '%i.stack.imgur.com%' LIMIT 100 | sede |
CREATE TABLE table_name_94 (
model VARCHAR,
engine_make_capacity VARCHAR,
gcm__kg__technical_capacity VARCHAR,
gvm__kg__technical_capacity VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Model has a GCM (kg) Technical Capacity of 35000, a GVM (k... | SELECT model FROM table_name_94 WHERE gcm__kg__technical_capacity = "35000" AND gvm__kg__technical_capacity = "16000" AND engine_make_capacity = "cummins interact 6.0-euro iii (turbo intercooler)" | sql_create_context |
CREATE TABLE table_9892 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Location" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average number of games with a record of 20-12?
| SELECT AVG("Game") FROM table_9892 WHERE "Record" = '20-12' | 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 txmzjzjlb.SG, txmzjzjlb.TZ, txmzjzjlb.TW, txmzjzjlb.SSY, txmzjzjlb.SZY, txmzjzjlb.XL, txmzjzjlb.HXPLC, txmzjzjlb.ML FROM txmzjzjlb WHERE txmzjzjlb.JZLSH = '16242595642' UNION SELECT ftxmzjzjlb.SG, ftxmzjzjlb.TZ, ftxmzjzjlb.TW, ftxmzjzjlb.SSY, ftxmzjzjlb.SZY, ftxmzjzjlb.XL, ftxmzjzjlb.HXPLC, ftxmzjzjlb.ML FROM ft... | css |
CREATE TABLE table_33762 (
"Team" text,
"Chassis" text,
"Engine" text,
"Driver(s)" text,
"Sponsor(s)" text,
"Rounds" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What team was Tom Sneva on in rounds 1-9?
| SELECT "Team" FROM table_33762 WHERE "Driver(s)" = 'tom sneva' AND "Rounds" = '1-9' | wikisql |
CREATE TABLE table_17948 (
"Season" text,
"Airdate" text,
"The Mole" text,
"Winner" text,
"Runner-up" text,
"Prize money" text,
"International destination" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what's the mole with airdate being 8 j... | SELECT "The Mole" FROM table_17948 WHERE "Airdate" = '8 January 2009' | wikisql |
CREATE TABLE Customer_Addresses (
customer_id INTEGER,
address_id INTEGER,
date_address_from DATETIME,
address_type VARCHAR(15),
date_address_to DATETIME
)
CREATE TABLE Customer_Contact_Channels (
customer_id INTEGER,
channel_code VARCHAR(15),
active_from_date DATETIME,
active_to_da... | SELECT order_date, COUNT(order_date) FROM Customers AS t1 JOIN Customer_Orders AS t2 ON t1.customer_id = t2.customer_id WHERE order_status = "Delivered" | nvbench |
CREATE TABLE mzb (
CLINIC_ID 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,
INSU_TYPE text,
IN... | SELECT qtb.IN_DIAG_DIS_CD, qtb.IN_DIAG_DIS_NM FROM qtb WHERE qtb.MED_CLINIC_ID = '01456680839' UNION SELECT gyb.IN_DIAG_DIS_CD, gyb.IN_DIAG_DIS_NM FROM gyb WHERE gyb.MED_CLINIC_ID = '01456680839' UNION SELECT zyb.IN_DIAG_DIS_CD, zyb.IN_DIAG_DIS_NM FROM zyb WHERE zyb.MED_CLINIC_ID = '01456680839' UNION SELECT mzb.IN_DIA... | css |
CREATE TABLE table_51380 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest number of Gold the Nation of Italy had when it ranked other than 1, and h... | SELECT MIN("Gold") FROM table_51380 WHERE "Rank" > '1' AND "Nation" = 'italy' AND "Silver" > '0' | wikisql |
CREATE TABLE team (
team_id number,
name text
)
CREATE TABLE country (
country_id number,
country_name text,
capital text,
official_native_language text
)
CREATE TABLE match_season (
season number,
player text,
position text,
country number,
team number,
draft_pick_numb... | SELECT DISTINCT position FROM match_season | spider |
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE patients (... | SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 70645 AND DATETIME(admissions.admittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') ORDER BY admissions.admittime LIMIT 1 | mimic_iii |
CREATE TABLE table_name_31 (
completed VARCHAR,
laid_down VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- when was the ship completed that was laid down on 23 march 1926?
| SELECT completed FROM table_name_31 WHERE laid_down = "23 march 1926" | 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 diagnoses (
... | SELECT MIN(demographic.age) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.diagnosis = "PNEUMONIA;HUMAN IMMUNODEFIENCY VIRUS;RULE OUT TUBERCULOSIS" | mimicsql_data |
CREATE TABLE qtb (
CLINIC_ID 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,
INSU_TYPE text,
IN... | SELECT qtb.IN_DIAG_DIS_CD, qtb.IN_DIAG_DIS_NM FROM qtb WHERE qtb.PERSON_NM = '云乐人' AND qtb.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT > 1367.6) UNION SELECT gyb.IN_DIAG_DIS_CD, gyb.IN_DIAG_DIS_NM FROM gyb WHERE gyb.PERSON_NM = '云乐人' AND gyb.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINI... | css |
CREATE TABLE table_3914 (
"#" real,
"Date" text,
"Opponent" text,
"Site/Stadium" text,
"Score" text,
"Win" text,
"Loss" text,
"Save" text,
"Attendance" real,
"Overall Record" text,
"Pac-10 Record" text
)
-- Using valid SQLite, answer the following questions for the tables p... | SELECT "Pac-10 Record" FROM table_3914 WHERE "Date" = 'April 20' | wikisql |
CREATE TABLE table_1342359_17 (
candidates VARCHAR,
first_elected VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many people were elected in 1929
| SELECT COUNT(candidates) FROM table_1342359_17 WHERE first_elected = 1929 | sql_create_context |
CREATE TABLE table_19903 (
"Series Ep." text,
"Episode" real,
"Netflix" text,
"Segment A" text,
"Segment B" text,
"Segment C" text,
"Segment D" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the netflix episode number where Segment D... | SELECT "Netflix" FROM table_19903 WHERE "Segment D" = 'High-Performance Engines' | wikisql |
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 (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "MARRIED" AND procedures.long_title = "Percutaneous abdominal drainage" | mimicsql_data |
CREATE TABLE table_34914 (
"Country" text,
"Skip" text,
"Third" text,
"Second" text,
"Lead" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which country has a Lead of sarah wazney?
| SELECT "Country" FROM table_34914 WHERE "Lead" = 'sarah wazney' | wikisql |
CREATE TABLE table_42784 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Score of the game with arsenal win 4-2 on penalties in the attendance field?
| SELECT "Score" FROM table_42784 WHERE "Attendance" = 'arsenal win 4-2 on penalties' | wikisql |
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_... | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_i... | mimic_iii |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime... | SELECT microlab.culturetakentime FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-4987' AND NOT patient.hospitaldischargetime IS NULL ORDER BY ... | eicu |
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 gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '苏清华' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC UNION SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID... | css |
CREATE TABLE table_40762 (
"Date" text,
"Tournament" text,
"Surface" text,
"Partnering" text,
"Opponents in the final" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who's the Opponents in the final with a Date of june 10, 1996?
| SELECT "Opponents in the final" FROM table_40762 WHERE "Date" = 'june 10, 1996' | wikisql |
CREATE TABLE department (
dept_name varchar(20),
building varchar(15),
budget numeric(12,2)
)
CREATE TABLE advisor (
s_ID varchar(5),
i_ID varchar(5)
)
CREATE TABLE takes (
ID varchar(5),
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0),
grade... | SELECT building, AVG(capacity) FROM classroom GROUP BY building ORDER BY AVG(capacity) | nvbench |
CREATE TABLE table_79321 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the result of the game that was played on february 27, 2000?
| SELECT "Result" FROM table_79321 WHERE "Date" = 'february 27, 2000' | wikisql |
CREATE TABLE table_name_24 (
played VARCHAR,
ga VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total played games of a 22 G.A.?
| SELECT COUNT(played) FROM table_name_24 WHERE ga = "22" | sql_create_context |
CREATE TABLE VoteTypes (
Id number,
Name text
)
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 ReviewT... | SELECT * FROM PostTypes | sede |
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,
ZZBZ number,
WDBZ number,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
... | SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM mzjzjlb JOIN jybgb JOIN jyjgzbb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE mzjzjlb.JZZDBM = 'J42.599' AND jyjgzbb.JCZBDM = '805062' | css |
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 text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "6" AND prescriptions.drug = "Collagenase Ointment" | mimicsql_data |
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE venue (
venueid int,
venuename varchar
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE paperdataset (
paperid ... | SELECT DISTINCT COUNT(paper.paperid) FROM paper, venue WHERE paper.year = 2015 AND venue.venueid = paper.venueid AND venue.venuename = 'nature communications' | scholar |
CREATE TABLE table_6271 (
"Tournament" text,
"1999" text,
"2000" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"Career Win-Loss" text
)
-- Using valid SQLite, answer the following questions... | SELECT "2002" FROM table_6271 WHERE "2001" = '1–0' AND "2000" = '3–0' | wikisql |
CREATE TABLE table_10618 (
"Entrant" text,
"Constructor" text,
"Chassis" text,
"Engine" text,
"Tyre" text,
"Driver" text,
"Rounds" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In what rounds did the P15 Chassis and tyre D participate?
| SELECT "Rounds" FROM table_10618 WHERE "Tyre" = 'd' AND "Chassis" = 'p15' | wikisql |
CREATE TABLE table_10174 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the driver for 58 laps
| SELECT "Driver" FROM table_10174 WHERE "Laps" = '58' | 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_kc22.AMOUNT) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '36779561' AND t_kc21.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2008-10-12' AND '2010-07-05' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' | css |
CREATE TABLE diagnoses (
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 demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND lab.label = "Basophils" | mimicsql_data |
CREATE TABLE table_name_89 (
constructor VARCHAR,
year VARCHAR,
driver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the constructor of the car that Hermann Lang drove after 1935?
| SELECT constructor FROM table_name_89 WHERE year > 1935 AND driver = "hermann lang" | sql_create_context |
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PendingFlags (
Id nu... | SELECT DISTINCT p.Id AS "ID", p.CreationDate AS "Date", p.Tags AS "Tags" FROM Posts AS p WHERE p.CreationDate BETWEEN '2019-01-01' AND '2019-08-28' AND (p.Tags LIKE '%wordpress%' OR p.Tags LIKE 'yoast%' OR p.Tags LIKE '%woocommerce%' OR p.Tags LIKE 'buddypress%' OR p.Tags LIKE 'bbpress%' OR p.Tags LIKE 'contact-form-7%... | sede |
CREATE TABLE table_18245 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which party is associated with the person who was first elected in 1982?... | SELECT "Party" FROM table_18245 WHERE "First elected" = '1982' | 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 prescriptions (
subject_id text,
hadm_id... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.gender = "F" | mimicsql_data |
CREATE TABLE table_72292 (
"Season" text,
"League" text,
"Rank" real,
"Games" real,
"Points" real,
"GF" real,
"GA" real,
"Manager" text,
"Top Scorer" text,
"Goals" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many seasons h... | SELECT COUNT("Season") FROM table_72292 WHERE "Rank" = '16' | wikisql |
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,... | SELECT b.Text, b.CreationDate FROM Users AS a INNER JOIN Comments AS b ON a.Id = b.UserId WHERE a.DisplayName = 'Mat Mannion' ORDER BY b.CreationDate DESC | sede |
CREATE TABLE diagnoses (
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 demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "NEWBORN" AND demographic.discharge_location = "HOME" | mimicsql_data |
CREATE TABLE table_33685 (
"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.
-- What was the largest crowd for North Melbourne
| SELECT MAX("Crowd") FROM table_33685 WHERE "Home team" = 'north melbourne' | wikisql |
CREATE TABLE table_1341640_11 (
candidates VARCHAR,
first_elected VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many candidates were first elected in 1972?
| SELECT COUNT(candidates) FROM table_1341640_11 WHERE first_elected = 1972 | sql_create_context |
CREATE TABLE table_name_50 (
year_opened VARCHAR,
state VARCHAR,
capacity VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the year opened for North Carolina with a smaller than 21,500 capacity?
| SELECT year_opened FROM table_name_50 WHERE state = "north carolina" AND capacity < 21 OFFSET 500 | sql_create_context |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
... | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 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 ... | mimic_iii |
CREATE TABLE table_name_8 (
writer VARCHAR,
actual_title VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Writer with an Actual Title that is mork & mindy?
| SELECT writer FROM table_name_8 WHERE actual_title = "mork & mindy" | sql_create_context |
CREATE TABLE table_33315 (
"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.
-- What was the average size of the crowd for match... | SELECT AVG("Crowd") FROM table_33315 WHERE "Venue" = 'corio oval' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.