instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
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 text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT * FROM person_info JOIN hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jy... | css |
CREATE TABLE table_66472 (
"Rank:" real,
"State:" text,
"Premier:" text,
"Party:" text,
"Assumed office:" text,
"Left office:" text,
"TOTAL Time in office:" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Premier Sir Charles Cowper (1807-1875... | SELECT "Assumed office:" FROM table_66472 WHERE "Premier:" = 'sir charles cowper (1807-1875) kcmg' AND "Left office:" = '2 october 1856' | wikisql |
CREATE TABLE table_24537 (
"No. in total" text,
"No. in series" text,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the original airdate of 'A Nice Little Earner'... | SELECT "Original air date" FROM table_24537 WHERE "Title" = 'A Nice Little Earner' | wikisql |
CREATE TABLE table_name_39 (
player VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What player scored 70-73-69-72=284?
| SELECT player FROM table_name_39 WHERE score = 70 - 73 - 69 - 72 = 284 | sql_create_context |
CREATE TABLE table_name_54 (
player VARCHAR,
round INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which player has fewer than 2 rounds?
| SELECT player FROM table_name_54 WHERE round < 2 | sql_create_context |
CREATE TABLE table_47086 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Can you tell me the Date thay has the Reocrd of 9-10-2?
| SELECT "Date" FROM table_47086 WHERE "Record" = '9-10-2' | wikisql |
CREATE TABLE table_7324 (
"Year" real,
"Number" real,
"Team" text,
"Co-driver" text,
"Position" text,
"Laps" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Can you tell me the Co-driver that has the Year smaller than 2012, and the Laps smaller t... | SELECT "Co-driver" FROM table_7324 WHERE "Year" < '2012' AND "Laps" < '161' AND "Position" = 'dnf' AND "Number" = '33' | wikisql |
CREATE TABLE table_65947 (
"Position" text,
"Gymnast" text,
"A Score" real,
"B Score" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest A Score when the B Score is 9.15, and total is 16.05?
| SELECT MIN("A Score") FROM table_65947 WHERE "B Score" = '9.15' AND "Total" = '16.05' | wikisql |
CREATE TABLE member_of_club (
clubid VARCHAR,
stuid VARCHAR
)
CREATE TABLE club (
clubid VARCHAR
)
CREATE TABLE student (
stuid VARCHAR,
fname VARCHAR,
lname VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the number of clubs where 'Tra... | SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = "Tracy" AND t3.lname = "Kim" | sql_create_context |
CREATE TABLE table_204_994 (
id number,
"date" text,
"time" text,
"opponent#" text,
"rank#" text,
"site" text,
"tv" text,
"result" text,
"attendance" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which game at home had the most at... | SELECT "opponent#" FROM table_204_994 WHERE "opponent#" = 'home' ORDER BY "attendance" DESC LIMIT 1 | squall |
CREATE TABLE table_name_47 (
class VARCHAR,
wins VARCHAR,
points VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which class corresponds to more than 2 points, wins greater than 0, and a year earlier than 1973?
| SELECT class FROM table_name_47 WHERE points > 2 AND year < 1973 AND wins > 0 | sql_create_context |
CREATE TABLE table_19637 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text,
"Game Site" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the opponent in week 4?
| SELECT "Opponent" FROM table_19637 WHERE "Week" = '4' | wikisql |
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | SELECT HIRE_DATE, MANAGER_ID FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 | nvbench |
CREATE TABLE table_name_72 (
date VARCHAR,
region VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the release Date for the Region in New Zealand ?
| SELECT date FROM table_name_72 WHERE region = "new zealand" | sql_create_context |
CREATE TABLE table_44951 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Ground" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Ground, when Home Team Score is 12.14 (... | SELECT "Ground" FROM table_44951 WHERE "Home team score" = '12.14 (86)' | wikisql |
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,
KSMC text,
SQRGH text,
SQRXM text,
BGRGH text,
BGRXM text,
SHRGH ... | (SELECT mzjzjlb.YLJGDM 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 = '卫奇胜') UNION (SELECT zyjzjlb.YLJGDM FROM person_info JOIN hz_info JOIN zyjzjlb ON person_info.RYBH = h... | css |
CREATE TABLE table_name_76 (
draw VARCHAR,
match VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Draw for match 10, and the team was skra warszawa?
| SELECT draw FROM table_name_76 WHERE match = "10" AND team = "skra warszawa" | sql_create_context |
CREATE TABLE table_32502 (
"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 crowd size in the match South Melbo... | SELECT "Crowd" FROM table_32502 WHERE "Home team" = 'south melbourne' | wikisql |
CREATE TABLE table_28147 (
"Total #" real,
"Series #" real,
"Title" text,
"Director" text,
"Writer(s)" text,
"Original airdate" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the director of 'new girls'?
| SELECT "Director" FROM table_28147 WHERE "Title" = 'New Girls' | wikisql |
CREATE TABLE table_38942 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average week that there was a game with less than 18,517 fans attending and occurred on Nove... | SELECT AVG("Week") FROM table_38942 WHERE "Attendance" < '18,517' AND "Date" = 'november 21, 1954' | wikisql |
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 prescriptions... | SELECT AVG(demographic.age) FROM demographic WHERE demographic.admission_type = "URGENT" AND demographic.insurance = "Medicaid" | mimicsql_data |
CREATE TABLE table_49932 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" real,
"To par" text,
"Finish" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the To par of the player with a t14 Finish?
| SELECT "To par" FROM table_49932 WHERE "Finish" = 't14' | wikisql |
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 d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE procedures_icd (
... | SELECT transfers.wardid FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 73913) AND NOT transfers.wardid IS NULL AND DATETIME(transfers.intime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') ORDER BY transfers.intime LIMIT 1 | mimic_iii |
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 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 = '028-47306' AND NOT patient.hospitaldischargetime IS NULL ORDER BY... | eicu |
CREATE TABLE table_17625749_3 (
won VARCHAR,
lost VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many were won when 5 were lost?
| SELECT won FROM table_17625749_3 WHERE lost = "5" | sql_create_context |
CREATE TABLE table_3108 (
"No. in series" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What episode number in the series originally aired on... | SELECT MIN("No. in series") FROM table_3108 WHERE "Original air date" = 'February 28, 1992' | wikisql |
CREATE TABLE table_50811 (
"Edition" text,
"Round" text,
"Date" text,
"Against" text,
"Surface" text,
"Opponent" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the surface when the opponent is selma babic?
| SELECT "Surface" FROM table_50811 WHERE "Opponent" = 'selma babic' | wikisql |
CREATE TABLE table_48824 (
"Year" real,
"Team" text,
"Co-Drivers" text,
"Class" text,
"Laps" real,
"Pos." text,
"Class Pos." text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- For a year that is later than 2002 what is the class position?
| SELECT "Class Pos." FROM table_48824 WHERE "Year" > '2002' | wikisql |
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
... | SELECT t1.drug FROM (SELECT prescriptions.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age BETWEEN 30 AND 39) AND STRFTIME('%y', prescriptions.startdate) <= '2100' GROUP BY prescriptions.drug) AS t1 W... | mimic_iii |
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2107" AND procedures.short_title = "Annuloplasty" | mimicsql_data |
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
... | SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'interruption vena cava') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 64881) AND D... | mimic_iii |
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instruc... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (semester.semester = ... | advising |
CREATE TABLE table_40094 (
"Player" text,
"Nationality" text,
"Position" text,
"Years in Orlando" text,
"School/Club Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Years in Orlando has a School/Club Team of kentucky?
| SELECT "Years in Orlando" FROM table_40094 WHERE "School/Club Team" = 'kentucky' | wikisql |
CREATE TABLE table_45377 (
"Channel" text,
"Play-by-play" text,
"Color commentator(s)" text,
"Studio host" text,
"Studio analysts" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the play by play commentator for the game that has Alan Massenga... | SELECT "Play-by-play" FROM table_45377 WHERE "Studio host" = 'alan massengale' | wikisql |
CREATE TABLE t_kc24 (
MED_SAFE_PAY_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
REF_SLT_FLG number,
CLINIC_SLT_DATE time,
COMP_ID text,
PERSON_ID text,
FLX_MED_ORG_ID text,
INSU_TYPE text,
MED_AMOUT number,
PER_ACC_PAY number,
OVE_PAY numb... | SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_NM = '葛芳苓' AND NOT MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc22 WHERE AMOUNT >= 212.49) | css |
CREATE TABLE company (
Company_ID int,
Rank int,
Company text,
Headquarters text,
Main_Industry text,
Sales_billion real,
Profits_billion real,
Assets_billion real,
Market_Value real
)
CREATE TABLE station_company (
Station_ID int,
Company_ID int,
Rank_of_the_Year int
)
... | SELECT Main_Industry, COUNT(Main_Industry) FROM company WHERE NOT Company_ID IN (SELECT Company_ID FROM station_company) GROUP BY Main_Industry | nvbench |
CREATE TABLE table_name_46 (
date VARCHAR,
opponents VARCHAR,
h___a VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which date has roma as opponent and a H/A of A?
| SELECT date FROM table_name_46 WHERE opponents = "roma" AND h___a = "a" | sql_create_context |
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 text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jyb... | css |
CREATE TABLE school_details (
school_id number,
nickname text,
colors text,
league text,
class text,
division text
)
CREATE TABLE school (
school_id number,
school text,
location text,
enrollment number,
founded number,
denomination text,
boys_or_girls text,
day_... | SELECT team FROM player ORDER BY team | spider |
CREATE TABLE table_20780285_1 (
country_region VARCHAR,
presenters VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Silvio Santos is the presenter in what country?
| SELECT country_region FROM table_20780285_1 WHERE presenters = "Silvio Santos" | sql_create_context |
CREATE TABLE table_1137142_1 (
group_a_winner VARCHAR,
group_d_winner VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What group a winner was for nocerina?
| SELECT group_a_winner FROM table_1137142_1 WHERE group_d_winner = "Nocerina" | sql_create_context |
CREATE TABLE table_53771 (
"Group name" text,
"English abbr." text,
"French abbr." text,
"Formal European Parliament name" text,
"From" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the date for the group union for Europe?
| SELECT "From" FROM table_53771 WHERE "Group name" = 'group union for europe' | wikisql |
CREATE TABLE table_76291 (
"Position" real,
"Played" real,
"Points" real,
"Wins" real,
"Draws" real,
"Losses" real,
"Goals for" real,
"Goals against" real,
"Goal Difference" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Can you tell... | SELECT COUNT("Wins") FROM table_76291 WHERE "Draws" > '0' AND "Points" = '11' | wikisql |
CREATE TABLE Apartment_Facilities (
apt_id INTEGER,
facility_code CHAR(15)
)
CREATE TABLE Apartments (
apt_id INTEGER,
building_id INTEGER,
apt_type_code CHAR(15),
apt_number CHAR(10),
bathroom_count INTEGER,
bedroom_count INTEGER,
room_count CHAR(5)
)
CREATE TABLE Apartment_Buildi... | SELECT booking_status_code, COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code ORDER BY booking_status_code | nvbench |
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, AVG(T1.Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name | nvbench |
CREATE TABLE table_name_52 (
ships_in_class VARCHAR,
class VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the ships in classs for kuha class
| SELECT ships_in_class FROM table_name_52 WHERE class = "kuha class" | sql_create_context |
CREATE TABLE table_70064 (
"Value" text,
"Khmer" real,
"Word Form" text,
"UNGEGN" text,
"ALA-LC" text,
"Other" text,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What number value has the Other transliteration of muoy roy?
| SELECT "Value" FROM table_70064 WHERE "Other" = 'muoy roy' | wikisql |
CREATE TABLE table_name_51 (
engine VARCHAR,
points VARCHAR,
chassis VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which engine scored 6 points and used the march 88c chassis?
| SELECT engine FROM table_name_51 WHERE points = 6 AND chassis = "march 88c" | sql_create_context |
CREATE TABLE table_name_92 (
podium INTEGER,
pole INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Pole smaller than 0 had what lowest podium?
| SELECT MIN(podium) FROM table_name_92 WHERE pole < 0 | 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 medication (
medi... | 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-28600' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient... | eicu |
CREATE TABLE table_name_1 (
winner VARCHAR,
winning_song VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who won with the song kemenangan cinta?
| SELECT winner FROM table_name_1 WHERE winning_song = "kemenangan cinta" | sql_create_context |
CREATE TABLE table_69912 (
"Region" text,
"Date" text,
"Label" text,
"Format" text,
"Catalog" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What catalog has the CD format?
| SELECT "Catalog" FROM table_69912 WHERE "Format" = 'cd' | wikisql |
CREATE TABLE table_16886076_1 (
para VARCHAR,
commewijne VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the para for 1.5% commewijne
| SELECT para FROM table_16886076_1 WHERE commewijne = "1.5%" | sql_create_context |
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 text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT mzjzjlb.YLJGDM FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.RYBH = '65424109' UNION SELECT wdmzjzjlb.YLJGDM FROM hz_info JOIN wdmzjzjlb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmz... | css |
CREATE TABLE table_name_57 (
week VARCHAR,
game_site VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which week has giants stadium as the game site?
| SELECT week FROM table_name_57 WHERE game_site = "giants stadium" | sql_create_context |
CREATE TABLE table_72497 (
"Outcome" text,
"Year" text,
"Location" text,
"Surface" text,
"Partner" text,
"Opponents" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the outcome for the match in 1989?
| SELECT "Outcome" FROM table_72497 WHERE "Year" = '1989' | wikisql |
CREATE TABLE table_name_42 (
site INTEGER,
sex_and_other_data VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Site that has a Sex and other data of old male?
| SELECT MAX(site) FROM table_name_42 WHERE sex_and_other_data = "old male" | sql_create_context |
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE admissions (
row_id numbe... | SELECT MAX(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT procedures_icd.hadm_id FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'endosc remove bile stone')) AND STRFTIME('%y', cost.charg... | mimic_iii |
CREATE TABLE table_204_415 (
id number,
"season" text,
"tier" number,
"division" text,
"place" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- in 1997/98 season was the place at least 15th ?
| SELECT (SELECT "place" FROM table_204_415 WHERE "season" = '1997/98') <= 15 | squall |
CREATE TABLE table_2622 (
"Name" text,
"#" real,
"Position" text,
"Height" text,
"Weight" real,
"Year" text,
"Home Town" text,
"High School" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where is the position when houston, tx is the hom... | SELECT "Position" FROM table_2622 WHERE "Home Town" = 'Houston, TX' AND "High School" = 'Worthing' | wikisql |
CREATE TABLE table_name_27 (
rounds VARCHAR,
driver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many rounds did fr d ric vervisch go?
| SELECT rounds FROM table_name_27 WHERE driver = "frédéric vervisch" | sql_create_context |
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 text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT zyjzjlb.JZLSH FROM person_info JOIN hz_info JOIN zyjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE person_info.XM = '花正阳' AND NOT zyjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ >= '2018-09-29') | css |
CREATE TABLE table_761 (
"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.
-- What district is incumbent melvin price from?
| SELECT "District" FROM table_761 WHERE "Incumbent" = 'Melvin Price' | wikisql |
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE T... | SELECT DISTINCT flight.flight_id FROM airport_service, city, flight WHERE city.city_code = airport_service.city_code AND city.city_name = 'DALLAS' AND flight.from_airport = airport_service.airport_code | atis |
CREATE TABLE table_name_22 (
arkansas VARCHAR,
alabama VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the Arkansas player associated with Ken Stabler?
| SELECT arkansas FROM table_name_22 WHERE alabama = "ken stabler" | sql_create_context |
CREATE TABLE table_4153 (
"Pick #" real,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What draft pick is a goaltender?
| SELECT "Pick #" FROM table_4153 WHERE "Position" = 'Goaltender' | 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 demographic.gender, demographic.days_stay FROM demographic WHERE demographic.subject_id = "2560" | mimicsql_data |
CREATE TABLE table_name_94 (
live_births_2006 INTEGER,
whites_as__percentage_of_pop VARCHAR,
tfr_2006 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of live births in 2006 with 98.40% of the population as Whites and has more than... | SELECT SUM(live_births_2006) FROM table_name_94 WHERE whites_as__percentage_of_pop = "98.40%" AND tfr_2006 > 2 | sql_create_context |
CREATE TABLE table_name_99 (
market_value__billion_ INTEGER,
rank VARCHAR,
sales__billion_$_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest Market Value (billion $), when Rank is 02 2, and when Sales (billion $) is greater than 113.1?... | SELECT MAX(market_value__billion_) AS $_ FROM table_name_99 WHERE rank = "02 2" AND sales__billion_$_ > 113.1 | sql_create_context |
CREATE TABLE table_26775 (
"Conference" text,
"Regular Season Winner" text,
"Conference Player of the Year" text,
"Conference Tournament" text,
"Tournament Venue (City)" text,
"Tournament Winner" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Li... | SELECT "Conference Player of the Year" FROM table_26775 WHERE "Tournament Venue (City)" = 'Matadome ( Northridge, California )' | wikisql |
CREATE TABLE table_20075 (
"Genus/Species" text,
"Common Name" text,
"Accession Number" text,
"Length" text,
"Similarity" text,
"Identity" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- For the genus/species arabidopsis thaliana, what are the le... | SELECT "Length" FROM table_20075 WHERE "Genus/Species" = 'Arabidopsis thaliana' | wikisql |
CREATE TABLE table_name_43 (
score VARCHAR,
visitor VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score when the spurs were the visitors?
| SELECT score FROM table_name_43 WHERE visitor = "spurs" | sql_create_context |
CREATE TABLE person_info (
RYBH text,
XBDM number,
XBMC text,
XM text,
CSRQ time,
CSD text,
MZDM text,
MZMC text,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
XLDM text,
XLMC text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE zyjzjlb (
YLJGDM text,
JZLSH ... | SELECT RYTJDM, RYTJMC FROM zyjzjlb WHERE JZLSH = '53408787768' | css |
CREATE TABLE table_4859 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score of the Browns game against the San Francisco 49ers?
| SELECT "Result" FROM table_4859 WHERE "Opponent" = 'san francisco 49ers' | wikisql |
CREATE TABLE table_62611 (
"Player" text,
"Country" text,
"Year won" real,
"Total" real,
"To par" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sum of the total of player rich beem, who has a to par greater than 17?
| SELECT SUM("Total") FROM table_62611 WHERE "Player" = 'rich beem' AND "To par" > '17' | wikisql |
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 IN_DIAG_DIS_CD, IN_DIAG_DIS_NM FROM t_kc21 WHERE PERSON_ID = '06397639' AND MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc24 WHERE MED_AMOUT >= 6289.51) | css |
CREATE TABLE table_25692955_1 (
route_number VARCHAR,
south_west_terminal VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the route number for rincon valley
| SELECT route_number FROM table_25692955_1 WHERE south_west_terminal = "Rincon Valley" | sql_create_context |
CREATE TABLE table_name_96 (
date VARCHAR,
week VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the date of the week 13 game?
| SELECT date FROM table_name_96 WHERE week = 13 | sql_create_context |
CREATE TABLE table_21326205_2 (
length VARCHAR,
time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many stages of the rally took 14:33.9 for the leader to finish?
| SELECT COUNT(length) FROM table_21326205_2 WHERE time = "14:33.9" | sql_create_context |
CREATE TABLE table_name_83 (
number_of_states VARCHAR,
population__2009_estimate_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many states has a 2009 estimate population of 27,3 million?
| SELECT number_of_states FROM table_name_83 WHERE population__2009_estimate_ = "27,3 million" | sql_create_context |
CREATE TABLE table_14345690_5 (
celebrity VARCHAR,
finished VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the celebrity where the finished is 5th?
| SELECT celebrity FROM table_14345690_5 WHERE finished = "5th" | 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 gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_ID = '35376610' AND NOT gwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT >= 3078.5) UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '35376610' AND NOT fgwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLI... | css |
CREATE TABLE table_22504 (
"Position" real,
"Team" text,
"Played" real,
"Wins" real,
"Draws" real,
"Losses" real,
"Scored" real,
"Conceded" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the least played
| SELECT MIN("Played") FROM table_22504 | 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.JZKSBM, txmzjzjlb.JZKSMC FROM txmzjzjlb WHERE txmzjzjlb.JZLSH = '00146277879' UNION SELECT ftxmzjzjlb.JZKSBM, ftxmzjzjlb.JZKSMC FROM ftxmzjzjlb WHERE ftxmzjzjlb.JZLSH = '00146277879' | css |
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.OUT_DIAG_DOC_CD, qtb.OUT_DIAG_DOC_NM FROM qtb WHERE qtb.PERSON_ID = '68080036' AND qtb.IN_HOSP_DATE BETWEEN '2007-06-03' AND '2016-05-26' GROUP BY qtb.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC LIMIT 1 UNION SELECT gyb.OUT_DIAG_DOC_CD, gyb.OUT_DIAG_DOC_NM FROM gyb WHERE gyb.PERSON_ID = '68080036' AND gyb.IN_HOSP... | css |
CREATE TABLE table_72966 (
"Round" real,
"Circuit" text,
"Date" text,
"Pole Position" text,
"Fastest Lap" text,
"Winning Driver" text,
"Winning Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What round was circuit Avus?
| SELECT MAX("Round") FROM table_72966 WHERE "Circuit" = 'AVUS' | wikisql |
CREATE TABLE table_34588 (
"Game" real,
"November" real,
"Opponent" text,
"Score" text,
"Record" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many points was before game 14?
| SELECT SUM("Points") FROM table_34588 WHERE "Game" < '14' | wikisql |
CREATE TABLE table_51115 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the location of the match with chad armstro... | SELECT "Location" FROM table_51115 WHERE "Opponent" = 'chad armstrong' | wikisql |
CREATE TABLE club (
Club_ID int,
Club_name text,
Region text,
Start_year int
)
CREATE TABLE coach (
Coach_ID int,
Coach_name text,
Gender text,
Club_ID int,
Rank int
)
CREATE TABLE player_coach (
Player_ID int,
Coach_ID int,
Starting_year int
)
CREATE TABLE player (
... | SELECT Gender, COUNT(Gender) FROM player GROUP BY Gender ORDER BY Gender | nvbench |
CREATE TABLE table_name_1 (
city VARCHAR,
host VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which city is the host of the University of Texas?
| SELECT city FROM table_name_1 WHERE host = "university of texas" | sql_create_context |
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
... | SELECT MIN(chartevents.valuenum) FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 28443)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'temp... | mimic_iii |
CREATE TABLE table_name_30 (
team VARCHAR,
birthplace VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Team for the player born in northfield, minnesota?
| SELECT team FROM table_name_30 WHERE birthplace = "northfield, minnesota" | sql_create_context |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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 te... | SELECT COUNT(*) FROM (SELECT jybgb.KSBM FROM mzjzjlb JOIN jybgb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE mzjzjlb.YLJGDM = '9831232' AND jybgb.BGRQ BETWEEN '2012-08-01' AND '2019-02-12' GROUP BY jybgb.KSBM HAVING COUNT(*) < 6) AS T | css |
CREATE TABLE table_name_90 (
format VARCHAR,
country VARCHAR,
catalog VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the format for UK catalog S 63795?
| SELECT format FROM table_name_90 WHERE country = "uk" AND catalog = "s 63795" | sql_create_context |
CREATE TABLE table_name_54 (
Id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the 1881 with 1961 in 1851?
| SELECT 1881 FROM table_name_54 WHERE 1851 = "1961" | sql_create_context |
CREATE TABLE table_9743 (
"Tournament" text,
"1985" text,
"1986" text,
"1987" text,
"1988" text,
"1989" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text,
"1997" text,
"1998" text,
"1999" text,
"2010" text,... | SELECT "1990" FROM table_9743 WHERE "1989" = 'a' AND "1985" = 'a' AND "1993" = 'a' | wikisql |
CREATE TABLE table_45475 (
"Model Number" text,
"Frequency" text,
"L2 Cache" text,
"Mult" text,
"Voltage" text,
"Socket" text,
"Release Date" text,
"Part Number(s)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What kind of socket is on... | SELECT "Socket" FROM table_45475 WHERE "Part Number(s)" = '80526pz533256' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE txmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
K... | SELECT jybgb.KSBM, jybgb.KSMC FROM person_info JOIN hz_info JOIN txmzjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_... | css |
CREATE TABLE table_name_66 (
week INTEGER,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Week of the game against the Minnesota Vikings?
| SELECT MIN(week) FROM table_name_66 WHERE opponent = "minnesota vikings" | sql_create_context |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT demographic.gender, demographic.diagnosis FROM demographic WHERE demographic.subject_id = "2560" | mimicsql_data |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.