instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_63 (
venue VARCHAR,
score VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the location for the match held on March 7, 2007, which ended with a score of 0-0?
| SELECT venue FROM table_name_63 WHERE score = "0-0" AND date = "march 7, 2007" | sql_create_context |
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE ... | 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 = 'loc exc bone lesion nec') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 4684) AND S... | mimic_iii |
CREATE TABLE table_name_94 (
round INTEGER,
pick VARCHAR,
overall VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Average round for 22 pick that is overall smaller than 229?
| SELECT AVG(round) FROM table_name_94 WHERE pick = 22 AND overall < 229 | sql_create_context |
CREATE TABLE table_61451 (
"Class" text,
"DRG Number(s)" text,
"Quantity" real,
"Year(s) of Manufacture" text,
"Type" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the quantity when the DRG was E 62 01 E 62 05?
| SELECT COUNT("Quantity") FROM table_61451 WHERE "DRG Number(s)" = 'e 62 01–e 62 05' | wikisql |
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE treatment (
treat... | SELECT DISTINCT medication.routeadmin FROM medication WHERE medication.drugname = 'propofol 1000 mg/100 ml' | eicu |
CREATE TABLE table_name_99 (
losses INTEGER,
byes INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What were the highest losses for a byes larger than 2?
| SELECT MAX(losses) FROM table_name_99 WHERE byes > 2 | sql_create_context |
CREATE TABLE table_name_9 (
province VARCHAR,
ubigeo VARCHAR,
districts VARCHAR,
region VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What province in Tumbes has less than 11 districts and a UBIGEO of 2401?
| SELECT province FROM table_name_9 WHERE districts < 11 AND region = "tumbes" AND ubigeo = 2401 | sql_create_context |
CREATE TABLE table_57371 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the listed opponent in Week 2?
| SELECT "Opponent" FROM table_57371 WHERE "Week" = '2' | wikisql |
CREATE TABLE table_name_19 (
gender VARCHAR,
university_students_and_adults__18yrs VARCHAR,
_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which gender is associated with University students and adults of 25mm?
| SELECT gender FROM table_name_19 WHERE university_students_and_adults__18yrs + _ = "25mm" | sql_create_context |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT lab.itemid FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.name = "Jerry Deberry" | mimicsql_data |
CREATE TABLE table_name_92 (
attendance VARCHAR,
game_site VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Attendance of the Game at Hoosier Dome?
| SELECT attendance FROM table_name_92 WHERE game_site = "hoosier dome" | sql_create_context |
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 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', medication.drugstarttime)) FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '035-22... | eicu |
CREATE TABLE table_name_11 (
year INTEGER,
placement_in_miss_world VARCHAR,
delegate VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the latest year that daisy garcia reyes did not place in miss world?
| SELECT MAX(year) FROM table_name_11 WHERE placement_in_miss_world = "did not place" AND delegate = "daisy garcia reyes" | sql_create_context |
CREATE TABLE table_name_33 (
competition VARCHAR,
venue VARCHAR,
result VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What New Delhi Competition has a Result of Loss?
| SELECT competition FROM table_name_33 WHERE venue = "new delhi" AND result = "loss" | sql_create_context |
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE treatment (
treat... | SELECT t3.diagnosisname FROM (SELECT t2.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'ace inhibitor - enalapril' AND DATETIME(... | eicu |
CREATE TABLE table_54070 (
"Rank" real,
"Name" text,
"Location" text,
"State" text,
"Designer, Year" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is augusta's low rank?
| SELECT MIN("Rank") FROM table_54070 WHERE "Location" = 'augusta' | wikisql |
CREATE TABLE table_1414702_3 (
enrollment INTEGER,
wiaa_classification VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest enrollment value out of the enrollment values I'd the schools with a 3A WIAA clarification?
| SELECT MIN(enrollment) FROM table_1414702_3 WHERE wiaa_classification = "3A" | sql_create_context |
CREATE TABLE table_test_17 (
"id" int,
"anemia" bool,
"left_ventricular_ejection_fraction_lvef" int,
"systolic_blood_pressure_sbp" int,
"active_infection" bool,
"fever" bool,
"bradycardia" int,
"renal_disease" bool,
"oliguria" bool,
"creatinine_clearance_cl" float,
"left_vent... | SELECT * FROM table_test_17 WHERE catecholamine_support = 1 AND left_ventricular_failure = 1 AND left_ventricular_ejection_fraction_lvef < 35 | criteria2sql |
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE FlagTypes (
Id ... | SELECT p.CreationDate AS Questioned, a.CreationDate AS Answered FROM Posts AS p, Posts AS a, Votes AS v WHERE a.ParentId = p.Id AND p.AcceptedAnswerId = v.PostId AND v.PostId = a.Id AND v.VoteTypeId = 1 AND p.Body LIKE '%<code>%' | sede |
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_code varchar,
minimum_connect_time int
)
CREATE TABLE food_service (
meal_... | 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 = 'DALLAS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'TAMPA' ... | atis |
CREATE TABLE table_13108 (
"Elected" text,
"Assembled" text,
"Dissolved" text,
"1st member" text,
"2nd member" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Elected has Assembled of 23 january 1559?
| SELECT "Elected" FROM table_13108 WHERE "Assembled" = '23 january 1559' | wikisql |
CREATE TABLE table_name_80 (
week INTEGER,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was the earliest that New England Patriots played?
| SELECT MIN(week) FROM table_name_80 WHERE opponent = "new england patriots" | sql_create_context |
CREATE TABLE table_name_1 (
lost VARCHAR,
played INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many lost stats have a played number of less than 8?
| SELECT COUNT(lost) FROM table_name_1 WHERE played < 8 | sql_create_context |
CREATE TABLE table_203_671 (
id number,
"name" text,
"rank" text,
"age" number,
"years until mandatory retirement" text,
"appointed by" text,
"year appointed" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many justices were appointed ... | SELECT COUNT("name") FROM table_203_671 WHERE "year appointed" = 2004 | squall |
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 * FROM Posts WHERE Posts.Tags LIKE '%javascript%' | sede |
CREATE TABLE table_203_299 (
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 long was the sprint from the european indoor championships competition in 2000 ?... | SELECT "notes" FROM table_203_299 WHERE "competition" = 'european indoor championships' AND "year" = 2000 | squall |
CREATE TABLE table_20026849_1 (
winner VARCHAR,
destination VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who won the season with Africa as its destination?
| SELECT winner FROM table_20026849_1 WHERE destination = "Africa" | sql_create_context |
CREATE TABLE table_66923 (
"!accented mora" text,
"one mora" text,
"two-mora word" text,
"three-mora word" text,
"gloss" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the two-mora word with a low tone accented mora and a gloss of / kusu ri/... | SELECT "two-mora word" FROM table_66923 WHERE "!accented mora" = 'low tone' AND "gloss" = '/˩kusuꜜri/ [kɯ̀sɯ́ɽì]' | wikisql |
CREATE TABLE table_name_17 (
start INTEGER,
year VARCHAR,
engine VARCHAR,
finish VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many starts are associated with an oldsmobile engine, 21 finishes and before 2001?
| SELECT SUM(start) FROM table_name_17 WHERE engine = "oldsmobile" AND finish = 21 AND year < 2001 | sql_create_context |
CREATE TABLE table_39955 (
"Rank" real,
"Name" text,
"Years" text,
"Matches" text,
"Goals" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who had a rank larger than 7, less than 305 goals, and 418 matches?
| SELECT "Name" FROM table_39955 WHERE "Rank" > '7' AND "Goals" < '305' AND "Matches" = '418' | wikisql |
CREATE TABLE table_name_50 (
winner VARCHAR,
prize VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the winner of the prize of 200,000 as listed?
| SELECT winner FROM table_name_50 WHERE prize = "£200,000" | sql_create_context |
CREATE TABLE table_79399 (
"Olympics" text,
"Name" text,
"Country" text,
"Medal" text,
"Event" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which country in the 2008 summer olympics is vadim devyatovskiy from?
| SELECT "Country" FROM table_79399 WHERE "Olympics" = '2008 summer olympics' AND "Name" = 'vadim devyatovskiy' | wikisql |
CREATE TABLE table_203_437 (
id number,
"year" number,
"laureate" text,
"relation" text,
"category" text,
"rationale" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who is the only person that received a nobel peace prize ?
| SELECT "laureate" FROM table_203_437 WHERE "category" = 'nobel peace prize' | squall |
CREATE TABLE table_2011 (
"Branding" text,
"Callsign" text,
"Frequency" text,
"Power (kW)" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the frequency of 101.5 News FM?
| SELECT "Frequency" FROM table_2011 WHERE "Branding" = '101.5 News FM' | wikisql |
CREATE TABLE table_35705 (
"Source" text,
"Date" text,
"Fidesz" text,
"MSZP" text,
"SZDSZ" text,
"Jobbik" text,
"others" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What percentage of others have an SZDSZ of 4% and a Fidesz of 60%?
| SELECT "others" FROM table_35705 WHERE "SZDSZ" = '4%' AND "Fidesz" = '60%' | wikisql |
CREATE TABLE Employee (
name VARCHAR,
salary VARCHAR,
eid VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name and salary for employee with id 242518965?
| SELECT name, salary FROM Employee WHERE eid = 242518965 | sql_create_context |
CREATE TABLE table_name_17 (
name VARCHAR,
area VARCHAR,
decile VARCHAR,
roll VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Onehunga school with a decile 3 and smaller than 310 rolls?
| SELECT name FROM table_name_17 WHERE decile = "3" AND roll < 310 AND area = "onehunga" | 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 gwyjzb.MED_ORG_DEPT_NM, gwyjzb.OUT_DIAG_DIS_NM, AVG(gwyjzb.PERSON_AGE) FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '3290779' GROUP BY gwyjzb.MED_ORG_DEPT_NM, gwyjzb.OUT_DIAG_DIS_NM HAVING AVG(gwyjzb.PERSON_AGE) > 29 UNION SELECT fgwyjzb.MED_ORG_DEPT_NM, fgwyjzb.OUT_DIAG_DIS_NM, AVG(fgwyjzb.PERSON_AGE) FROM fgwyjzb... | css |
CREATE TABLE table_18946749_2 (
col__m_ INTEGER,
peak VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the col (m) of the Bewani Mountains High Point peak?
| SELECT MIN(col__m_) FROM table_18946749_2 WHERE peak = "Bewani Mountains High Point" | sql_create_context |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "M" AND demographic.ethnicity = "BLACK/CAPE VERDEAN" | mimicsql_data |
CREATE TABLE table_name_43 (
year VARCHAR,
category VARCHAR,
result VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the year with the best female pop vocal album and result of won
| SELECT year FROM table_name_43 WHERE category = "best female pop vocal album" AND result = "won" | sql_create_context |
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
U... | SELECT DISTINCT 'site://q/' + CAST(a.Id AS TEXT) + '|Answer Link', v.PostId AS "post_link", v.CreationDate AS "favorited_on_date", v.UserId AS "user_link" FROM Votes AS v INNER JOIN Posts AS a ON a.ParentId = v.PostId WHERE v.VoteTypeId = 5 AND v.UserId = @MyUserID AND a.OwnerUserId = @MyUserID ORDER BY v.CreationDate ... | sede |
CREATE TABLE table_31187 (
"Year" text,
"Universities" real,
"No. of Students Signed up" real,
"% electricity reduction" text,
"Tonnes of CO2 Saved" real,
"\u00a3 Saved" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When 8.9% is the electricity... | SELECT COUNT("Tonnes of CO2 Saved") FROM table_31187 WHERE "% electricity reduction" = '8.9%' | wikisql |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost numbe... | SELECT allergy.drugname FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '007-16517')) AND STRFTIME('%y-%m', allergy.allergytime) >= '2103-10' | eicu |
CREATE TABLE table_name_91 (
swimsuit INTEGER,
evening_gown VARCHAR,
interview VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest swimsuit score of the contestant with an evening gown larger than 9.175 and an interview score less than 8.4... | SELECT MAX(swimsuit) FROM table_name_91 WHERE evening_gown > 9.175 AND interview < 8.425 | sql_create_context |
CREATE TABLE table_name_66 (
runners_up INTEGER,
years_won VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many runners up for the team that won in 1993?
| SELECT MIN(runners_up) FROM table_name_66 WHERE years_won = "1993" | sql_create_context |
CREATE TABLE table_name_68 (
score VARCHAR,
december VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- December smaller than 21, and a Opponent of buffalo sabres had what score?
| SELECT score FROM table_name_68 WHERE december < 21 AND opponent = "buffalo sabres" | sql_create_context |
CREATE TABLE church (
church_id number,
name text,
organized_by text,
open_date number,
continuation_of text
)
CREATE TABLE people (
people_id number,
name text,
country text,
is_male text,
age number
)
CREATE TABLE wedding (
church_id number,
male_id number,
female... | SELECT open_date FROM church GROUP BY open_date HAVING COUNT(*) >= 2 | spider |
CREATE TABLE table_203_196 (
id number,
"terminal" text,
"operator" text,
"depth\n(m)" text,
"berths" number,
"quay length\n(m)" number,
"quay cranes" number,
"area\n(m2)" number,
"capacity\n(kteus)" text
)
-- Using valid SQLite, answer the following questions for the tables provid... | SELECT "operator" FROM table_203_196 WHERE id = 1 | squall |
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 COUNT(*) FROM (SELECT MED_ORG_DEPT_CD FROM t_kc21 WHERE MED_SER_ORG_NO = '5265726' GROUP BY MED_ORG_DEPT_CD HAVING MIN(IN_HOSP_DAYS) > 12) AS T | 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 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.insurance = "Self Pay" AND diagnoses.long_title = "Other preterm infants, 1,250-1,499 grams" | mimicsql_data |
CREATE TABLE jybgb_jyjgzbb (
JYZBLSH number,
YLJGDM text,
jyjgzbb_id number
)
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,
... | 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 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 WHERE demographic.expire_flag = "1" AND demographic.diagnosis = "CHEST PAIN" | mimicsql_data |
CREATE TABLE table_23684 (
"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 mixed doubles when wang yihan won womens singl... | SELECT "Mixed doubles" FROM table_23684 WHERE "Womens singles" = 'Wang Yihan' | wikisql |
CREATE TABLE table_name_6 (
crowd VARCHAR,
home_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the attendance of the North Melbourne's home game?
| SELECT COUNT(crowd) FROM table_name_6 WHERE home_team = "north melbourne" | sql_create_context |
CREATE TABLE table_name_7 (
title VARCHAR,
peak_position VARCHAR,
weeks_on_chart VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the title of the single with the peak position of 10 and weeks on chart is less than 19?
| SELECT title FROM table_name_7 WHERE peak_position = 10 AND weeks_on_chart < 19 | sql_create_context |
CREATE TABLE manufacturers (
code number,
name text,
headquarter text,
founder text,
revenue number
)
CREATE TABLE products (
code number,
name text,
price number,
manufacturer number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Comput... | SELECT AVG(price) FROM products WHERE manufacturer = 2 | spider |
CREATE TABLE Staff (
staff_id INTEGER,
staff_gender VARCHAR(1),
staff_name VARCHAR(80)
)
CREATE TABLE Customers (
customer_id INTEGER,
payment_method_code VARCHAR(10),
customer_code VARCHAR(20),
customer_name VARCHAR(80),
customer_address VARCHAR(255),
customer_phone VARCHAR(80),
... | SELECT product_name, product_price FROM Product_Suppliers AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 3 | nvbench |
CREATE TABLE table_63527 (
"Country" text,
"Date" text,
"Label" text,
"Format" text,
"Catalogue #" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the format for the catalogue number GAD 2014 CD on July 6, 1998?
| SELECT "Format" FROM table_63527 WHERE "Catalogue #" = 'gad 2014 cd' AND "Date" = 'july 6, 1998' | 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 * FROM t_kc22 WHERE MED_CLINIC_ID = '57313662972' AND NOT MED_ORG_DEPT_NM LIKE '%脑部%' | css |
CREATE TABLE table_name_9 (
country VARCHAR,
place VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the country of t1 place player wayne grady?
| SELECT country FROM table_name_9 WHERE place = "t1" AND player = "wayne grady" | sql_create_context |
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
... | SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 94229) AND DATETIME(prescriptions.startdate, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT prescriptions.drug FROM prescriptions WHERE... | mimic_iii |
CREATE TABLE table_40803 (
"Verb" text,
"Proto-Austronesian" text,
"Proto-Malayo-Polynesian" text,
"Proto-Oceanic" text,
"Proto-Polynesian" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the verb for the Proto-Austronesian word *diri?
| SELECT "Verb" FROM table_40803 WHERE "Proto-Austronesian" = '*diri' | wikisql |
CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
CREATE TABLE swimme... | SELECT meter_600, ID FROM swimmer ORDER BY ID | nvbench |
CREATE TABLE table_name_29 (
championship_game VARCHAR,
conference VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the championship game for big eight
| SELECT championship_game FROM table_name_29 WHERE conference = "big eight" | sql_create_context |
CREATE TABLE table_name_98 (
tries VARCHAR,
points VARCHAR,
games VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the tries that has a points of 008 8 and games of 27 27
| SELECT tries FROM table_name_98 WHERE points = "008 8" AND games = "27 27" | sql_create_context |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT jybgb.BGDH FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN person_info_hz_info JOIN person_info 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 person_info_hz_info.KH = hz_info.KH AND pers... | css |
CREATE TABLE table_name_99 (
lost INTEGER,
draw INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many losses have a draw greater than 0?
| SELECT SUM(lost) FROM table_name_99 WHERE draw > 0 | sql_create_context |
CREATE TABLE table_18773 (
"Serial & Branch" real,
"Seaman" text,
"Mechanical" text,
"Secretariat" text,
"Supply" text,
"Electrical" text,
"Radio Electrical" text,
"Regulating" text,
"Medical" text
)
-- Using valid SQLite, answer the following questions for the tables provided abov... | SELECT "Electrical" FROM table_18773 WHERE "Secretariat" = 'PO(W)' | wikisql |
CREATE TABLE table_1182314_5 (
norwegian_americans__2000_ INTEGER,
norwegian_americans__1990_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the maximum norwegian americans (2000) where norwegian americans (1990) is 9170
| SELECT MAX(norwegian_americans__2000_) FROM table_1182314_5 WHERE norwegian_americans__1990_ = 9170 | sql_create_context |
CREATE TABLE table_47693 (
"Rider" text,
"Manufacturer" text,
"Laps" real,
"Time" text,
"Grid" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Time has Laps smaller than 28, and a Rider of nicky hayden?
| SELECT "Time" FROM table_47693 WHERE "Laps" < '28' AND "Rider" = 'nicky hayden' | wikisql |
CREATE TABLE t_kc21 (
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 t_kc21.MED_CLINIC_ID FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '赵凯乐' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2008-08-29' AND '2016-10-19' | css |
CREATE TABLE table_25246990_2 (
no_in_series VARCHAR,
prod_code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What number episode in the series had a production code of 111?
| SELECT no_in_series FROM table_25246990_2 WHERE prod_code = "111" | sql_create_context |
CREATE TABLE table_68536 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the opponent at the game that had a loss of Travers (0 2)?
| SELECT "Opponent" FROM table_68536 WHERE "Loss" = 'travers (0–2)' | wikisql |
CREATE TABLE table_21501518_1 (
song_choice VARCHAR,
original_artist VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Whats the song of name with an original artist Garth Brooks
| SELECT song_choice FROM table_21501518_1 WHERE original_artist = "Garth Brooks" | sql_create_context |
CREATE TABLE table_45141 (
"Episode number Production number" text,
"Title" text,
"Sydney" real,
"Melbourne" real,
"Brisbane" real,
"Adelaide" real,
"Perth" real,
"TOTAL" real,
"WEEKLY RANK" real,
"NIGHTLY RANK" real
)
-- Using valid SQLite, answer the following questions for t... | SELECT MIN("Sydney") FROM table_45141 WHERE "WEEKLY RANK" < '8' AND "Brisbane" > '252,000' | wikisql |
CREATE TABLE table_57219 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the home team that had an opponent of f... | SELECT "Home team" FROM table_57219 WHERE "Away team" = 'footscray' | wikisql |
CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID 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,
meter_700 text,
Time text
)
... | SELECT meter_400, meter_100 FROM swimmer | nvbench |
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype tex... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE NOT admissions.dischtime IS NULL AND STRFTIME('%y', admissions.dischtime) = '2104' | mimic_iii |
CREATE TABLE table_name_95 (
share_of_votes VARCHAR,
electors VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the share of votes when there were more than 56 electors and the year was more recent than 1950?
| SELECT share_of_votes FROM table_name_95 WHERE electors > 56 AND year > 1950 | sql_create_context |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
-- Using valid SQLite, answer the following questions for the... | SELECT T1.Code, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter | nvbench |
CREATE TABLE table_name_64 (
term_of_office VARCHAR,
member VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Term of Office, when Member is 'Dominic Costa'?
| SELECT term_of_office FROM table_name_64 WHERE member = "dominic costa" | sql_create_context |
CREATE TABLE table_34754 (
"Rank" real,
"Player" text,
"Country" text,
"Earnings ( $ )" real,
"Wins" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest earnings of Vijay Singh who had more than 24 wins?
| SELECT MIN("Earnings ( $ )") FROM table_34754 WHERE "Player" = 'vijay singh' AND "Wins" > '24' | wikisql |
CREATE TABLE table_26409328_1 (
title VARCHAR,
production_code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what title was given to the episode with production code 6ajn08?
| SELECT title FROM table_26409328_1 WHERE production_code = "6AJN08" | sql_create_context |
CREATE TABLE table_36269 (
"Stage" text,
"Winner" text,
"General classification" text,
"Points classification" text,
"Mountains classification" text,
"Asian rider classification" text,
"Team classification" text,
"Asian team classification" text
)
-- Using valid SQLite, answer the foll... | SELECT "General classification" FROM table_36269 WHERE "Asian rider classification" = 'shinichi fukushima' AND "Winner" = 'jeremy hunt' | 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 jyjgzbb.JCFF 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 AND... | css |
CREATE TABLE table_17798548_4 (
date_released VARCHAR,
season VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What day was the complete 2nd series: volume one released?
| SELECT date_released FROM table_17798548_4 WHERE season = "The Complete 2nd Series: Volume One" | sql_create_context |
CREATE TABLE table_36735 (
"Rank" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average total for teams with over 3 bronzes and over 8 golds?
| SELECT AVG("Total") FROM table_36735 WHERE "Bronze" > '3' AND "Gold" > '8' | wikisql |
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text... | SELECT COUNT(*) FROM Posts WHERE Id IN (SELECT PostId FROM PostTags WHERE TagId IN ((SELECT Id FROM Tags WHERE TagName LIKE '%ios%'))) | sede |
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 cost (
row_id number... | SELECT SUM(outputevents.value) FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3677)) AND STRFTIME('%y-%m-%d', outputevents.charttime) <= '2100-11-04' | mimic_iii |
CREATE TABLE table_name_9 (
catalog VARCHAR,
country VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What catalog has the United Kingdom as the country?
| SELECT catalog FROM table_name_9 WHERE country = "united kingdom" | sql_create_context |
CREATE TABLE table_name_37 (
goals INTEGER,
matches VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the lowest goal that have goals/matches greater than 0.43 with joachim streich as the name and matches greater than 378?
| SELECT MIN(goals) FROM table_name_37 WHERE goals / matches > 0.43 AND name = "joachim streich" AND matches > 378 | sql_create_context |
CREATE TABLE table_25346763_1 (
capacity VARCHAR,
year_opened VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the capacity for a facility opened in 1956?
| SELECT COUNT(capacity) FROM table_25346763_1 WHERE year_opened = "1956" | sql_create_context |
CREATE TABLE ship (
Ship_ID int,
Name text,
Type text,
Nationality text,
Tonnage int
)
CREATE TABLE mission (
Mission_ID int,
Ship_ID int,
Code text,
Launched_Year int,
Location text,
Speed_knots int,
Fate text
)
-- Using valid SQLite, answer the following questions fo... | SELECT Type, COUNT(Type) FROM ship GROUP BY Type | nvbench |
CREATE TABLE aircraft (
aid number(9,0),
name varchar2(30),
distance number(6,0)
)
CREATE TABLE flight (
flno number(4,0),
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0)
)
CREAT... | SELECT origin, COUNT(*) FROM flight GROUP BY origin | nvbench |
CREATE TABLE table_1997 (
"Rank" real,
"London Borough" text,
"Black African Population" real,
"Black Caribbean Population" real,
"Other Black Population" real,
"Total Black Population" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the ... | SELECT MIN("Black Caribbean Population") FROM table_1997 WHERE "Black African Population" < '10552.0' | wikisql |
CREATE TABLE t_kc24 (
MED_SAFE_PAY_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
REF_SLT_FLG number,
CLINIC_SLT_DATE time,
COMP_ID text,
PERSON_ID text,
FLX_MED_ORG_ID text,
INSU_TYPE text,
MED_AMOUT number,
PER_ACC_PAY number,
OVE_PAY numb... | SELECT MED_INV_ITEM_TYPE FROM t_kc22 WHERE MED_CLINIC_ID = '51918851726' AND SOC_SRT_DIRE_NM = '奥氮平片' | css |
CREATE TABLE table_51514 (
"Channel" real,
"Video" text,
"Aspect" text,
"PSIP Short Name" text,
"Network" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sum of channels for qubo network?
| SELECT SUM("Channel") FROM table_51514 WHERE "Network" = 'qubo' | wikisql |
CREATE TABLE table_19968 (
"Province" text,
"Prefecture" text,
"County" text,
"Tujia Population" real,
"% of Chinas Tujia Population" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When tujia population equals 388035 people and the % of the populati... | SELECT "County" FROM table_19968 WHERE "% of Chinas Tujia Population" = '4.83%' AND "Tujia Population" = '388035' | wikisql |
CREATE TABLE aircraft (
aid number,
name text,
distance number
)
CREATE TABLE certificate (
eid number,
aid number
)
CREATE TABLE employee (
eid number,
name text,
salary number
)
CREATE TABLE flight (
flno number,
origin text,
destination text,
distance number,
de... | SELECT COUNT(DISTINCT eid) FROM certificate | spider |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.