instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_67 (
fcc_info VARCHAR,
erp_w VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which FCC info has an ERP W of 100 watts?
| SELECT fcc_info FROM table_name_67 WHERE erp_w = "100 watts" | sql_create_context |
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 AVG(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_AGE > 17 UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_AGE > 17) | css |
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 cost (
costid number,
... | SELECT (SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-56853')) AND intakeoutput.cellpath L... | eicu |
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label te... | SELECT AVG(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 808) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'bicarbonate') AND DATETIME(labevents.charttime, 'start of month') = DATETIME(... | mimic_iii |
CREATE TABLE wdmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZ... | SELECT wdmzjzjlb.JZZTDM, wdmzjzjlb.JZZTMC FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '48598074227' UNION SELECT bdmzjzjlb.JZZTDM, bdmzjzjlb.JZZTMC FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '48598074227' | css |
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 microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime tim... | SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'prescriptions' AND cost.event_id IN (SELECT prescriptions.row_id FROM prescriptions WHERE prescriptions.drug = 'nicardipine hcl iv') | mimic_iii |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text... | SELECT jyjgzbb.JYZBLSH FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON 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 AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz... | css |
CREATE TABLE jybgb_jyjgzbb (
JYZBLSH number,
YLJGDM text,
jyjgzbb_id number
)
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
... | SELECT mzjzjlb.JZLSH 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 = '58152656' AND NOT mzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ <= '2017-04-13') | 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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.drug_type = "BASE" AND lab.label = "Calculated Bicarbonate, Whole Blood" | mimicsql_data |
CREATE TABLE table_203_581 (
id number,
"club" text,
"chinese" text,
"city" text,
"home stadium" text,
"capacity" number,
"average attendance" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many teams for the 2010 chinese super league ... | SELECT COUNT("club") FROM table_203_581 WHERE "average attendance" > 15000 | squall |
CREATE TABLE table_47572 (
"City" text,
"Country" text,
"IATA" text,
"ICAO" text,
"Airport" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which country's IATA is ika?
| SELECT "Country" FROM table_47572 WHERE "IATA" = 'ika' | wikisql |
CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text,
meter_300 text,
meter_400 text,
meter_500 text,
meter_600 text,
... | SELECT name, ID FROM swimmer ORDER BY ID DESC | nvbench |
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 prescriptions (
subject_id text,
hadm_id... | SELECT prescriptions.icustay_id FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.name = "Stephanie Suchan" | mimicsql_data |
CREATE TABLE table_27542 (
"Season" text,
"Series" text,
"Team" text,
"Races" real,
"Wins" real,
"Poles" real,
"F/Laps" real,
"Podiums" real,
"Points" text,
"Position" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many point... | SELECT "Points" FROM table_27542 WHERE "Podiums" = '0' AND "Position" = '10th' | wikisql |
CREATE TABLE table_3662 (
"Series #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"U.S. viewers (millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many million viewers watched episode 3 in the ... | SELECT "U.S. viewers (millions)" FROM table_3662 WHERE "Series #" = '3' | wikisql |
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
... | 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 = 'immobiliz/wound attn nec') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 49140) AND... | mimic_iii |
CREATE TABLE table_name_80 (
time_retired VARCHAR,
driver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Time/Retired value for Ludovico Scarfiotti?
| SELECT time_retired FROM table_name_80 WHERE driver = "ludovico scarfiotti" | sql_create_context |
CREATE TABLE table_37796 (
"Medal" text,
"Name" text,
"Games" text,
"Sport" text,
"Event" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the sport for men's light flyweight with medal of gold
| SELECT "Sport" FROM table_37796 WHERE "Medal" = 'gold' AND "Event" = 'men''s light flyweight' | 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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "48" AND prescriptions.drug = "PHENYLEPHrine" | mimicsql_data |
CREATE TABLE table_name_62 (
population_in_1000__1931_ VARCHAR,
car_plates__since_1937_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- tell me the population in 1000(1931) that has car plates since 1937 of 35-39.
| SELECT population_in_1000__1931_ FROM table_name_62 WHERE car_plates__since_1937_ = "35-39" | sql_create_context |
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(card_type_code) FROM Customers_Cards GROUP BY card_type_code | nvbench |
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_labitems (
row_id... | SELECT t3.spec_type_desc FROM (SELECT t2.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FR... | mimic_iii |
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE comment_instructor (
instructor_id int,
... | SELECT COUNT(*) FROM course, course_offering, semester WHERE course_offering.start_time > '10:00:00' AND course.course_id = course_offering.course_id AND course.department = 'MO' AND course.number = 314 AND semester.semester = 'WN' AND semester.semester_id = course_offering.semester AND semester.year = 2016 | advising |
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "NEWBORN" AND prescriptions.route = "PO/NG" | mimicsql_data |
CREATE TABLE temperature (
city_id VARCHAR,
Feb VARCHAR
)
CREATE TABLE city (
city VARCHAR,
city_id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which city has the highest temperature in February?
| SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id ORDER BY T2.Feb DESC LIMIT 1 | sql_create_context |
CREATE TABLE table_name_9 (
event VARCHAR,
round VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the event for round 1 against Lance Wipf?
| SELECT event FROM table_name_9 WHERE round = "1" AND opponent = "lance wipf" | sql_create_context |
CREATE TABLE table_4994 (
"Version" text,
"Length" text,
"Album" text,
"Remixed by" text,
"Year" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is listed for the Lengtht that has a Version of Single Version?
| SELECT "Length" FROM table_4994 WHERE "Version" = 'single version' | wikisql |
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'PHILADELPHIA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'D... | atis |
CREATE TABLE table_1277350_7 (
thursday_day_five VARCHAR,
sunday_day_one VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many time is sunday day one is ahad?
| SELECT COUNT(thursday_day_five) FROM table_1277350_7 WHERE sunday_day_one = "Ahad" | sql_create_context |
CREATE TABLE zzmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZ... | SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE zzmzjzjlb.JZZDBM = 'W55.859' AND jyjgzbb.JCZBDM = '... | css |
CREATE TABLE table_204_759 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what competition was the only one where this competitor achieved 1st place ?
| SELECT "competition" FROM table_204_759 WHERE "position" = 1 | squall |
CREATE TABLE table_66520 (
"Original NFL team" text,
"Player" text,
"Pos." text,
"College" text,
"Conf." text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the player from texas southern?
| SELECT "Player" FROM table_66520 WHERE "College" = 'texas southern' | wikisql |
CREATE TABLE table_17927935_1 (
date VARCHAR,
week VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the date of the week 4 game?
| SELECT date FROM table_17927935_1 WHERE week = 4 | sql_create_context |
CREATE TABLE table_25251 (
"Stage" real,
"Winner" text,
"General Classification" text,
"Mountains Classification" text,
"Sprint Classification" text,
"Team Classification" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the sprint classifica... | SELECT "Sprint Classification" FROM table_25251 WHERE "Winner" = 'Alejandro Valverde' | wikisql |
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 lab ON demographic.hadm_id = lab.hadm_id WHERE lab.fluid = "Ascites" | mimicsql_data |
CREATE TABLE table_12016 (
"Rider" text,
"Horse" text,
"Faults" text,
"Round 1 + 2A Points" text,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the total number of total when round 1 +2A points of 19.620
| SELECT COUNT("Total") FROM table_12016 WHERE "Round 1 + 2A Points" = '19.620' | wikisql |
CREATE TABLE table_56656 (
"Order" real,
"Name" text,
"Seasons" text,
"Games" real,
"Goals" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the name for seasons 1981 and an order more than 807?
| SELECT "Name" FROM table_56656 WHERE "Seasons" = '1981' AND "Order" > '807' | wikisql |
CREATE TABLE table_45521 (
"Poll Source" text,
"Dates administered" text,
"Democrat: Tom Harkin" text,
"Republican: Christopher Reed" text,
"Lead Margin" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What were the dates administered when the lead m... | SELECT "Dates administered" FROM table_45521 WHERE "Lead Margin" < '39' AND "Republican: Christopher Reed" = '37%' AND "Democrat: Tom Harkin" = '53%' | 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_NM = '金英耀' AND IN_HOSP_DATE BETWEEN '2000-04-27' AND '2021-02-17' GROUP BY IN_DIAG_DIS_CD ORDER BY COUNT(*) DESC LIMIT 1 | 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Government" AND procedures.long_title = "Percutaneous [endoscopic] gastrojejunostomy" | mimicsql_data |
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test_id varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor WHERE course_offering.semester < (SELECT SEMESTERalias0.semester_id FROM semester AS SEMESTERalias0 WHERE SEMESTERalias0.semester = 'WN' AND SEMESTERalias0.year = 2016) AND course.course_id = cour... | advising |
CREATE TABLE enroll (
class_code text,
stu_num number,
enroll_grade text
)
CREATE TABLE course (
crs_code text,
dept_code text,
crs_description text,
crs_credit number
)
CREATE TABLE department (
dept_code text,
dept_name text,
school_code text,
emp_num number,
dept_add... | SELECT SUM(crs_credit), dept_code FROM course GROUP BY dept_code | spider |
CREATE TABLE table_46999 (
"Club" text,
"Played" 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 following questions f... | SELECT "Lost" FROM table_46999 WHERE "Points for" = '257' | wikisql |
CREATE TABLE table_47862 (
"Date" text,
"Time" text,
"Opponent" text,
"Site" text,
"City" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What team was opponen in baltimore, at 2:00pm, on 4/06/08?
| SELECT "Opponent" FROM table_47862 WHERE "City" = 'baltimore' AND "Time" = '2:00pm' AND "Date" = '4/06/08' | wikisql |
CREATE TABLE table_11622840_1 (
tournament VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many tournaments recorded a score of 206 (-7)?
| SELECT COUNT(tournament) FROM table_11622840_1 WHERE score = "206 (-7)" | sql_create_context |
CREATE TABLE table_79620 (
"Player" text,
"Played" real,
"Legs Won" real,
"Legs Lost" real,
"100+" real,
"140+" real,
"180s" real,
"High Checkout" real,
"3-dart Average" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the high... | SELECT MAX("Legs Lost") FROM table_79620 WHERE "180s" > '1' AND "100+" = '53' AND "Played" < '4' | wikisql |
CREATE TABLE table_name_48 (
date VARCHAR,
satellite VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the date of the gps iif-7 satellite?
| SELECT date FROM table_name_48 WHERE satellite = "gps iif-7" | sql_create_context |
CREATE TABLE table_14058433_5 (
points_for VARCHAR,
points_against VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many points for with points against being 177
| SELECT COUNT(points_for) FROM table_14058433_5 WHERE points_against = "177" | sql_create_context |
CREATE TABLE Product (
product_id INTEGER,
product_name VARCHAR(80),
product_details VARCHAR(255)
)
CREATE TABLE Staff (
staff_id INTEGER,
staff_first_name VARCHAR(80),
staff_last_name VARCHAR(80),
other_staff_details VARCHAR(255)
)
CREATE TABLE Problems (
problem_id INTEGER,
produ... | SELECT log_entry_date, COUNT(log_entry_date) FROM Problem_Log WHERE problem_id = 10 | nvbench |
CREATE TABLE table_name_99 (
country VARCHAR,
place VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Country of the T8 Place Player with a Score of 68-74=142?
| SELECT country FROM table_name_99 WHERE place = "t8" AND score = 68 - 74 = 142 | sql_create_context |
CREATE TABLE table_204_62 (
id number,
"year" number,
"winner" text,
"second" text,
"third" text,
"starters" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what were the number of starters in 2008 ?
| SELECT "starters" FROM table_204_62 WHERE "year" = 2008 | squall |
CREATE TABLE customers (
customer_name VARCHAR,
customer_id VARCHAR
)
CREATE TABLE customer_addresses (
customer_id VARCHAR,
address_id VARCHAR
)
CREATE TABLE addresses (
address_id VARCHAR,
state_province_county VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables ... | SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = "Colorado" | sql_create_context |
CREATE TABLE table_4099 (
"Position" text,
"Name" text,
"Jockey" text,
"Age" real,
"Weight (st, lb)" text,
"Starting price" text,
"Distance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the jockey for Pink Gin?
| SELECT "Jockey" FROM table_4099 WHERE "Name" = 'Pink Gin' | 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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "2" AND prescriptions.drug_type = "ADDITIVE" | mimicsql_data |
CREATE TABLE table_name_80 (
score VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the Score on 17 december 1979?
| SELECT score FROM table_name_80 WHERE date = "17 december 1979" | sql_create_context |
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 author_id, gender_mf FROM Course_Authors_and_Tutors ORDER BY personal_name | nvbench |
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDat... | EXEC(@sql) | sede |
CREATE TABLE table_20396_1 (
poles VARCHAR,
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many poles had 72 points?
| SELECT COUNT(poles) FROM table_20396_1 WHERE points = "72" | sql_create_context |
CREATE TABLE stadium (
country VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the country that has the most stadiums.
| SELECT country FROM stadium GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1 | sql_create_context |
CREATE TABLE table_28195898_1 (
_number VARCHAR,
production_code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the season 4 # for the production code of 4abb07?
| SELECT _number FROM table_28195898_1 WHERE production_code = "4ABB07" | sql_create_context |
CREATE TABLE table_17039232_3 (
replaced_by VARCHAR,
position_in_table VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the replaced by for position in table is 1st
| SELECT replaced_by FROM table_17039232_3 WHERE position_in_table = "1st" | sql_create_context |
CREATE TABLE table_name_10 (
date VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the date when the venue is stade g n ral seyni kountch , niamey?
| SELECT date FROM table_name_10 WHERE venue = "stade général seyni kountché , niamey" | sql_create_context |
CREATE TABLE table_26157 (
"Year" real,
"Division" real,
"League" text,
"Regular Season" text,
"Playoffs" text,
"Open Cup" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How did Cleveland do in the regular season in 2006?
| SELECT "Regular Season" FROM table_26157 WHERE "Year" = '2006' | wikisql |
CREATE TABLE table_70922 (
"Year" real,
"Competition" text,
"Venue" text,
"Position" text,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What competition did he compete in before 2007 in gothenburg, sweden?
| SELECT "Competition" FROM table_70922 WHERE "Year" < '2007' AND "Venue" = 'gothenburg, sweden' | wikisql |
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
good_feedback int,
tough_test... | SELECT DISTINCT course.name, course.number, program_course.workload FROM course, program_course WHERE course.department = 'EECS' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MAX(PROGRAM_COURSEalias1.workload) FROM course AS COURSEalias1, program_course AS PROGRAM_COURSEalias1 WH... | advising |
CREATE TABLE table_2155836_1 (
population__millions VARCHAR,
_2011_ VARCHAR,
hdi__2011_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the population in millions for 2011 where the HDI for 2011 is 0.453 (low)?
| SELECT population__millions, _2011_ FROM table_2155836_1 WHERE hdi__2011_ = "0.453 (low)" | sql_create_context |
CREATE TABLE table_20297668_1 (
yarn_type__us_ VARCHAR,
standard_yarn_weight_system VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the yarn type for standard yarn weight system for 3 or light
| SELECT yarn_type__us_ FROM table_20297668_1 WHERE standard_yarn_weight_system = "3 or Light" | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "1" AND diagnoses.short_title = "Alcoh dep NEC/NOS-unspec" | mimicsql_data |
CREATE TABLE table_name_84 (
round VARCHAR,
loser VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In which round was Barbara Hawcroft the loser?
| SELECT round FROM table_name_84 WHERE loser = "barbara hawcroft" | sql_create_context |
CREATE TABLE table_78495 (
"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.
-- Which home team had the away team score 15.18 (1... | SELECT "Home team score" FROM table_78495 WHERE "Away team score" = '15.18 (108)' | wikisql |
CREATE TABLE table_61087 (
"Game" real,
"Date" text,
"Opponent" text,
"Result" text,
"Hornets score" real,
"Opponent score" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest game with a 24-23 record?
| SELECT MAX("Game") FROM table_61087 WHERE "Record" = '24-23' | wikisql |
CREATE TABLE table_36798 (
"Body" text,
"Equatorial diameter" text,
"Polar diameter" text,
"Equatorial bulge" text,
"Flattening ratio" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Flattening ratio associated with the Equatorial diamete... | SELECT "Flattening ratio" FROM table_36798 WHERE "Equatorial diameter" = '12,756.28km' | 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 MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT medication.patientunitstayid FROM medication WHERE medication.drugname = 'phytonadione')) GROUP BY cost.patienthealthsys... | eicu |
CREATE TABLE table_47184 (
"Name" text,
"Year Began" text,
"s Registered user" text,
"Updated in past 30 days" text,
"Registration" text,
"Ability to syndicate off-site feeds" text,
"Userpics Free" text,
"Userpics Paid" text,
"Monthly Cost for Paid Account" text,
"Yearly Cost for... | SELECT "Userpics Free" FROM table_47184 WHERE "Registration" = 'open' AND "Yearly Cost for Paid Account" = 'unknown' AND "Name" = 'kraslan' | wikisql |
CREATE TABLE table_22655 (
"Season" text,
"League" text,
"Division" text,
"GP" real,
"W" real,
"L" real,
"T" real,
"OTL" real,
"SOL" real,
"PTS" real,
"PCT" text,
"GF" real,
"GA" real,
"PIM" real,
"Coach(es)" text,
"Result" text
)
-- Using valid SQLite, ... | SELECT "GA" FROM table_22655 WHERE "Coach(es)" = 'Bob Ferguson' AND "T" = '6' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX number,... | SELECT zyjzjlb.ZYBMLX, zyjzjlb.ZYZDBM, zyjzjlb.ZYZDMC FROM zyjzjlb WHERE zyjzjlb.JZLSH = '84637412405' | css |
CREATE TABLE table_65074 (
"Model number" text,
"sSpec number" text,
"Frequency" text,
"Turbo" text,
"Cores" text,
"L2 cache" text,
"L3 cache" text,
"I/O bus" text,
"Mult." text,
"Memory" text,
"Voltage" text,
"Socket" text,
"Release date" text,
"Part number(s)" t... | SELECT "Model number" FROM table_65074 WHERE "sSpec number" = 'slbjg(b1)' | wikisql |
CREATE TABLE table_name_86 (
_percentage_of_seats VARCHAR,
difference VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the % of seats where the difference is 0.25?
| SELECT _percentage_of_seats FROM table_name_86 WHERE difference = "0.25" | 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 hz_info (
KH text,
KLX number... | (SELECT jybgb.BGDH FROM hz_info JOIN mzjzjlb JOIN jybgb ON 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 hz_info.RYBH = '28140515' AND NOT jybgb.BGDH IN (SELECT BGDH FROM jyjgzbb WHERE JCZ... | css |
CREATE TABLE table_69670 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which nation has 0 gold, 0 silver and 2 total?
| SELECT "Nation" FROM table_69670 WHERE "Gold" = '0' AND "Silver" = '0' AND "Total" = '2' | wikisql |
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
h... | SELECT SUM(prescriptions.dose_val_rx) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3229) AND prescriptions.drug = 'ipratropium bromide neb' AND STRFTIME('%y-%m', prescriptions.startdate) >= '2105-12' | mimic_iii |
CREATE TABLE table_name_52 (
railway VARCHAR,
location VARCHAR,
objectnumber VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Railway has a Location of shildon, and an ObjectNumber of 1978-7006?
| SELECT railway FROM table_name_52 WHERE location = "shildon" AND objectnumber = "1978-7006" | sql_create_context |
CREATE TABLE table_53024 (
"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.
-- Which Away team is associated with the Richmond ... | SELECT "Away team" FROM table_53024 WHERE "Home team" = 'richmond' | wikisql |
CREATE TABLE table_203_646 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many competitions did kazakhstan compete in ?
| SELECT COUNT("competition") FROM table_203_646 | squall |
CREATE TABLE course (
course_id VARCHAR,
title VARCHAR
)
CREATE TABLE student (
name VARCHAR,
id VARCHAR
)
CREATE TABLE takes (
id VARCHAR,
course_id VARCHAR
)
CREATE TABLE prereq (
prereq_id VARCHAR,
course_id VARCHAR
)
-- Using valid SQLite, answer the following questions for the ... | SELECT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE T2.course_id IN (SELECT T4.prereq_id FROM course AS T3 JOIN prereq AS T4 ON T3.course_id = T4.course_id WHERE T3.title = 'International Finance') | sql_create_context |
CREATE TABLE table_38986 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Indians' record during the game that had 31,467 in attendance?
| SELECT "Record" FROM table_38986 WHERE "Attendance" = '31,467' | wikisql |
CREATE TABLE table_76434 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"TV Time" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHAT IS THE TV TIME FOR NOVEMBER 10, 1996?
| SELECT "TV Time" FROM table_76434 WHERE "Date" = 'november 10, 1996' | wikisql |
CREATE TABLE table_33074 (
"Lecturers" real,
"Associate professors" real,
"Assistant professors" real,
"Professors" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the maximum number of associate professors when there are more t... | SELECT MAX("Associate professors") FROM table_33074 WHERE "Assistant professors" > '5' AND "Professors" < '14' | wikisql |
CREATE TABLE table_name_23 (
points INTEGER,
league VARCHAR,
draws VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest points that has w-2 (w-league) as the league, and draws greater than 2?
| SELECT MIN(points) FROM table_name_23 WHERE league = "w-2 (w-league)" AND draws > 2 | sql_create_context |
CREATE TABLE table_name_30 (
surface VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What surface was used on July 17, 1983?
| SELECT surface FROM table_name_30 WHERE date = "july 17, 1983" | sql_create_context |
CREATE TABLE table_36080 (
"Name" text,
"Species Specific" text,
"Intra-molecular structure" text,
"Comparative" text,
"Link" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Intra-molecular structure has a Comparative of no, and a Name of mitar... | SELECT "Intra-molecular structure" FROM table_36080 WHERE "Comparative" = 'no' AND "Name" = 'mitarget' | wikisql |
CREATE TABLE table_10236830_1 (
actors_name VARCHAR,
nomination VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the actor's name for best debut?
| SELECT actors_name FROM table_10236830_1 WHERE nomination = "Best Debut" | sql_create_context |
CREATE TABLE table_73484 (
"#" real,
"Name" text,
"Country" text,
"1" real,
"2" real,
"3" real,
"Other placings" real,
"Total" real,
"First appearance" real,
"Last appearance" real,
"Federation" text
)
-- Using valid SQLite, answer the following questions for the tables pro... | SELECT COUNT("2") FROM table_73484 WHERE "Country" = 'England' | wikisql |
CREATE TABLE table_19640 (
"Position" real,
"Race number" text,
"Sail number" text,
"Yacht" text,
"State/country" text,
"Yacht type" text,
"LOA (Metres)" text,
"Skipper" text,
"Elapsed time d:hh:mm:ss" text
)
-- Using valid SQLite, answer the following questions for the tables prov... | SELECT "Elapsed time d:hh:mm:ss" FROM table_19640 WHERE "Yacht type" = 'STP 65' | wikisql |
CREATE TABLE table_name_66 (
position INTEGER,
pilot VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest Position, when Pilot is 'Mario Kiessling'?
| SELECT MAX(position) FROM table_name_66 WHERE pilot = "mario kiessling" | sql_create_context |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
... | SELECT prescriptions.route FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.name = "Jerry Deberry" | mimicsql_data |
CREATE TABLE people (
people_id number,
sex text,
name text,
date_of_birth text,
height number,
weight number
)
CREATE TABLE candidate (
candidate_id number,
people_id number,
poll_source text,
date text,
support_rate number,
consider_rate number,
oppose_rate number,... | SELECT t1.name, t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id ORDER BY t2.support_rate DESC LIMIT 1 | spider |
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE... | SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY COUNT(HIRE_DATE) | nvbench |
CREATE TABLE table_33662 (
"Team" text,
"Outgoing manager" text,
"Manner of departure" text,
"Date of vacancy" text,
"Replaced by" text,
"Date of appointment" text,
"Position in table" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How was S... | SELECT "Position in table" FROM table_33662 WHERE "Outgoing manager" = 'sammy lee' | wikisql |
CREATE TABLE table_203_455 (
id number,
"round" number,
"#" number,
"player" text,
"nationality" text,
"college/junior/club team (league)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who was the first player that the oilers picked ?
| SELECT "player" FROM table_203_455 ORDER BY "#" LIMIT 1 | squall |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.