context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_name_63 (
position VARCHAR,
college VARCHAR
) | what is the position of the player from florida? | SELECT position FROM table_name_63 WHERE college = "florida" | sql_create_context |
CREATE TABLE table_30083499_1 (
nationality VARCHAR,
tournament VARCHAR
) | What is the nationality of the 2012 clausura tournament? | SELECT nationality FROM table_30083499_1 WHERE tournament = "2012 Clausura" | sql_create_context |
CREATE TABLE table_name_95 (
home_team VARCHAR,
away_team VARCHAR
) | WHAT IS THE HOME TEAM WITH AN AWAY OF LEYTON ORIENT? | SELECT home_team FROM table_name_95 WHERE away_team = "leyton orient" | sql_create_context |
CREATE TABLE table_name_64 (
filename_extension VARCHAR,
image_support VARCHAR,
interactivity_support VARCHAR,
open_standard VARCHAR
) | Which Filename extension has an Interactivity support of no, an Open standard of yes, and an Image support of no? | SELECT filename_extension FROM table_name_64 WHERE interactivity_support = "no" AND open_standard = "yes" AND image_support = "no" | sql_create_context |
CREATE TABLE table_203_695 (
id number,
"draw" number,
"artist" text,
"song" text,
"points" number,
"place" text
) | which artist came in last place in the national final ? | SELECT "artist" FROM table_203_695 ORDER BY "place" DESC LIMIT 1 | squall |
CREATE TABLE table_16285 (
"Rnd" text,
"Race Name" text,
"Circuit" text,
"City/Location" text,
"Date" text,
"Pole position" text,
"Fastest lap" text,
"Winning driver" text,
"Winning team" text,
"Report" text
) | How many rounds were there of the Bosch Spark Plug Grand Prix? | SELECT COUNT("Rnd") FROM table_16285 WHERE "Race Name" = 'Bosch Spark Plug Grand Prix' | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
... | for patient albert bauer, specify the type and name of drug he was treated with | SELECT prescriptions.drug_type, prescriptions.drug FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.name = "Albert Bauer" | mimicsql_data |
CREATE TABLE table_18341 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | what year was the first elected incumbant Sidney R. Yates? | SELECT "First elected" FROM table_18341 WHERE "Incumbent" = 'Sidney R. Yates' | wikisql |
CREATE TABLE table_name_44 (
win_percentage VARCHAR,
team VARCHAR
) | What is the Win% of the 1989-90 Team? | SELECT win_percentage FROM table_name_44 WHERE team = "1989-90" | sql_create_context |
CREATE TABLE table_23248420_1 (
county VARCHAR,
population VARCHAR
) | When 31901 is the population what is the county? | SELECT county FROM table_23248420_1 WHERE population = 31901 | sql_create_context |
CREATE TABLE table_2657 (
"Outcome" text,
"Year" real,
"Championship" text,
"Surface" text,
"Partner" text,
"Opponents in the final" text,
"Score in the final" text
) | What is the surface made of if the year is 1979 and the championship is US Open? | SELECT "Surface" FROM table_2657 WHERE "Championship" = 'US Open' AND "Year" = '1979' | wikisql |
CREATE TABLE table_24729_2 (
power VARCHAR,
co2 VARCHAR
) | when co2 is 192g/km, what is the power? | SELECT power FROM table_24729_2 WHERE co2 = "192g/km" | sql_create_context |
CREATE TABLE table_name_20 (
winner VARCHAR,
runner_up VARCHAR
) | Who was the Winner when the Runner-up was Real Salt Lake? | SELECT winner FROM table_name_20 WHERE runner_up = "real salt lake" | sql_create_context |
CREATE TABLE table_63034 (
"Pick" real,
"Player" text,
"Team" text,
"Position" text,
"School" text
) | Jason Romano played for what team? | SELECT "Team" FROM table_63034 WHERE "Player" = 'jason romano' | wikisql |
CREATE TABLE table_60273 (
"Model" text,
"Year" text,
"Type" text,
"Engine" text,
"Displacement cc" text
) | What is the CC displacement for 1965? | SELECT "Displacement cc" FROM table_60273 WHERE "Year" = '1965' | wikisql |
CREATE TABLE table_34335 (
"Name" text,
"Hanzi" text,
"Origin" text,
"Launch" real,
"Owner" text
) | What is the origin for the launch taking place in 2010? | SELECT "Origin" FROM table_34335 WHERE "Launch" = '2010' | wikisql |
CREATE TABLE table_name_73 (
station VARCHAR,
services VARCHAR,
zone_2008 VARCHAR,
zone_2007 VARCHAR
) | Which Station has a Zone 2008 of 8, and a Zone 2007 of outside zones, and Services of london overground? | SELECT station FROM table_name_73 WHERE zone_2008 = "8" AND zone_2007 = "outside zones" AND services = "london overground" | 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 lab (
labid numbe... | what was the daily maximum dose of bumetanide volume that patient 006-147098 was taking during their first hospital encounter? | SELECT MAX(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 = '006-147098' AND NOT patient.hospitaldischargetim... | eicu |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE regions (
REGION_ID... | For those employees who did not have any job in the past, give me the comparison about the average of employee_id over the hire_date bin hire_date by weekday, and show in ascending by the y axis. | SELECT HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY AVG(EMPLOYEE_ID) | nvbench |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE txmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
K... | 之前患者22027901的门诊诊断有哪些? | SELECT txmzjzjlb.JZZDBM, txmzjzjlb.JZZDSM FROM hz_info JOIN txmzjzjlb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX WHERE hz_info.RYBH = '22027901' UNION SELECT ftxmzjzjlb.JZZDBM, ftxmzjzjlb.JZZDSM FROM hz_info JOIN ftxmzjzjlb ON hz_info.YLJGDM = ftxmzjzjlb.YLJGDM AN... | css |
CREATE TABLE table_name_47 (
league_a VARCHAR,
fa_cup VARCHAR
) | What shows for the League when the FA Cup is 6 (20)? | SELECT league_a FROM table_name_47 WHERE fa_cup = "6 (20)" | sql_create_context |
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
)
CREATE TABLE Dorm_amenity (
amenid INTEGER,
amenity_name VARCHAR(25)
)
CREATE TABLE Has_amenity (
dormid INTEGER,
... | Find the average age of students living in each city with a bar chart, and show in asc by the the average of age. | SELECT city_code, AVG(Age) FROM Student GROUP BY city_code ORDER BY AVG(Age) | nvbench |
CREATE TABLE table_2562572_9 (
cyrillic_name_other_names VARCHAR,
population__2011_ VARCHAR
) | What is the cyrillic name for the settlement with the population of 5414? | SELECT cyrillic_name_other_names FROM table_2562572_9 WHERE population__2011_ = 5414 | 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 prescription... | what is days of hospital stay and drug type of subject id 52012? | SELECT demographic.days_stay, prescriptions.drug_type FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.subject_id = "52012" | mimicsql_data |
CREATE TABLE table_name_37 (
bronze INTEGER,
total VARCHAR,
nation VARCHAR,
silver VARCHAR,
gold VARCHAR
) | What is the smallest bronze with a Silver smaller than 2, and a Gold of 1, and a Nation of western isles, and a Total larger than 6? | SELECT MIN(bronze) FROM table_name_37 WHERE silver < 2 AND gold = 1 AND nation = "western isles" AND total > 6 | sql_create_context |
CREATE TABLE Staff (
date_left_staff VARCHAR,
first_name VARCHAR,
last_name VARCHAR
) | When did the staff member with first name as Janessa and last name as Sawayn leave the company? | SELECT date_left_staff FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn" | sql_create_context |
CREATE TABLE table_name_35 (
player VARCHAR,
score VARCHAR
) | What player scored 70-72-70=212? | SELECT player FROM table_name_35 WHERE score = 70 - 72 - 70 = 212 | sql_create_context |
CREATE TABLE wine (
No INTEGER,
Grape TEXT,
Winery TEXT,
Appelation TEXT,
State TEXT,
Name TEXT,
Year INTEGER,
Price INTEGER,
Score INTEGER,
Cases INTEGER,
Drink TEXT
)
CREATE TABLE grapes (
ID INTEGER,
Grape TEXT,
Color TEXT
)
CREATE TABLE appellations (
No... | A bar chart listing the number of wines whose price is bigger than 100 ordered by year. | SELECT Year, COUNT(Year) FROM wine WHERE Price > 100 GROUP BY Year ORDER BY Year | nvbench |
CREATE TABLE table_204_194 (
id number,
"outcome" text,
"edition" number,
"round" text,
"opponent team" text,
"surface" text,
"opponent" text,
"score" text
) | what is the other year slovakia played besides 2010 ? | SELECT "edition" FROM table_204_194 WHERE "opponent team" = 'slovakia' AND "edition" <> 2010 | squall |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CRE... | when was the last time that patient 021-80293 had a minimum heartrate on the current icu visit? | 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 = '021-80293') AND patient.unitdischargetime IS NULL) ... | eicu |
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTy... | Comments within 24 hours by high-rep users. | SELECT DATE(c.CreationDate) AS Days, COUNT(c.Id) AS CountOfComments FROM Comments AS c INNER JOIN Users AS u ON c.UserId = u.Id WHERE u.Reputation > '##HighRepBorder:int##' AND EXISTS(SELECT 1 FROM Posts AS p WHERE CAST((JULIANDAY(CreationDate) - JULIANDAY(p.CreationDate)) AS INT) < 24 AND p.Id = c.PostId) GROUP BY DAT... | sede |
CREATE TABLE table_49761 (
"Team 1" text,
"Score" text,
"Team 2" text,
"1st round" text,
"2nd round" text
) | What was the team 1 when Red Star (D1) was team 2? | SELECT "Team 1" FROM table_49761 WHERE "Team 2" = 'red star (d1)' | wikisql |
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE T... | can you list all flights from CHICAGO to ST. LOUIS that depart after 1200 | 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_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ST. LOUIS' AND flight.departure_time > 1200 AND flight.to_airport = AIRPORT_SERVICE_1.air... | atis |
CREATE TABLE table_26638600_3 (
circuit VARCHAR,
lites_1_race_two_winning_team VARCHAR
) | On which circuit was the lites race two winning team #13 Inspire Motorsports? | SELECT circuit FROM table_26638600_3 WHERE lites_1_race_two_winning_team = "#13 Inspire Motorsports" | sql_create_context |
CREATE TABLE table_name_5 (
draw VARCHAR,
team VARCHAR
) | What is the Draw for skra warszawa? | SELECT draw FROM table_name_5 WHERE team = "skra warszawa" | sql_create_context |
CREATE TABLE table_27097 (
"#" real,
"Title" text,
"Director" text,
"Writer(s)" text,
"Viewers" text,
"Air date" text,
"Production code" real
) | When 6.66 is the amount of viewers what is the lowest production code? | SELECT MIN("Production code") FROM table_27097 WHERE "Viewers" = '6.66' | wikisql |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE microlab (
microlabid number,
... | what is the number of times that patient 032-8005 had had a enteral/gastric tube intake #1 intake until 33 months ago? | SELECT COUNT(*) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '032-8005')) AND intakeoutput.cellpath LIKE '%intake%' AND intakeoutput.cel... | eicu |
CREATE TABLE table_57512 (
"Date of Issue" text,
"Theme" text,
"Design" text,
"Illustration" text,
"Paper Type" text,
"First Day Cover Cancellation" text
) | What is the Illustration with a Design of tim nokes, and a First Day Cover Cancellation with calgary, alberta? | SELECT "Illustration" FROM table_57512 WHERE "Design" = 'tim nokes' AND "First Day Cover Cancellation" = 'calgary, alberta' | wikisql |
CREATE TABLE table_name_85 (
attendance INTEGER,
record VARCHAR,
opponents VARCHAR
) | What was the highest attendance for the game where the record was 0-5 and the opponents scored more than 20 points? | SELECT MAX(attendance) FROM table_name_85 WHERE record = "0-5" AND opponents > 20 | sql_create_context |
CREATE TABLE table_name_49 (
Id VARCHAR
) | What 2009 has 18.5% as the 2007? | SELECT 2009 FROM table_name_49 WHERE 2007 = "18.5%" | sql_create_context |
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 diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
... | what is the yearly minimum intake of .9% normal saline that patient 23721 is getting since 109 months ago? | SELECT MIN(inputevents_cv.amount) 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 = 23721)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.lab... | mimic_iii |
CREATE TABLE table_68584 (
"Game" real,
"Date" text,
"Score" text,
"Location" text,
"Time" text,
"Attendance" real
) | Score of new york yankees 2, brooklyn dodgers 3 involves how many number of games? | SELECT COUNT("Game") FROM table_68584 WHERE "Score" = 'new york yankees – 2, brooklyn dodgers – 3' | wikisql |
CREATE TABLE table_68721 (
"Name" text,
"Years" text,
"League" text,
"FA Cup" text,
"League Cup" text,
"Europe" text,
"Other [C ]" text,
"Total" text
) | The other [C] of 0 12 0 (0) belongs to what FA Cup? | SELECT "FA Cup" FROM table_68721 WHERE "Other [C ]" = '0 12 0 (0)' | wikisql |
CREATE TABLE table_15247 (
"Goal" real,
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) | What was the final score in a 2002 fifa world cup qualification that was less than 10? | SELECT "Result" FROM table_15247 WHERE "Competition" = '2002 fifa world cup qualification' AND "Goal" < '10' | wikisql |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | how many white patients were admitted before the year 2150? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "WHITE" AND demographic.admityear < "2150" | mimicsql_data |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE medication (
medication... | indicate the yearly average volume of ventric #1 that patient 006-99708 has had since 125 months ago. | SELECT AVG(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 = '006-99708')) AND intakeoutput.celllabel = 'ventr... | eicu |
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,
... | when was the first time that in the last hospital encounter patient 025-50079 was prescribed a medicine via an sl route? | SELECT 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 = '025-50079' AND NOT patient.hospitaldischargetime IS NULL ORDER... | eicu |
CREATE TABLE table_name_36 (
start VARCHAR,
laps VARCHAR,
rank VARCHAR
) | What is the start number for a rank 11 race with less than 200 laps? | SELECT start FROM table_name_36 WHERE laps < 200 AND rank = "11" | sql_create_context |
CREATE TABLE party_events (
event_id number,
event_name text,
party_id number,
member_in_charge_id number
)
CREATE TABLE party (
party_id number,
minister text,
took_office text,
left_office text,
region_id number,
party_name text
)
CREATE TABLE region (
region_id number,
... | List member names and their party names. | SELECT T1.member_name, T2.party_name FROM member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id | spider |
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_descriptio... | show me flights from BOSTON to BALTIMORE COACH on wednesday about 12 noon | 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, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, fare, fare_basis AS FARE_BASIS_0, fare_basis AS FARE_BASIS_1, flight, flight_fare WHERE (((DAT... | atis |
CREATE TABLE table_45348 (
"Date" text,
"Tournament" text,
"Winning score" text,
"Margin of victory" text,
"Runner(s)-up" text
) | What was the margin of victory at the LPGA Championship? | SELECT "Margin of victory" FROM table_45348 WHERE "Tournament" = 'lpga championship' | wikisql |
CREATE TABLE SportsInfo (
StuID INTEGER,
SportName VARCHAR(32),
HoursPerWeek INTEGER,
GamesPlayed INTEGER,
OnScholarship VARCHAR(1)
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
... | Show last names for all student who are on scholarship, and count them by a bar chart, I want to display from low to high by the names please. | SELECT LName, COUNT(LName) FROM SportsInfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.OnScholarship = 'Y' GROUP BY LName ORDER BY LName | nvbench |
CREATE TABLE table_25177625_1 (
height VARCHAR,
position VARCHAR,
year VARCHAR
) | What was the height of this Freshman with a forward position? | SELECT height FROM table_25177625_1 WHERE position = "Forward" AND year = "Freshman" | sql_create_context |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | 找出和检验指标记录27389219857相同的检测指标结果定量单位与检测指标名称,有哪些检测指标结果定量小于其的检验指标记录? | SELECT * FROM jyjgzbb WHERE jyjgzbb.JCZBMC = (SELECT jyjgzbb.JCZBMC FROM jyjgzbb WHERE jyjgzbb.JYZBLSH = '27389219857') AND jyjgzbb.JCZBJGDW = (SELECT jyjgzbb.JCZBJGDW FROM jyjgzbb WHERE jyjgzbb.JYZBLSH = '27389219857') AND jyjgzbb.JCZBJGDL < (SELECT jyjgzbb.JCZBJGDL FROM jyjgzbb WHERE jyjgzbb.JYZBLSH = '27389219857') | css |
CREATE TABLE table_14181578_1 (
points INTEGER,
goals_for_against VARCHAR
) | what is the minimum points with goals for/against being 8-5 | SELECT MIN(points) FROM table_14181578_1 WHERE goals_for_against = "8-5" | sql_create_context |
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTask... | All posts with answers > 5. | SELECT questions.Id AS question_id, questions.OwnerUserId AS questioner_id, questions.Body AS question_body, questions.CreationDate AS question_creation_date, answers.Id AS answer_id, answers.Body AS answer_body, answers.ParentId AS parent_id, answers.Score AS answer_score, answers.OwnerUserId AS respondant_id, answers... | sede |
CREATE TABLE table_16129 (
"No." real,
"#" real,
"Title" text,
"Director" text,
"Writer" text,
"US air date" text,
"Storyteller" text,
"Villains" text
) | Who wrote Episode #3? | SELECT "Writer" FROM table_16129 WHERE "#" = '3' | wikisql |
CREATE TABLE table_name_55 (
set_5 VARCHAR,
set_3 VARCHAR
) | What is the set 5 with a 25-23 set 3? | SELECT set_5 FROM table_name_55 WHERE set_3 = "25-23" | 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
) | For those records from the products and each product's manufacturer, visualize a scatter chart about the correlation between code and revenue , and group by attribute name. | SELECT T1.Code, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Name | nvbench |
CREATE TABLE player (
Player_ID int,
name text,
Position text,
Club_ID int,
Apps real,
Tries real,
Goals text,
Points real
)
CREATE TABLE competition_result (
Competition_ID int,
Club_ID_1 int,
Club_ID_2 int,
Score text
)
CREATE TABLE competition (
Competition_ID in... | Show me the number of country by country in a histogram, sort by the bar in asc. | SELECT Country, COUNT(Country) FROM competition GROUP BY Country ORDER BY Country | nvbench |
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 SUM(gwyjzb.MED_AMOUT) FROM gwyjzb WHERE gwyjzb.PERSON_NM = '华依波' AND gwyjzb.CLINIC_TYPE = '门诊' UNION SELECT SUM(fgwyjzb.MED_AMOUT) FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '华依波' AND fgwyjzb.CLINIC_TYPE = '门诊' | css |
CREATE TABLE table_80187 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | Name the score for vijay singh | SELECT "Score" FROM table_80187 WHERE "Player" = 'vijay singh' | wikisql |
CREATE TABLE table_32366 (
"Name" text,
"Team" text,
"Qual 1" text,
"Qual 2" text,
"Best" text
) | What is the qual 1 for rusport and had a best of 58.665? | SELECT "Qual 1" FROM table_32366 WHERE "Team" = 'rusport' AND "Best" = '58.665' | 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,
... | 统计医疗记录中年龄大于17岁的患者的匀整医务费总金额是多少? | 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_2181798_1 (
year VARCHAR,
avg_finish VARCHAR
) | Name the number of years for 18.5 | SELECT COUNT(year) FROM table_2181798_1 WHERE avg_finish = "18.5" | sql_create_context |
CREATE TABLE table_79398 (
"Olympics" text,
"Name" text,
"Country" text,
"Medal" text,
"Event" text
) | Which event is in the 1952 summer olympics? | SELECT "Event" FROM table_79398 WHERE "Olympics" = '1952 summer olympics' | wikisql |
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
arrival_time int,
arrival_airline text,
arrival_flight_number int,
departure_time int,
departure_airline text,
departure_flight_number int,
stop_time int
)
CREATE TABLE aircraft (
... | what are the flights from DALLAS to SAN FRANCISCO on tuesday 10 1 | 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, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND date_day.day_number = 1 AND date_day.month_number = 10... | atis |
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... | 列出在05年2月7日到2015年9月7日内03628207患者被开出的所有检验报告单的检验报告单号是多少? | SELECT jybgb.BGDH FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN hz_info_mzjzjlb ON hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info... | css |
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
)
... | what is the number of patients whose year of birth is less than 2120 and lab test fluid is pleural? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2120" AND lab.fluid = "Pleural" | mimicsql_data |
CREATE TABLE table_53025 (
"Name" text,
"Real Name" text,
"Birthdate" text,
"Costume Role" text,
"Defining characteristics" text
) | What is the birth date of the member with the Defining characteristic of pink hair? | SELECT "Birthdate" FROM table_53025 WHERE "Defining characteristics" = 'pink hair' | wikisql |
CREATE TABLE table_25926120_7 (
awardee_s_ VARCHAR,
name_of_award VARCHAR
) | who are the awardees when the name of award is best agricultural film? | SELECT awardee_s_ FROM table_25926120_7 WHERE name_of_award = "Best Agricultural Film" | sql_create_context |
CREATE TABLE furniture (
Furniture_ID int,
Name text,
Num_of_Component int,
Market_Rate real
)
CREATE TABLE manufacturer (
Manufacturer_ID int,
Open_Year real,
Name text,
Num_of_Factories int,
Num_of_Shops int
)
CREATE TABLE furniture_manufacte (
Manufacturer_ID int,
Furnit... | Give me the names and prices of furnitures which some companies are manufacturing with a bar chart, and rank in descending by the Price_in_Dollar. | SELECT Name, Price_in_Dollar FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID ORDER BY Price_in_Dollar DESC | nvbench |
CREATE TABLE follows (
f1 int(11),
f2 int(11)
)
CREATE TABLE tweets (
id bigint(20),
uid int(11),
text char(140),
createdate datetime
)
CREATE TABLE user_profiles (
uid int(11),
name varchar(255),
email varchar(255),
partitionid int(11),
followers int(11)
) | Find the name and partition id for users who tweeted less than twice Show bar chart, and could you sort by the total number in ascending? | SELECT name, partitionid FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid ORDER BY partitionid | nvbench |
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE procedures_icd (
r... | how many hours have passed since patient 12726 had a d5w intake for the first time on the current icu visit? | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', 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 = 12726) AND icustays.outtime IS NULL)... | mimic_iii |
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... | 患者戚绮玉被开出的药品都不高出4979.12元在哪几次医疗记录中?医疗就诊序列号分别都是多少? | SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_NM = '戚绮玉' AND NOT MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc22 WHERE AMOUNT > 4979.12) | css |
CREATE TABLE Document_Structures (
document_structure_code VARCHAR(15),
parent_document_structure_code VARCHAR(15),
document_structure_description VARCHAR(80)
)
CREATE TABLE Documents (
document_code VARCHAR(15),
document_structure_code VARCHAR(15),
document_type_code VARCHAR(15),
access_co... | Return a histogram on what are the different role codes for users, and how many users have each?, rank by the total number in ascending please. | SELECT role_code, COUNT(*) FROM Users GROUP BY role_code ORDER BY COUNT(*) | nvbench |
CREATE TABLE table_56844 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" real,
"Record" text
) | What date was Colorado the home team? | SELECT "Date" FROM table_56844 WHERE "Home" = 'colorado' | wikisql |
CREATE TABLE table_26194 (
"Year" real,
"Division" real,
"League" text,
"Regular Season" text,
"Playoffs" text,
"Open Cup" text
) | Name the regular season for final playoffs | SELECT "Regular Season" FROM table_26194 WHERE "Playoffs" = 'Final' | wikisql |
CREATE TABLE table_17325580_5 (
score VARCHAR,
team VARCHAR
) | what was the final score of the game versus Milwaukee? | SELECT score FROM table_17325580_5 WHERE team = "Milwaukee" | sql_create_context |
CREATE TABLE table_204_665 (
id number,
"rank" number,
"name" text,
"notability" text,
"birthplace" text,
"advocate" text
) | how many canadians listed were born in scotland ? | SELECT COUNT(*) FROM table_204_665 WHERE "birthplace" = 'scotland' | squall |
CREATE TABLE PROFESSOR (
EMP_NUM int,
DEPT_CODE varchar(10),
PROF_OFFICE varchar(50),
PROF_EXTENSION varchar(4),
PROF_HIGH_DEGREE varchar(5)
)
CREATE TABLE CLASS (
CLASS_CODE varchar(5),
CRS_CODE varchar(10),
CLASS_SECTION varchar(2),
CLASS_TIME varchar(20),
CLASS_ROOM varchar(8... | How many courses for each office? Show me a stacked bar chart The x-axis is office name and group by course description, list by the y-axis in ascending. | SELECT PROF_OFFICE, COUNT(PROF_OFFICE) FROM CLASS AS T1 JOIN EMPLOYEE AS T2 ON T1.PROF_NUM = T2.EMP_NUM JOIN COURSE AS T3 ON T1.CRS_CODE = T3.CRS_CODE JOIN PROFESSOR AS T4 ON T2.EMP_NUM = T4.EMP_NUM GROUP BY CRS_DESCRIPTION, PROF_OFFICE ORDER BY COUNT(PROF_OFFICE) | nvbench |
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
... | Answers on Post 38210 What non-programming books should programmers read?. how long before I get tag badges? | SELECT * FROM Posts WHERE Posts.ParentId = 38210 ORDER BY Posts.Score DESC | sede |
CREATE TABLE table_name_62 (
date VARCHAR,
michael_signer VARCHAR
) | On which date did Michael Signer earn 4%? | SELECT date FROM table_name_62 WHERE michael_signer = "4%" | sql_create_context |
CREATE TABLE table_27937 (
"meas. num." real,
"passed" text,
"YES votes" real,
"NO votes" real,
"% YES" text,
"Const. Amd.?" text,
"type" text,
"description" text
) | What vote passed for the measure with the description, authorizing state acceptance of certain gifts? | SELECT "passed" FROM table_27937 WHERE "description" = 'Authorizing State Acceptance of Certain Gifts' | 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... | when was the first time patient 28443's intake time on this month/23? | 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 = 28443)) AND DATETIME(inputevents_cv.charttime, 'start of month') = DATETIME(CURRENT_TIME(), ... | mimic_iii |
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 demographic (
subject_id text,
hadm_id t... | give me the number of dead patients who had newborn primary disease. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.expire_flag = "1" AND demographic.diagnosis = "NEWBORN" | mimicsql_data |
CREATE TABLE table_21770 (
"P" real,
"Player" text,
"Position" text,
"League" real,
"Copa del Rey" real,
"Champions League" real,
"Total" real
) | if p is bigger than 4.0 what is total number | SELECT COUNT("Total") FROM table_21770 WHERE "P" > '4.0' | wikisql |
CREATE TABLE table_name_20 (
home_team VARCHAR,
venue VARCHAR
) | Who was the home team for the game played at Corio Oval? | SELECT home_team FROM table_name_20 WHERE venue = "corio oval" | sql_create_context |
CREATE TABLE table_25740774_1 (
season INTEGER,
podiums INTEGER
) | What is the season with podiums more than 2.0? | SELECT MAX(season) FROM table_25740774_1 WHERE podiums > 2.0 | 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 ... | on this hospital encounter how many hours has it been since when patient 95892 received a pt lab test for the first time? | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', labevents.charttime)) FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'pt') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 95892 AND admissions.disc... | mimic_iii |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code tex... | how many prescription cases of 50 ml flex cont : magnesium sulfate 4% ij soln were made a year before? | SELECT COUNT(*) FROM medication WHERE medication.drugname = '50 ml flex cont : magnesium sulfate 4% ij soln' AND DATETIME(medication.drugstarttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') | eicu |
CREATE TABLE table_12694 (
"Player" text,
"Position" text,
"Ekstraklasa" real,
"Polish Cup" real,
"UEFA Cup" real
) | What position did tomasz kie bowicz play? | SELECT "Position" FROM table_12694 WHERE "Player" = 'tomasz kiełbowicz' | wikisql |
CREATE TABLE country (
Country_ID int,
Name text,
Population int,
Area int,
Languages text
)
CREATE TABLE roller_coaster (
Roller_Coaster_ID int,
Name text,
Park text,
Country_ID int,
Length real,
Height real,
Speed text,
Opened text,
Status text
) | Show the names of countries and the average speed of roller coasters from each country Plot them as bar chart, and could you show y-axis from high to low order? | SELECT T1.Name, AVG(T2.Speed) FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID GROUP BY T1.Name ORDER BY AVG(T2.Speed) DESC | nvbench |
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... | 在2008年3月25日到2010年1月16日内列出患者14901191在医院1058628中被开出的所有药品编码和名称都是什么? | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 WHERE t_kc22.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_ID = '14901191' AND t_kc22.t_kc21_MED_SER_ORG_NO = '1058628' AND t_kc22.t_kc21_IN_HOSP_DATE BETWEEN '2008-03-25' AND '2010-01-16') | 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
)
... | show me the number of patients with abnormal lab test status who have been diagnosed with drug-induced delirium. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Drug-induced delirium" AND lab.flag = "abnormal" | mimicsql_data |
CREATE TABLE table_name_77 (
party VARCHAR,
years_in_assembly VARCHAR,
name VARCHAR
) | Which Party has Years in Assembly of 2008 present, and a Name of tom ammiano? | SELECT party FROM table_name_77 WHERE years_in_assembly = "2008–present" AND name = "tom ammiano" | sql_create_context |
CREATE TABLE table_name_38 (
league VARCHAR,
number VARCHAR,
record VARCHAR
) | What league has a number less than 122, and least wins as the record? | SELECT league FROM table_name_38 WHERE number < 122 AND record = "least wins" | sql_create_context |
CREATE TABLE table_25859 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | Name the score for december 27 | SELECT COUNT("Score") FROM table_25859 WHERE "Date" = 'December 27' | wikisql |
CREATE TABLE table_59218 (
"Physical property" text,
"Helium" text,
"Neon" text,
"Argon" text,
"Krypton" text,
"Xenon" text
) | Which Physical property has a Helium of 0.0693? | SELECT "Physical property" FROM table_59218 WHERE "Helium" = '0.0693' | wikisql |
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM... | 查查27129454这个病患过往住院诊断证明 | SELECT zyjzjlb.ZYZDBM, zyjzjlb.ZYZDMC FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.RYBH = '27129454' | css |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.