instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE status (
station_id INTEGER,
bikes_available INTEGER,
docks_available INTEGER,
time TEXT
)
CREATE TABLE weather (
date TEXT,
max_temperature_f INTEGER,
mean_temperature_f INTEGER,
min_temperature_f INTEGER,
max_dew_point_f INTEGER,
mean_dew_point_f INTEGER,
min_... | SELECT installation_date, COUNT(installation_date) FROM station GROUP BY installation_date | nvbench |
CREATE TABLE table_50992 (
"Heat" real,
"Lane" real,
"Name" text,
"Country" text,
"Mark" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the mark for the runner from Mozambique?
| SELECT "Mark" FROM table_50992 WHERE "Country" = 'mozambique' | wikisql |
CREATE TABLE table_name_28 (
points VARCHAR,
games INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total points with less than 5 games?
| SELECT COUNT(points) FROM table_name_28 WHERE games < 5 | sql_create_context |
CREATE TABLE table_17121262_9 (
location_attendance VARCHAR,
game VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the location and attendance for game 60?
| SELECT location_attendance FROM table_17121262_9 WHERE game = 60 | sql_create_context |
CREATE TABLE table_name_73 (
Chinese VARCHAR,
index VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Chinese name of the player in Index F10?
| SELECT Chinese AS name FROM table_name_73 WHERE index = "f10" | sql_create_context |
CREATE TABLE table_15930 (
"County" text,
"English name" text,
"Irish name" text,
"Population" real,
"Irish speakers" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the county for the Irish name Carna?
| SELECT "County" FROM table_15930 WHERE "Irish name" = 'Carna' | wikisql |
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 (SELECT COUNT(*) 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 = '马璇珠' AND mzjzjlb.JZKSRQ BETWEEN '2021-08-25' AND '2021-09-05') + (SELECT COUNT(*) FROM person_info J... | css |
CREATE TABLE table_name_40 (
constructor VARCHAR,
rounds VARCHAR,
chassis VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which constructor has 10-12 rounds and a M7A chassis?
| SELECT constructor FROM table_name_40 WHERE rounds = "10-12" AND chassis = "m7a" | sql_create_context |
CREATE TABLE table_204_420 (
id number,
"month" text,
"song" text,
"artist" text,
"aggregate points" number,
"total downloads" number,
"year-end chart" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which song has the most downloads ?
| SELECT "song" FROM table_204_420 ORDER BY "total downloads" DESC LIMIT 1 | squall |
CREATE TABLE table_name_8 (
attendance INTEGER,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Attendance of the game against the Florida Panthers?
| SELECT SUM(attendance) FROM table_name_8 WHERE opponent = "florida panthers" | sql_create_context |
CREATE TABLE table_dev_40 (
"id" int,
"tc" int,
"ldl_cholesterol" int,
"systolic_blood_pressure_sbp" int,
"untreated_hyperlipidemia" bool,
"hemoglobin_a1c_hba1c" float,
"platelets" int,
"neutropenia" int,
"thrombocytopenia" float,
"diastolic_blood_pressure_dbp" int,
"tgc" int... | SELECT * FROM table_dev_40 WHERE lymphopenia < 1000 AND neutropenia < 1500 OR thrombocytopenia = 1 OR platelets < 100000 | criteria2sql |
CREATE TABLE table_34518 (
"Year" real,
"Performance" text,
"World Ranking" real,
"Venue" text,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many world rankings are after Aug 5, 1980 ?
| SELECT SUM("World Ranking") FROM table_34518 WHERE "Date" = 'aug 5' AND "Year" > '1980' | wikisql |
CREATE TABLE table_name_89 (
season_outcome VARCHAR,
school VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the season outcome for smyrna
| SELECT season_outcome FROM table_name_89 WHERE school = "smyrna" | sql_create_context |
CREATE TABLE table_67749 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text,
"Stadium" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the date of the game that had a loss of Reed (0 2)?
| SELECT "Date" FROM table_67749 WHERE "Loss" = 'reed (0–2)' | wikisql |
CREATE TABLE table_23397 (
"No. in series" text,
"No. in season" real,
"Family/families" text,
"Location(s)" text,
"Original air date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What episode in the season was episode us17 in the series?
| SELECT COUNT("No. in season") FROM table_23397 WHERE "No. in series" = 'US17' | wikisql |
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "CORONARY ARTERY DISEASE\CORONARY ARTERY BYPASS GRAFT; MYOMECTOMY/SDA" AND lab.fluid = "Pleural" | mimicsql_data |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
... | SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-165214')) AND vitalperiodic.systemicmean < 112.... | eicu |
CREATE TABLE jybgb_jyjgzbb (
JYZBLSH number,
YLJGDM text,
jyjgzbb_id number
)
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW tex... | 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 = '6114875' AND jybgb.BGRQ BETWEEN '2001-06-25' AND '2009-03-18' GROUP BY jybgb.KSBM HAVING COUNT(*) <= 20) AS T | css |
CREATE TABLE table_30021 (
"Series #" real,
"Episode #" text,
"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 U.S. viewe... | SELECT "U.S. viewers (millions)" FROM table_30021 WHERE "Series #" = '69' | wikisql |
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 text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" | mimicsql_data |
CREATE TABLE fzzmzjzjlb (
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,
MZZYZD... | SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN zzmzjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND 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 WHERE person_info.XM = '凤... | css |
CREATE TABLE table_name_2 (
title VARCHAR,
season VARCHAR,
first_broadcast VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Title, when Season is less than 1.8, and when First Broadcast is March 6, 1981?
| SELECT title FROM table_name_2 WHERE season < 1.8 AND first_broadcast = "march 6, 1981" | sql_create_context |
CREATE TABLE table_36008 (
"Year" real,
"Competition" text,
"Venue" text,
"Position" text,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Notes after 1983 have a Position of 18th?
| SELECT "Notes" FROM table_36008 WHERE "Year" > '1983' AND "Position" = '18th' | wikisql |
CREATE TABLE table_6688 (
"207." real,
"3 March" text,
"Friendly" text,
"Belgium" text,
"Croatia" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Friendly has a 3 March of 17 november?
| SELECT "Friendly" FROM table_6688 WHERE "3 March" = '17 november' | wikisql |
CREATE TABLE mzjzjlb_jybgb (
YLJGDM_MZJZJLB text,
BGDH number,
YLJGDM number
)
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... | SELECT mzjzjlb.SG, mzjzjlb.TZ 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 = '23887920' | css |
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.YQBH, jyjgzbb.YQMC FROM hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON 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 = jyjgzbb.YLJGDM AND jybgb.BGDH ... | css |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE patient (
uniquepid text,
... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.unitadmittime)) FROM patient WHERE patient.uniquepid = '027-188709' AND patient.wardid = 961 AND patient.hospitaldischargetime IS NULL ORDER BY patient.unitadmittime LIMIT 1 | eicu |
CREATE TABLE entrepreneur (
Entrepreneur_ID int,
People_ID int,
Company text,
Money_Requested real,
Investor text
)
CREATE TABLE people (
People_ID int,
Name text,
Height real,
Weight real,
Date_of_Birth text
)
-- Using valid SQLite, answer the following questions for the tabl... | SELECT Investor, COUNT(*) FROM entrepreneur GROUP BY Investor | nvbench |
CREATE TABLE section (
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0),
building varchar(15),
room_number varchar(7),
time_slot_id varchar(4)
)
CREATE TABLE department (
dept_name varchar(20),
building varchar(15),
budget numeric(12,2)
)
CREATE T... | SELECT year, COUNT(*) FROM section GROUP BY semester, year ORDER BY year | nvbench |
CREATE TABLE table_name_33 (
property_taxes VARCHAR,
year VARCHAR,
total_revenue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What were property taxes in a year when total revenue was $40,891,700 after 2002?
| SELECT property_taxes FROM table_name_33 WHERE year > 2002 AND total_revenue = "$40,891,700" | sql_create_context |
CREATE TABLE postseason (
YEAR VARCHAR,
ties VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many games in 1885 postseason resulted in ties (that is, the value of 'ties' is '1')?
| SELECT COUNT(*) FROM postseason WHERE YEAR = 1885 AND ties = 1 | sql_create_context |
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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2138" AND diagnoses.long_title = "Unspecified schizophrenia, unspecified" | mimicsql_data |
CREATE TABLE table_name_25 (
attendance INTEGER,
date VARCHAR,
week VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the highest number of attendance in a week before 8 and game on October 25, 1981?
| SELECT MAX(attendance) FROM table_name_25 WHERE date = "october 25, 1981" AND week < 8 | sql_create_context |
CREATE TABLE t_kc22 (
MED_EXP_DET_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
MED_EXP_BILL_ID text,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
DIRE_TYPE number,
CHA_ITEM_LEV number,
MED_INV_ITEM_TYPE text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | SELECT MED_SER_ORG_NO FROM t_kc21 WHERE PERSON_ID = '18716926' GROUP BY MED_SER_ORG_NO ORDER BY COUNT(*) DESC | css |
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 prescriptions... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "COPD EXACERBATION" AND demographic.age < "56" | mimicsql_data |
CREATE TABLE zyb (
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 = '59902632' AND qtb.IN_HOSP_DATE BETWEEN '2001-07-28' AND '2006-07-31' 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 = '59902632' AND gyb.IN_HOSP... | css |
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.age, demographic.discharge_location FROM demographic WHERE demographic.name = "Jerry Deberry" | mimicsql_data |
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0... | SELECT LAST_NAME, DEPARTMENT_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) | nvbench |
CREATE TABLE t_kc22 (
MED_EXP_DET_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
MED_EXP_BILL_ID text,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
DIRE_TYPE number,
CHA_ITEM_LEV number,
MED_INV_ITEM_TYPE text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | SELECT REF_SLT_FLG FROM t_kc24 WHERE MED_CLINIC_ID = '02796405922' | css |
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 mzjzjlb JOIN zyjybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB AND zyjybgb.YLJGDM = jyjgzbb.YLJGDM AND zyjybgb... | css |
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', prescriptions.startdate)) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 10855 AND admissions.dischtime IS NULL) AND prescriptions.drug = 'senna' ORDER BY prescriptions.startdate LIMIT... | mimic_iii |
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_DIRE_CD text,
MED_DIRE_NM text,... | SELECT AVG(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_AGE >= 17) | css |
CREATE TABLE table_9293 (
"Player" text,
"Games" real,
"Returns" real,
"Yards" real,
"Long" real,
"Yards per return" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Can you tell me the Player that has the Long larger than 28, and the Yards of 222... | SELECT "Player" FROM table_9293 WHERE "Long" > '28' AND "Yards" = '222' | wikisql |
CREATE TABLE table_name_20 (
league VARCHAR,
attendance_average VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which League showed 7,975 for an average attendance?
| SELECT league FROM table_name_20 WHERE attendance_average = "7,975" | sql_create_context |
CREATE TABLE table_name_79 (
athlete VARCHAR,
react VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the athlete with react of 0.185?
| SELECT athlete FROM table_name_79 WHERE react = 0.185 | 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 WHERE demographic.admission_type = "NEWBORN" AND demographic.ethnicity = "BLACK/HAITIAN" | mimicsql_data |
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length int,
weight int,
capacity int,
pay_load int,
cruising_speed int,
range_... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop WHERE ((CITY_2.city_code = AIRPORT_SERVICE_2.city_code AND CITY_2.city_name = 'INDIANAPOLIS' AND fli... | atis |
CREATE TABLE table_name_70 (
year VARCHAR,
engine VARCHAR,
chassis VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In what year did a car have a yamaha v12 engine and a brabham bt60y chassis
| SELECT year FROM table_name_70 WHERE engine = "yamaha v12" AND chassis = "brabham bt60y" | sql_create_context |
CREATE TABLE table_46285 (
"Rank" real,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many gold medals for a nation with rank less than 5, more than 0 silvers and a total of 2 medals?
| SELECT AVG("Gold") FROM table_46285 WHERE "Rank" < '5' AND "Silver" > '0' AND "Total" = '2' | wikisql |
CREATE TABLE table_76889 (
"Place" text,
"Player" text,
"Country" text,
"Score" real,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is To Par, when Country is 'United States', when Place is 'T4', and when Player is 'Frank Boynton'?
| SELECT "To par" FROM table_76889 WHERE "Country" = 'united states' AND "Place" = 't4' AND "Player" = 'frank boynton' | wikisql |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TAB... | SELECT vitalperiodic.respiration FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-62766')) AND NOT vitalperiodic.respiration IS NULL ... | eicu |
CREATE TABLE table_name_40 (
game INTEGER,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the maximum game that was played against the New York Knickerbockers?
| SELECT MAX(game) FROM table_name_40 WHERE opponent = "new york knickerbockers" | sql_create_context |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE diagnoses_icd (
... | SELECT inputevents_cv.charttime FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 20898) AND icustays.outtime IS NULL) AND inputevents_cv.itemid IN (SELECT d_items.itemid FRO... | mimic_iii |
CREATE TABLE table_name_76 (
verb VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHICH 2/3 (P) has a Verb of kh la?
| SELECT 2 AS _3__p_ FROM table_name_76 WHERE verb = "khêla" | 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 gwyjzb.MED_ORG_DEPT_NM, gwyjzb.OUT_DIAG_DIS_NM, AVG(gwyjzb.PERSON_AGE) FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '9557781' GROUP BY gwyjzb.MED_ORG_DEPT_NM, gwyjzb.OUT_DIAG_DIS_NM UNION SELECT fgwyjzb.MED_ORG_DEPT_NM, fgwyjzb.OUT_DIAG_DIS_NM, AVG(fgwyjzb.PERSON_AGE) FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '95... | css |
CREATE TABLE table_name_96 (
score INTEGER,
number VARCHAR,
drop_goals VARCHAR,
penalties VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- drop goals larger than 0, and a Penalties of 52, and a Number larger than 5 had what lowest score?
| SELECT MIN(score) FROM table_name_96 WHERE drop_goals > 0 AND penalties = 52 AND number > 5 | sql_create_context |
CREATE TABLE gwyjzb (
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 COUNT(*) FROM gwyjzb JOIN t_kc24 ON gwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '秦鸿达' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2002-07-26' AND '2015-09-20' AND t_kc24.MED_AMOUT <= 10 UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc24 ON fgwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE fgwyjzb.P... | css |
CREATE TABLE table_7373 (
"Position" real,
"Team" text,
"Points" real,
"Played" real,
"Drawn" real,
"Lost" real,
"Against" real,
"Difference" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many positions have an against of less than ... | SELECT COUNT("Position") FROM table_7373 WHERE "Against" < '27' AND "Played" < '8' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "1" AND diagnoses.long_title = "End stage renal disease" | mimicsql_data |
CREATE TABLE table_12305325_4 (
week INTEGER,
eliminated VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the max week where kate and anton are eliminated?
| SELECT MAX(week) FROM table_12305325_4 WHERE eliminated = "Kate and Anton" | sql_create_context |
CREATE TABLE table_17391 (
"No. in series" text,
"No. in season" text,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the season number o... | SELECT "No. in season" FROM table_17391 WHERE "Title" = 'Houseboat' | wikisql |
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 * FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '9698019' AND t_kc21.IN_HOSP_DATE BETWEEN '2001-11-15' AND '2014-12-27' EXCEPT SELECT * FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '9698019' AND t_kc21.IN_HOSP_DATE BETWEEN '2001-11-15' AND '2014-12-27' AND t_kc21.MED_ORG_DEPT_CD = '3455' | css |
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 mzjzjlb (
YLJGDM text,
JZLSH ... | (SELECT jybgb.KSBM, jybgb.KSMC 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 = '... | css |
CREATE TABLE table_59283 (
"Year" real,
"Award" text,
"Category" text,
"Film" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Award, when Result is 'Nominated', and when Film is 'Sankranthi'?
| SELECT "Award" FROM table_59283 WHERE "Result" = 'nominated' AND "Film" = 'sankranthi' | wikisql |
CREATE TABLE table_14547 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Game site" text,
"NFL Recap" text,
"Record" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the record at the game held on D... | SELECT "Record" FROM table_14547 WHERE "Date" = 'december 24, 2005' | wikisql |
CREATE TABLE table_10262 (
"Player" text,
"No.(s)" text,
"Height in Ft." text,
"Position" text,
"Years for Rockets" text,
"School/Club Team/Country" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the height in feet of number 10?
| SELECT "Height in Ft." FROM table_10262 WHERE "No.(s)" = '10' | wikisql |
CREATE TABLE DEPARTMENT (
DEPT_CODE varchar(10),
DEPT_NAME varchar(30),
SCHOOL_CODE varchar(8),
EMP_NUM int,
DEPT_ADDRESS varchar(20),
DEPT_EXTENSION varchar(4)
)
CREATE TABLE CLASS (
CLASS_CODE varchar(5),
CRS_CODE varchar(10),
CLASS_SECTION varchar(2),
CLASS_TIME varchar(20),
... | SELECT DEPT_CODE, MAX(STU_GPA) FROM STUDENT GROUP BY DEPT_CODE ORDER BY MAX(STU_GPA) DESC | nvbench |
CREATE TABLE table_name_5 (
season VARCHAR,
acquisition_via VARCHAR,
school_club_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which season had a trade with the school/club team La Salle?
| SELECT season FROM table_name_5 WHERE acquisition_via = "trade" AND school_club_team = "la salle" | sql_create_context |
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,
meter_700 text,
Time text
)
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
CREATE... | SELECT meter_200, AVG(ID) FROM swimmer GROUP BY meter_200 | nvbench |
CREATE TABLE table_39011 (
"Game" real,
"February" real,
"Opponent" text,
"Score" text,
"Record" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Opponent has a Game of 63?
| SELECT "Opponent" FROM table_39011 WHERE "Game" = '63' | wikisql |
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.
-- how many games had attendance with at least 10,000 people... | SELECT COUNT(*) FROM table_203_746 WHERE "attendance" >= 10000 | squall |
CREATE TABLE table_11820086_1 (
no_in_season INTEGER,
us_viewers__millions_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which episode number in season 5 was viewed by 3.00 million U.S. viziers?
| SELECT MIN(no_in_season) FROM table_11820086_1 WHERE us_viewers__millions_ = "3.00" | sql_create_context |
CREATE TABLE table_14925084_1 (
administrative_county VARCHAR,
area_1961__statute_acres_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the administrative county being area of 422372
| SELECT administrative_county FROM table_14925084_1 WHERE area_1961__statute_acres_ = 422372 | sql_create_context |
CREATE TABLE table_15594 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Pts." real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the latesr year that has more points than 0?
| SELECT MAX("Year") FROM table_15594 WHERE "Pts." > '0' | wikisql |
CREATE TABLE zyjzjlb (
YLJGDM text,
JZLSH text,
MZJZLSH text,
KH text,
KLX number,
HZXM text,
WDBZ number,
RYDJSJ time,
RYTJDM number,
RYTJMC text,
JZKSDM text,
JZKSMC text,
RZBQDM text,
RZBQMC text,
RYCWH text,
CYKSDM text,
CYKSMC text,
CYBQDM tex... | SELECT COUNT(*) FROM jybgb WHERE JZLSH = '91555102556' | css |
CREATE TABLE table_name_34 (
attendance VARCHAR,
season VARCHAR,
games VARCHAR,
sellouts VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many attendance numbers had more than 15 games, and sellouts of more than 8 in the 2011-12 season?
| SELECT COUNT(attendance) FROM table_name_34 WHERE games > 15 AND sellouts > 8 AND season = "2011-12" | sql_create_context |
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 * 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 hz_info.YLJGDM = '4840688' AND NOT zyjzjlb.JZKSMC LIKE '%乳腺%' | css |
CREATE TABLE ftxmzjzjlb (
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,
MZZYZD... | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON 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 = jyjgzbb.YLJGDM AND jybgb.BGD... | css |
CREATE TABLE table_14051 (
"Event" text,
"Record" text,
"Nationality" text,
"Date" text,
"Games" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the event of Guadeloupe?
| SELECT "Event" FROM table_14051 WHERE "Nationality" = 'guadeloupe' | wikisql |
CREATE TABLE table_50024 (
"Season" text,
"League" text,
"Teams" text,
"Home" text,
"Away" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Home has an Away of 1 1?
| SELECT "Home" FROM table_50024 WHERE "Away" = '1–1' | wikisql |
CREATE TABLE table_34558 (
"Year" text,
"Team" text,
"Progress" text,
"Score" text,
"Opponents" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Opponents have a Year of 1998 99, and a Team of aston villa?
| SELECT "Opponents" FROM table_34558 WHERE "Year" = '1998–99' AND "Team" = 'aston villa' | wikisql |
CREATE TABLE table_49986 (
"Draw" real,
"Song" text,
"Artist" text,
"Televotes" real,
"Place" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest Place, when Televotes is 15424?
| SELECT MIN("Place") FROM table_49986 WHERE "Televotes" = '15424' | 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 person_info.XM FROM person_info JOIN hz_info JOIN wdmzjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_ZYJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_ZYJZJLB WHERE jybgb.BGDH = '7... | css |
CREATE TABLE table_name_91 (
grid INTEGER,
time_retired VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest numbered grid with a time or retired time of 52:52.1881?
| SELECT MAX(grid) FROM table_name_91 WHERE time_retired = "52:52.1881" | sql_create_context |
CREATE TABLE table_3646 (
"Country or territory with flag" text,
"Area (km\u00b2) (per sqmi)" text,
"Population (July 2009 est.)" real,
"Population density per km\u00b2" text,
"Capital" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the are... | SELECT "Area (km\u00b2) (per sqmi)" FROM table_3646 WHERE "Population density per km\u00b2" = '8.4/km² (/sqmi)' | wikisql |
CREATE TABLE table_60241 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" real,
"To par" real,
"Finish" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number for Seve Ballesteros?
| SELECT COUNT("Total") FROM table_60241 WHERE "Player" = 'seve ballesteros' | wikisql |
CREATE TABLE table_name_15 (
original_teams VARCHAR,
at_home_winner VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What were the original teams for the season that was won at-home by Mark Pinkhasovich?
| SELECT original_teams FROM table_name_15 WHERE at_home_winner = "mark pinkhasovich" | sql_create_context |
CREATE TABLE table_23009 (
"No." real,
"State/Region" text,
"Districts" real,
"Town ships" real,
"Cities/ Towns" real,
"Wards" real,
"Village groups" real,
"Villages" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many villages are t... | SELECT "Villages" FROM table_23009 WHERE "State/Region" = 'Magway Region' | wikisql |
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semes... | SELECT DISTINCT instructor.name FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN course_offering ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN course ON course.course_id = course_offering.course_id INNER JOIN semester... | advising |
CREATE TABLE table_name_3 (
game VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the game number against the team Boston?
| SELECT COUNT(game) FROM table_name_3 WHERE team = "boston" | sql_create_context |
CREATE TABLE Services (
Service_ID INTEGER,
Service_Type_Code CHAR(15)
)
CREATE TABLE Participants_in_Events (
Event_ID INTEGER,
Participant_ID INTEGER
)
CREATE TABLE Participants (
Participant_ID INTEGER,
Participant_Type_Code CHAR(15),
Participant_Details VARCHAR(255)
)
CREATE TABLE Eve... | SELECT Participant_Details, Participant_ID FROM Participants ORDER BY Participant_ID | nvbench |
CREATE TABLE table_31327 (
"Series #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (million)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the title when... | SELECT "Title" FROM table_31327 WHERE "Series #" = '7' | wikisql |
CREATE TABLE table_56558 (
"Year" text,
"League" text,
"Record" text,
"Reg. Season" text,
"Playoffs" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What year had a record of 4-21?
| SELECT "Year" FROM table_56558 WHERE "Record" = '4-21' | wikisql |
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 procedures.long_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Paul Edwards" | mimicsql_data |
CREATE TABLE table_35315 (
"Year" real,
"Event" text,
"Skip" text,
"Third" text,
"Second" text,
"Lead" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which event shows Matt St. Louis in second and a skip of John Morris?
| SELECT "Event" FROM table_35315 WHERE "Skip" = 'john morris' AND "Second" = 'matt st. louis' | wikisql |
CREATE TABLE table_name_41 (
year INTEGER,
venue VARCHAR,
driver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the most recent race at Kyalami with Keke Rosberg competing?
| SELECT MAX(year) FROM table_name_41 WHERE venue = "kyalami" AND driver = "keke rosberg" | sql_create_context |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId ... | SELECT CONCAT('https://stackoverflow.com/questions/', c.PostId, '/#comment', c.Id, '_', c.PostId) AS link, c.Score, u.DisplayName, u.Reputation, c.Text FROM Comments AS c, Users AS u WHERE c.UserId = u.Id AND u.Location LIKE '%Algeria%' ORDER BY c.Score DESC | sede |
CREATE TABLE table_name_59 (
team_from VARCHAR,
pick__number VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Team has a Pick # of 148?
| SELECT team_from FROM table_name_59 WHERE pick__number = 148 | sql_create_context |
CREATE TABLE table_50985 (
"Poll Year" text,
"Winner" text,
"Second" text,
"Third" text,
"Fourth" text,
"Fifth" text,
"Sixth" text,
"Seventh" text,
"Eighth" text,
"Ninth" text,
"Tenth" text
)
-- Using valid SQLite, answer the following questions for the tables provided abov... | SELECT "Second" FROM table_50985 WHERE "Tenth" = 'dan black' | wikisql |
CREATE TABLE table_name_83 (
position VARCHAR,
drawn VARCHAR,
difference VARCHAR,
lost VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What position did the team finish in with a Difference of - 6, 3 losses, and over 4 draws?
| SELECT COUNT(position) FROM table_name_83 WHERE difference = "- 6" AND lost = 3 AND drawn > 4 | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.