instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_86 (
to_par VARCHAR,
year_s__won VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many to pars were won in 1993?
| SELECT COUNT(to_par) FROM table_name_86 WHERE year_s__won = "1993" | sql_create_context |
CREATE TABLE table_name_75 (
score VARCHAR,
opponent VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Score has an Opponent of @ rockies, and a Record of 33-35?
| SELECT score FROM table_name_75 WHERE opponent = "@ rockies" AND record = "33-35" | sql_create_context |
CREATE TABLE table_21857 (
"Episode" real,
"Original title" text,
"Directed by" text,
"Written by" text,
"Original airdate" text,
"Duration" text,
"Viewership" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the movies that are writt... | SELECT "Directed by" FROM table_21857 WHERE "Written by" = 'John Sullivan' AND "Original airdate" = '15January2009' | wikisql |
CREATE TABLE table_14691 (
"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 year had the largest number of laps over 196?
| SELECT "Year" FROM table_14691 WHERE "Laps" > '196' | 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 prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | SELECT demographic.age, demographic.religion FROM demographic WHERE demographic.name = "Jerry Deberry" | mimicsql_data |
CREATE TABLE table_262560_2 (
location VARCHAR,
enrollment VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What location has a school with enrollment of 850?
| SELECT location FROM table_262560_2 WHERE enrollment = 850 | sql_create_context |
CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
)
CREATE TABLE gradeconversion (
lettergrade text,
gradepoint number
)
CREATE TABLE department (
dno number,
division text,
dname text,
... | SELECT T2.fname, T2.lname FROM course AS T1 JOIN faculty AS T2 ON T1.instructor = T2.facid WHERE T1.cname = "COMPUTER LITERACY" | spider |
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE procedures.icd9_code = "4601" AND prescriptions.route = "IV BOLUS" | mimicsql_data |
CREATE TABLE table_27132791_3 (
position VARCHAR,
college VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If the college is Vanderbilt, what is the position?
| SELECT position FROM table_27132791_3 WHERE college = "Vanderbilt" | sql_create_context |
CREATE TABLE table_17384 (
"Year" real,
"Mens singles" text,
"Womens singles" text,
"Mens doubles" text,
"Womens doubles" text,
"Mixed doubles" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who won the mixed doubles when ji xinpeng won the mens... | SELECT "Mixed doubles" FROM table_17384 WHERE "Mens singles" = 'Ji Xinpeng' | wikisql |
CREATE TABLE table_18939 (
"Club" text,
"Played" text,
"Won" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text,
"Losing bonus" text,
"Points" text
)
-- Using valid SQLite, answer the follo... | SELECT "Drawn" FROM table_18939 WHERE "Club" = 'Llandaff RFC' | wikisql |
CREATE TABLE table_17201 (
"Round" real,
"Overall" real,
"Player" text,
"Position" text,
"Nationality" text,
"Club team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHAT POSITION DOES PATRICK WIERCIOCH PLAY?
| SELECT "Position" FROM table_17201 WHERE "Player" = 'Patrick Wiercioch' | wikisql |
CREATE TABLE table_name_3 (
vote_to_save VARCHAR,
eviction_no VARCHAR,
vote_to_evict VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Vote to Save has an Eviction # smaller than 14, and a Vote to Evict of 5.42%?
| SELECT vote_to_save FROM table_name_3 WHERE eviction_no < 14 AND vote_to_evict = "5.42%" | sql_create_context |
CREATE TABLE table_48260 (
"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 Tournament did Silva Partner with Nicole Thijssen with Opponent ... | SELECT "Tournament" FROM table_48260 WHERE "Partner" = 'nicole thijssen' AND "Opponent in the final" = 'nina bratchikova & frederica piedade' | wikisql |
CREATE TABLE Orders (
order_id INTEGER,
customer_id INTEGER,
date_order_placed DATETIME,
order_details VARCHAR(255)
)
CREATE TABLE Customers (
customer_id INTEGER,
customer_first_name VARCHAR(50),
customer_middle_initial VARCHAR(1),
customer_last_name VARCHAR(50),
gender VARCHAR(1),... | SELECT COUNT(*), customer_id FROM Accounts GROUP BY customer_id | nvbench |
CREATE TABLE table_39202 (
"Week" text,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the date with record of 3-1
| SELECT "Date" FROM table_39202 WHERE "Record" = '3-1' | wikisql |
CREATE TABLE table_55850 (
"Presidency" real,
"President" text,
"Date of Birth" text,
"Took office" real,
"Left office" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the greatest Took Office dates that Left Office in 1998?
| SELECT MAX("Took office") FROM table_55850 WHERE "Left office" = '1998' | 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 * FROM jybgb WHERE jybgb.JZLSH = '86486560437' | css |
CREATE TABLE table_name_45 (
total INTEGER,
nation VARCHAR,
bronze VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total where the nation is South Africa (rsa) and bronze is less than 1?
| SELECT SUM(total) FROM table_name_45 WHERE nation = "south africa (rsa)" AND bronze < 1 | sql_create_context |
CREATE TABLE table_28744929_1 (
acc_football_titles VARCHAR,
nickname VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many acc football titles have been won by the institution nicknamed tar heels?
| SELECT acc_football_titles FROM table_28744929_1 WHERE nickname = "Tar Heels" | sql_create_context |
CREATE TABLE table_79858 (
"Game" real,
"Date" text,
"Location" text,
"Time" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Location of ebbets field, and a Time of 2:56, and a Game larger than 6 has what sum of attendance?
| SELECT SUM("Attendance") FROM table_79858 WHERE "Location" = 'ebbets field' AND "Time" = '2:56' AND "Game" > '6' | wikisql |
CREATE TABLE table_41465 (
"Player" text,
"Att." real,
"Yards" real,
"Avg." real,
"Long" real,
"FumL" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the lowest long with 26 yards?
| SELECT MIN("Long") FROM table_41465 WHERE "Yards" = '26' | wikisql |
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | SELECT t1.labname FROM (SELECT lab.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 30 AND 39) GROUP BY lab.labname) AS t1 WHERE t1.c1 <= 3 | eicu |
CREATE TABLE table_21321804_3 (
player VARCHAR,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many players are at the DT position?
| SELECT COUNT(player) FROM table_21321804_3 WHERE position = "DT" | sql_create_context |
CREATE TABLE Student_Course_Enrolment (
registration_id INTEGER,
student_id INTEGER,
course_id INTEGER,
date_of_enrolment DATETIME,
date_of_completion DATETIME
)
CREATE TABLE Subjects (
subject_id INTEGER,
subject_name VARCHAR(120)
)
CREATE TABLE Course_Authors_and_Tutors (
author_id I... | SELECT date_of_enrolment, COUNT(date_of_enrolment) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Pass" ORDER BY COUNT(date_of_enrolment) DESC | nvbench |
CREATE TABLE Engineer_Visits (
engineer_visit_id INTEGER,
contact_staff_id INTEGER,
engineer_id INTEGER,
fault_log_entry_id INTEGER,
fault_status VARCHAR(10),
visit_start_datetime DATETIME,
visit_end_datetime DATETIME,
other_visit_details VARCHAR(255)
)
CREATE TABLE Part_Faults (
pa... | SELECT first_name, COUNT(first_name) FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id = T2.contact_staff_id JOIN Maintenance_Engineers AS T3 ON T2.engineer_id = T3.engineer_id GROUP BY first_name ORDER BY COUNT(first_name) DESC | nvbench |
CREATE TABLE table_name_50 (
position VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHich Position has a Player of david laliberte?
| SELECT position FROM table_name_50 WHERE player = "david laliberte" | sql_create_context |
CREATE TABLE table_59472 (
"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.
-- When the home team was Woking, what was the tie no?
| SELECT "Tie no" FROM table_59472 WHERE "Home team" = 'woking' | wikisql |
CREATE TABLE jyjgzbb (
JYZBLSH text,
YLJGDM text,
BGDH text,
BGRQ time,
JYRQ time,
JCRGH text,
JCRXM text,
SHRGH text,
SHRXM text,
JCXMMC text,
JCZBDM text,
JCFF text,
JCZBMC text,
JCZBJGDX text,
JCZBJGDL number,
JCZBJGDW text,
SBBM text,
YQBH text... | SELECT JCRGH, JCRXM FROM jyjgzbb WHERE JYZBLSH = '31342222258' | css |
CREATE TABLE table_name_85 (
year_born__age_ VARCHAR,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Age of f/c Posiiton?
| SELECT year_born__age_ FROM table_name_85 WHERE position = "f/c" | sql_create_context |
CREATE TABLE table_23063 (
"Draw" real,
"Artist" text,
"Original" text,
"English Meaning" text,
"Language" text,
"Authors" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many authors are present when the original was Carry On?
| SELECT COUNT("Authors") FROM table_23063 WHERE "Original" = 'Carry On' | wikisql |
CREATE TABLE table_21661 (
"Club" text,
"Played" text,
"Won" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text,
"Losing bonus" text,
"Points" text
)
-- Using valid SQLite, answer the follo... | SELECT "Won" FROM table_21661 WHERE "Points" = '49' | wikisql |
CREATE TABLE table_name_72 (
district INTEGER,
took_office VARCHAR,
party VARCHAR,
senator VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the district where Steve Carriker is the Democratic Senator and he took office later than 1988?
| SELECT MAX(district) FROM table_name_72 WHERE party = "democratic" AND senator = "steve carriker" AND took_office > 1988 | sql_create_context |
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varc... | SELECT HIRE_DATE, COMMISSION_PCT FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 | nvbench |
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 jybgb.BBCJBW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '水嘉瑞' AND jy... | css |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT 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 = "Angioneurotic edema" AND lab.flag = "abnormal" | mimicsql_data |
CREATE TABLE table_name_24 (
top_10 VARCHAR,
events VARCHAR,
cuts_made VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- For events with under 3 times played and fewer than 1 cut made, what is the total number of top-10 finishes?
| SELECT COUNT(top_10) FROM table_name_24 WHERE events < 3 AND cuts_made < 1 | sql_create_context |
CREATE TABLE table_name_44 (
asian_or_amerindian___percentage_ INTEGER,
state VARCHAR,
brown___percentage_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sum of Asian or Amerindian (%), when State is Sergipe, and when Brown (%) is greater tha... | SELECT SUM(asian_or_amerindian___percentage_) FROM table_name_44 WHERE state = "sergipe" AND brown___percentage_ > 61 OFFSET 3 | sql_create_context |
CREATE TABLE table_47740 (
"Position" real,
"Club" text,
"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.... | SELECT AVG("Position") FROM table_47740 WHERE "Wins" < '14' AND "Draws" < '3' | wikisql |
CREATE TABLE table_name_57 (
lane INTEGER,
nationality VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average Lane where Belarus is the nationality?
| SELECT AVG(lane) FROM table_name_57 WHERE nationality = "belarus" | sql_create_context |
CREATE TABLE table_26591309_2 (
first_broadcast_uk___bbc_four__ VARCHAR,
episode VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was the first UK broadcast for episode 9?
| SELECT first_broadcast_uk___bbc_four__ FROM table_26591309_2 WHERE episode = 9 | sql_create_context |
CREATE TABLE table_24222929_4 (
rank_on_channel VARCHAR,
title VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the rank on channel for pilot
| SELECT rank_on_channel FROM table_24222929_4 WHERE title = "Pilot" | sql_create_context |
CREATE TABLE table_name_43 (
artist VARCHAR,
issue_date_s_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the artist that issued the single on 23 February?
| SELECT artist FROM table_name_43 WHERE issue_date_s_ = "23 february" | sql_create_context |
CREATE TABLE table_name_55 (
result VARCHAR,
opponent VARCHAR,
attendance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- An attendance larger than 33,684 and an opponent of Hamilton Academical had this listed as a result?
| SELECT result FROM table_name_55 WHERE opponent = "hamilton academical" AND attendance > 33 OFFSET 684 | sql_create_context |
CREATE TABLE table_name_27 (
draw INTEGER,
artist VARCHAR,
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the sum of draw for artist hari mata hari with less than 70 points?
| SELECT SUM(draw) FROM table_name_27 WHERE artist = "hari mata hari" AND points < 70 | sql_create_context |
CREATE TABLE table_43624 (
"Round" real,
"Player" text,
"Position" text,
"Nationality" text,
"College/Junior/Club Team (League)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the total rounds Travis Hamonic played?
| SELECT COUNT("Round") FROM table_43624 WHERE "Player" = 'travis hamonic' | wikisql |
CREATE TABLE companies (
id number,
name text,
headquarters text,
industry text,
sales_billion number,
profits_billion number,
assets_billion number,
market_value_billion text
)
CREATE TABLE buildings (
id number,
name text,
city text,
height number,
stories number,
... | SELECT name FROM buildings ORDER BY height DESC | spider |
CREATE TABLE jyjgzbb (
JYZBLSH text,
YLJGDM text,
BGDH text,
BGRQ time,
JYRQ time,
JCRGH text,
JCRXM text,
SHRGH text,
SHRXM text,
JCXMMC text,
JCZBDM text,
JCFF text,
JCZBMC text,
JCZBJGDX text,
JCZBJGDL number,
JCZBJGDW text,
SBBM text,
YQBH text... | SELECT MZBMLX, MZZDBM, MZZDMC FROM zyjzjlb WHERE JZLSH = '72457081873' | css |
CREATE TABLE table_name_27 (
lunar_eva_dates VARCHAR,
mission VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Pete Conrad was on the Apollo 12 mission but also had what Lunar EVA dates?
| SELECT lunar_eva_dates FROM table_name_27 WHERE mission = "apollo 12" AND name = "pete conrad" | sql_create_context |
CREATE TABLE table_20193855_2 (
publisher VARCHAR,
book_title VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the publisher of the book titled daughters of an emerald dusk?
| SELECT publisher FROM table_20193855_2 WHERE book_title = "Daughters of an Emerald Dusk" | sql_create_context |
CREATE TABLE stay (
patient VARCHAR,
room VARCHAR,
staystart VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the patient who most recently stayed in room 111.
| SELECT patient FROM stay WHERE room = 111 ORDER BY staystart DESC LIMIT 1 | sql_create_context |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | SELECT jybgb.BGRGH, jybgb.BGRXM FROM jybgb WHERE jybgb.BGDH = '46227509627' | css |
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | SELECT JOB_ID, COUNT(JOB_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY JOB_ID | nvbench |
CREATE TABLE genre (
g_name text,
rating text,
most_popular_in text
)
CREATE TABLE song (
song_name text,
artist_name text,
country text,
f_id number,
genre_is text,
rating number,
languages text,
releasedate time,
resolution number
)
CREATE TABLE artist (
artist_na... | SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.song_name LIKE "%love%" | spider |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | SELECT jyjgzbb.JYZBLSH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB ... | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "2384" AND lab.fluid = "Ascites" | mimicsql_data |
CREATE TABLE table_name_3 (
dutch VARCHAR,
latin VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Dutch translation of the Latin word navigo?
| SELECT dutch FROM table_name_3 WHERE latin = "navigo" | sql_create_context |
CREATE TABLE wine (
No INTEGER,
Grape TEXT,
Winery TEXT,
Appelation TEXT,
State TEXT,
Name TEXT,
Year INTEGER,
Price INTEGER,
Score INTEGER,
Cases INTEGER,
Drink TEXT
)
CREATE TABLE grapes (
ID INTEGER,
Grape TEXT,
Color TEXT
)
CREATE TABLE appellations (
No... | SELECT Area, COUNT(Area) FROM appellations GROUP BY Area | nvbench |
CREATE TABLE table_39642 (
"Game" real,
"October" real,
"Opponent" text,
"Score" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the opponent of the team with a 1-1-0 record?
| SELECT "Opponent" FROM table_39642 WHERE "Record" = '1-1-0' | wikisql |
CREATE TABLE table_67761 (
"Year" real,
"Pick" text,
"Player name" text,
"College" text,
"Position" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Pick has a Year larger than 1983, and a Player name of brian jozwiak?
| SELECT "Pick" FROM table_67761 WHERE "Year" > '1983' AND "Player name" = 'brian jozwiak' | wikisql |
CREATE TABLE table_name_1 (
outcome VARCHAR,
tournament VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the outcome for the Hershey tournament?
| SELECT outcome FROM table_name_1 WHERE tournament = "hershey" | sql_create_context |
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | SELECT All_Home, SUM(School_ID) FROM basketball_match GROUP BY All_Home | nvbench |
CREATE TABLE table_name_70 (
name VARCHAR,
lane VARCHAR,
time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who swam in a lane less than 6 and finished with a time of 2:11.02?
| SELECT name FROM table_name_70 WHERE lane < 6 AND time = "2:11.02" | sql_create_context |
CREATE TABLE table_1201 (
"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.
-- Name the segment b for graphite s fly rod
| SELECT "Segment B" FROM table_1201 WHERE "Segment C" = 'Graphite s Fly Rod' | wikisql |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT prescriptions.formulary_drug_cd FROM prescriptions WHERE prescriptions.drug = "Lactic Acid 12% Lotion" | mimicsql_data |
CREATE TABLE table_77491 (
"Masculine a-stems" text,
"Masculine u-stems" text,
"Feminine \u014d-stems" text,
"Neuter a-stems" text,
"Masculine an-stems" text,
"Feminine \u014dn-stems" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the an... | SELECT "Masculine an-stems" FROM table_77491 WHERE "Feminine \u014d-stems" = 'siangar' AND "Masculine u-stems" = 'syni' | wikisql |
CREATE TABLE table_name_32 (
model_number VARCHAR,
sspec_number VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the model number for the processor with sSpec number of sl3jm(kc0)sl3jt(kc0)?
| SELECT model_number FROM table_name_32 WHERE sspec_number = "sl3jm(kc0)sl3jt(kc0)" | sql_create_context |
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 ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%bangladesh%' OR UPPER(Location) LIKE '%BANGLADESH%' OR LOWER(Location) LIKE '%dhaka' OR UPPER(Location) LIKE '%DHAKA%' OR LOWER(Location) LIKE '%khulna' OR UPPER(Location) LIKE '%KHULNA%' OR... | sede |
CREATE TABLE table_4610 (
"Team" text,
"Chassis" text,
"Engine" text,
"Tires" text,
"Drivers" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What chassis doe Ross Davis use?
| SELECT "Chassis" FROM table_4610 WHERE "Drivers" = 'ross davis' | wikisql |
CREATE TABLE table_80099 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Game site" text,
"Record" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the opponent when the Seattle Seahawks had a record of ... | SELECT "Opponent" FROM table_80099 WHERE "Record" = '8-7' | wikisql |
CREATE TABLE table_name_51 (
leading_scorer VARCHAR,
home VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the leading scorer when they were at home of the Clippers?
| SELECT leading_scorer FROM table_name_51 WHERE home = "clippers" | sql_create_context |
CREATE TABLE table_58558 (
"Athlete" text,
"Country" text,
"From" real,
"Gold" real,
"Silver" real,
"Total" real,
"Status" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the status of ren hoppe?
| SELECT "Status" FROM table_58558 WHERE "Athlete" = 'rené hoppe' | wikisql |
CREATE TABLE gyb (
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_ID = '86694077' UNION SELECT gyb.IN_DIAG_DIS_CD, gyb.IN_DIAG_DIS_NM FROM gyb WHERE gyb.PERSON_ID = '86694077' UNION SELECT zyb.IN_DIAG_DIS_CD, zyb.IN_DIAG_DIS_NM FROM zyb WHERE zyb.PERSON_ID = '86694077' UNION SELECT mzb.IN_DIAG_DIS_CD, mzb.IN_DIAG... | css |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_NM = '苏秀华' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC | css |
CREATE TABLE table_53544 (
"D 50 \u221a" text,
"D 49 \u221a" text,
"D 48 \u221a" text,
"D 47 \u221a" text,
"D 46 \u221a" text,
"D 45 \u221a" text,
"D 44 \u221a" text,
"D 43 \u221a" text,
"D 42 \u221a" text,
"D 41 \u221a" text
)
-- Using valid SQLite, answer the following questi... | SELECT "D 42 \u221a" FROM table_53544 WHERE "D 45 \u221a" = 'r 16' | wikisql |
CREATE TABLE table_name_96 (
pick VARCHAR,
round VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the pick of player don waddell from round 7?
| SELECT pick FROM table_name_96 WHERE round = "7" AND player = "don waddell" | sql_create_context |
CREATE TABLE table_75310 (
"Season" text,
"Season Premiere" text,
"Season Finale" text,
"Winner" text,
"Runner-up" text,
"Number of Contestants" real,
"Winner's Country" text,
"Runner Up's Country" text
)
-- Using valid SQLite, answer the following questions for the tables provided abo... | SELECT "Season" FROM table_75310 WHERE "Number of Contestants" > '12' AND "Winner" = 'greydis gil' | wikisql |
CREATE TABLE table_2214582_3 (
round VARCHAR,
opponents VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What round did they face fc st. gallen?
| SELECT COUNT(round) FROM table_2214582_3 WHERE opponents = "FC St. Gallen" | sql_create_context |
CREATE TABLE table_name_67 (
team_2 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the 1st round when team 2 is olympique lyonnais (d2)?
| SELECT 1 AS st_round FROM table_name_67 WHERE team_2 = "olympique lyonnais (d2)" | sql_create_context |
CREATE TABLE table_name_62 (
lead_envoy VARCHAR,
ryūkyūan_king VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the lead envoy of the mission with the Ry ky an King sh eki?
| SELECT lead_envoy FROM table_name_62 WHERE ryūkyūan_king = "shō eki" | sql_create_context |
CREATE TABLE table_48966 (
"Team #1" text,
"Agg." text,
"Team #2" text,
"1st leg" text,
"2nd leg" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which second team had a first leg score of 83-69?
| SELECT "Team #2" FROM table_48966 WHERE "1st leg" = '83-69' | wikisql |
CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
description varchar,
num_semesters int,
num_enrolled int,
has_discussion varchar,
has_lab varchar,
has_p... | SELECT COUNT(*) > 0 FROM course WHERE department = 'EECS' AND has_lab = 'Y' AND number = 285 | advising |
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE writes (
paperid int,
... | SELECT DISTINCT WRITES_0.paperid FROM author AS AUTHOR_0, author AS AUTHOR_1, writes AS WRITES_0, writes AS WRITES_1 WHERE AUTHOR_0.authorname = 'X Jiang' AND AUTHOR_1.authorname = 'Frantzen' AND WRITES_0.authorid = AUTHOR_0.authorid AND WRITES_1.authorid = AUTHOR_1.authorid AND WRITES_1.paperid = WRITES_0.paperid | scholar |
CREATE TABLE table_51580 (
"Week" text,
"Date" text,
"Opponent" text,
"Result" text,
"Kickoff [a ]" text,
"Game site" text,
"Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What game week did the Buccaneers play... | SELECT "Week" FROM table_51580 WHERE "Opponent" = 'minnesota vikings' | wikisql |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
... | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT intakeoutput.patientunitstayid FROM intakeoutput WHERE intakeoutput.celllabel = 'ns bolus' AND intakeoutput.cellpath LIKE '%input%' AND STRFTIME('%y', intakeoutput.intakeoutputtime) = '2105') | eicu |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 JOIN t_kc21_t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc22.MED_CLINIC_ID AND t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID WHERE t_kc21.PERSON_NM = '潘若云' AND t_kc22.STA_DATE BETWEEN '2004-02-29' AND '2019-02-16' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC LIMIT ... | css |
CREATE TABLE table_16804 (
"Week" text,
"Date" text,
"Opponent" text,
"Result" text,
"Kickoff [a ]" text,
"Game site" text,
"TV" text,
"Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In which week was the g... | SELECT COUNT("Week") FROM table_16804 WHERE "Record" = '3-6' | wikisql |
CREATE TABLE table_9970 (
"Game" real,
"March" real,
"Opponent" text,
"Score" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sum of Game, when Opponent is 'Cleveland Barons', and when March is less than 8?
| SELECT SUM("Game") FROM table_9970 WHERE "Opponent" = 'cleveland barons' AND "March" < '8' | wikisql |
CREATE TABLE table_name_30 (
game VARCHAR,
points VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Points smaller than 96, and a Record of 43 16 8 belongs to what game?
| SELECT game FROM table_name_30 WHERE points < 96 AND record = "43–16–8" | sql_create_context |
CREATE TABLE table_204_907 (
id number,
"lift name" text,
"type" text,
"top\nelevation\n(ft)" number,
"bottom\nelevation" number,
"vertical\nrise" number,
"length\n(ft)" number,
"slope\n(%)" text,
"capacity\n(rides/hr)" number,
"speed\n(ft/min)" number,
"lift\nmanufacturer" t... | SELECT "lift name" FROM table_204_907 ORDER BY "capacity\n(rides/hr)" LIMIT 1 | squall |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_labitems (
row_id ... | SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 1902 AND admissions.dischtime IS NULL) AND prescriptions.route = 'iv' ORDER BY prescriptions.startdate DESC LIMIT 1 | mimic_iii |
CREATE TABLE table_name_24 (
set_3 VARCHAR,
total VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the score of set 3 when the total is 45 31?
| SELECT set_3 FROM table_name_24 WHERE total = "45–31" | sql_create_context |
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 person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB ... | css |
CREATE TABLE Financial_Transactions (
transaction_id INTEGER,
previous_transaction_id INTEGER,
account_id INTEGER,
card_id INTEGER,
transaction_type VARCHAR(15),
transaction_date DATETIME,
transaction_amount DOUBLE,
transaction_comment VARCHAR(255),
other_transaction_details VARCHAR(... | SELECT card_type_code, COUNT(*) FROM Customers_Cards GROUP BY card_type_code ORDER BY card_type_code | nvbench |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | SELECT person_info.JGDM, person_info.JGMC, COUNT(person_info.RYBH) FROM person_info JOIN hz_info JOIN mzjzjlb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND ... | css |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREAT... | SELECT MAX(lab.labresult) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-144847')) AND lab.labname = 'creatinine' AND DATETIME(lab.labresulttime, 'star... | eicu |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
h... | SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-19622' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmit... | 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_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.t_kc21_PERSON_NM = '赵凯乐' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2008-08-29' AND '2016-10-19' | css |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellv... | SELECT t2.drugname FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-9636' AND patient.hospitaldis... | eicu |
CREATE TABLE table_203_746 (
id number,
"date" text,
"opponent" text,
"score" text,
"leading scorer" text,
"attendance" number,
"record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what was the least amount of points scored by a leading s... | SELECT MIN("leading scorer") FROM table_203_746 | squall |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.