context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_25730123_2 (
player VARCHAR,
extra_points VARCHAR,
points VARCHAR
) | Name the player/s when there were 20 points with less than 1.0 extra point . | SELECT player FROM table_25730123_2 WHERE extra_points < 1.0 AND points = 20 | sql_create_context |
CREATE TABLE table_name_49 (
opponent VARCHAR,
date VARCHAR
) | Who was the opponent in the September 20, 2010 match? | SELECT opponent FROM table_name_49 WHERE date = "september 20, 2010" | sql_create_context |
CREATE TABLE table_44928 (
"Season" text,
"Club" text,
"Country" text,
"Apps." real,
"Goals" real,
"Assists" real
) | what is the assists when the club is chicago fire and goals is more than 2? | SELECT SUM("Assists") FROM table_44928 WHERE "Club" = 'chicago fire' AND "Goals" > '2' | wikisql |
CREATE TABLE table_2508633_11 (
nfl_team VARCHAR,
college VARCHAR
) | What are the NFL Teams in College North Texas State? | SELECT nfl_team FROM table_2508633_11 WHERE college = "North Texas State" | 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... | for patient id 2560, specify the admission type and lab test abnormal status | SELECT demographic.admission_type, lab.flag FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.subject_id = "2560" | mimicsql_data |
CREATE TABLE table_4191 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real
) | How many episodes of the season had the title, 'world's greatest dick'? | SELECT COUNT("No. in season") FROM table_4191 WHERE "Title" = 'World''s Greatest Dick' | wikisql |
CREATE TABLE table_50343 (
"Callsign" text,
"Area served" text,
"Band" text,
"Freq currently" text,
"Purpose" text
) | What is the Freq currently of the 4GG Callsign? | SELECT "Freq currently" FROM table_50343 WHERE "Callsign" = '4gg' | wikisql |
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 ... | Posts about nginx and lua. | SELECT Title, Posts.Id AS "post_link" FROM Posts RIGHT JOIN (SELECT Posts.Id AS selid FROM Posts JOIN PostTags ON PostId = Posts.Id JOIN Tags ON PostTags.TagId = Tags.Id WHERE Tags.TagName = 'nginx' OR Tags.TagName = 'haproxy' GROUP BY Posts.Id HAVING COUNT(Posts.Id) > 1) AS tmp1 ON Posts.Id = tmp1.selid JOIN PostLinks... | sede |
CREATE TABLE table_70758 (
"Class" text,
"Type" text,
"Names" text,
"Quantity made" text,
"Manufacturer" text,
"Date made" text
) | What is the date of the locomotive with a Waterford class? | SELECT "Date made" FROM table_70758 WHERE "Class" = 'waterford' | wikisql |
CREATE TABLE table_78211 (
"Date" text,
"Competition" text,
"Venue" text,
"Result" text,
"Score" text,
"Tries" text,
"Goals" text
) | What were the tries on 14/6/97? | SELECT "Tries" FROM table_78211 WHERE "Date" = '14/6/97' | wikisql |
CREATE TABLE table_14770 (
"Gersdorf" text,
"Gershausen" text,
"Heddersdorf" text,
"Kemmerode" text,
"Kirchheim" text,
"Reckerode ****" text,
"Reimboldsh." text,
"Rotterterode" text,
"Willingshain" text
) | What Rotterterrode has a Reimboldsh 80? | SELECT "Rotterterode" FROM table_14770 WHERE "Reimboldsh." = '80' | wikisql |
CREATE TABLE table_71732 (
"Hull No." real,
"Year" real,
"Project" text,
"Length overall in meters (without bowsprit)" real,
"Name" text,
"Destination" text
) | Name the sum of hull number for italy and year more than 1999 | SELECT SUM("Hull No.") FROM table_71732 WHERE "Destination" = 'italy' AND "Year" > '1999' | 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... | 住院就诊中开出的检验报告单88852897778患者对应的姓名是什么? | 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 = '8... | css |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
... | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, show me about the distribution of hire_date and the average of department_id bin hire_date by time in a bar chart. | SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 | nvbench |
CREATE TABLE table_name_81 (
winning_score VARCHAR,
margin_of_victory VARCHAR
) | What was the winning score with a margin victory of 2 strokes? | SELECT winning_score FROM table_name_81 WHERE margin_of_victory = "2 strokes" | sql_create_context |
CREATE TABLE table_70181 (
"Year" real,
"Chassis" text,
"Engine(s)" text,
"Tyres" text,
"Points" real
) | Which tyres received 8 points? | SELECT "Tyres" FROM table_70181 WHERE "Points" = '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 lab (
subject_id text,
hadm_id text,
... | give me the number of patients whose admission location is phys referral/normal deli and drug name is sertraline? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND prescriptions.drug = "Sertraline" | mimicsql_data |
CREATE TABLE table_name_34 (
winners VARCHAR,
runners_up VARCHAR
) | Who was the winner when the runner-up was Guangzhou Apollo? | SELECT winners FROM table_name_34 WHERE runners_up = "guangzhou apollo" | 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 Allergy_Type (
Allergy VARCHAR(20),
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGE... | Show all cities and corresponding number of students by a bar chart, and I want to display by the Y in desc. | SELECT city_code, COUNT(*) FROM Student GROUP BY city_code ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE table_1745843_10 (
part_4 VARCHAR,
verb_meaning VARCHAR
) | How many verbs mean to bear | SELECT COUNT(part_4) FROM table_1745843_10 WHERE verb_meaning = "to bear" | sql_create_context |
CREATE TABLE table_48382 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
) | Name the CFL Team which has a Player of chris evraire? | SELECT "CFL Team" FROM table_48382 WHERE "Player" = 'chris evraire' | wikisql |
CREATE TABLE table_25800134_4 (
director VARCHAR,
series__number VARCHAR
) | How many directors worked on #158? | SELECT COUNT(director) FROM table_25800134_4 WHERE series__number = 158 | sql_create_context |
CREATE TABLE table_19401346_1 (
no_in_season VARCHAR,
original_air_date VARCHAR
) | What's the season number of the episode originally aired on October 14, 2008? | SELECT no_in_season FROM table_19401346_1 WHERE original_air_date = "October 14, 2008" | sql_create_context |
CREATE TABLE bank (
branch_ID int,
bname varchar(20),
no_of_customers int,
city varchar(10),
state varchar(20)
)
CREATE TABLE loan (
loan_ID varchar(3),
loan_type varchar(15),
cust_ID varchar(3),
branch_ID varchar(3),
amount int
)
CREATE TABLE customer (
cust_ID varchar(3),... | Find the name and credit score of the customers who have some loans, sort in descending by the cust_name. | SELECT cust_name, credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_ID = T2.cust_ID ORDER BY cust_name DESC | nvbench |
CREATE TABLE table_8589 (
"Train No." text,
"Train Name" text,
"From" text,
"Arrival" text,
"Runs On" text
) | What train arrives from Kazipet? | SELECT "Train Name" FROM table_8589 WHERE "From" = 'kazipet' | wikisql |
CREATE TABLE Member_of (
FacID INTEGER,
DNO INTEGER,
Appt_Type VARCHAR(15)
)
CREATE TABLE Minor_in (
StuID INTEGER,
DNO INTEGER
)
CREATE TABLE Department (
DNO INTEGER,
Division VARCHAR(2),
DName VARCHAR(25),
Room VARCHAR(5),
Building VARCHAR(13),
DPhone INTEGER
)
CREATE T... | A scatter chart shows the correlation between CID and Credits . | SELECT CID, Credits FROM Course ORDER BY Credits | nvbench |
CREATE TABLE table_name_77 (
year VARCHAR,
venue VARCHAR,
event VARCHAR
) | What is the number of years that the event was foil team and took place in Los Angeles? | SELECT COUNT(year) FROM table_name_77 WHERE venue = "los angeles" AND event = "foil team" | sql_create_context |
CREATE TABLE table_32948 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | At what venue did the away team score 10.10 (70)? | SELECT "Venue" FROM table_32948 WHERE "Away team score" = '10.10 (70)' | wikisql |
CREATE TABLE table_name_66 (
grid VARCHAR,
time_retired VARCHAR,
laps VARCHAR
) | Tell me the total number of Grid for Time/Retired of +2 Laps and Laps less than 70 | SELECT COUNT(grid) FROM table_name_66 WHERE time_retired = "+2 laps" AND laps < 70 | sql_create_context |
CREATE TABLE table_71294 (
"Year" real,
"Award Show" text,
"Category" text,
"Recipient(s)" text,
"Result" text
) | On which award show was Bad Girls nominated for Most Popular Drama in 2004? | SELECT "Award Show" FROM table_71294 WHERE "Year" = '2004' AND "Category" = 'most popular drama' | 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... | 编号为43827517的患者被门诊诊断为胃炎,看看检测指标983873的结果定量及其单位 | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jybgb_jyjgzbb.Y... | css |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime... | what are the three year survival rates for those who were prescribed senna after having been diagnosed with extremity compartment syndrome - right lower extremity? | SELECT SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t4.diagnosistime) > 3 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.uniquepid, t2.diagnosistime FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid... | eicu |
CREATE TABLE table_name_39 (
record VARCHAR,
date VARCHAR
) | What is the record on February 19? | SELECT record FROM table_name_39 WHERE date = "february 19" | sql_create_context |
CREATE TABLE table_21377473_7 (
stadium VARCHAR,
score VARCHAR
) | When 3 - 1 hughes 64' is the score what is the stadium? | SELECT stadium FROM table_21377473_7 WHERE score = "3 - 1 Hughes 64'" | sql_create_context |
CREATE TABLE table_name_92 (
round VARCHAR,
date VARCHAR
) | What was the round number for March 22? | SELECT round FROM table_name_92 WHERE date = "march 22" | sql_create_context |
CREATE TABLE diagnoses (
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 prescriptions... | what is the date of birth and religion of patient no. 14755? | SELECT demographic.dob, demographic.religion FROM demographic WHERE demographic.subject_id = "14755" | mimicsql_data |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)... | how many patients since 2105 have received other gastrostomy two times? | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, COUNT(*) AS c1 FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'other gastrostomy') A... | mimic_iii |
CREATE TABLE table_79261 (
"Rank" real,
"Lane" real,
"Name" text,
"Nationality" text,
"Time" text
) | What is the Nationality of the Swimmer in Lane 4 or larger with a Rank of 5 or more? | SELECT "Nationality" FROM table_79261 WHERE "Lane" > '4' AND "Rank" > '5' | wikisql |
CREATE TABLE hz_info_zyjzjlb (
JZLSH number,
YLJGDM number,
zyjzjlb_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,
... | 患者15176126为精神分裂症,门诊诊断的补体C4的结果定量及其单位都是什么? | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jy... | css |
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... | 05667360222医疗就诊中,科室名没有皮肤科这几个字的科室开出的检验报告单的编号有哪些 | SELECT jybgb.BGDH FROM jybgb WHERE jybgb.JZLSH = '05667360222' AND NOT jybgb.KSMC LIKE '%皮肤科%' | css |
CREATE TABLE table_79289 (
"Opposing Team" text,
"Against" real,
"Date" text,
"Venue" text,
"Round" text
) | What was the round for Villa Park? | SELECT "Round" FROM table_79289 WHERE "Venue" = 'villa park' | wikisql |
CREATE TABLE table_name_71 (
games VARCHAR,
marks VARCHAR
) | Name the games with marks of 21 | SELECT games FROM table_name_71 WHERE marks = "21" | sql_create_context |
CREATE TABLE table_74073 (
"Player" text,
"Team" text,
"Matches" real,
"Runs" real,
"Average" text,
"Strike rate" text,
"Highest Score" text,
"100s" real,
"50s" real
) | If the average is 50.16, who is the player? | SELECT "Player" FROM table_74073 WHERE "Average" = '50.16' | wikisql |
CREATE TABLE table_50369 (
"Start Date/Time" text,
"Duration" text,
"End Time" text,
"Spacecraft" text,
"Crew" text
) | What spacecraft had an EVA that ended at 17:28? | SELECT "Spacecraft" FROM table_50369 WHERE "End Time" = '17:28' | wikisql |
CREATE TABLE table_31793 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | What is the average value of Bronze when silver is 0 and the total is less than 1? | SELECT AVG("Bronze") FROM table_31793 WHERE "Silver" = '0' AND "Total" < '1' | wikisql |
CREATE TABLE table_71984 (
"Church name" text,
"Location" text,
"Rebuilt" text,
"Date of demolition" real,
"Subsuming parish" text
) | What is the location that has a date of demolition of 1940 and has a church named Christ Church Greyfriars? | SELECT "Location" FROM table_71984 WHERE "Date of demolition" = '1940' AND "Church name" = 'christ church greyfriars' | wikisql |
CREATE TABLE table_9603 (
"Round" real,
"Pick" real,
"Player" text,
"Position" text,
"School/Club Team" text
) | What is the average pick for Florida State? | SELECT AVG("Pick") FROM table_9603 WHERE "School/Club Team" = 'florida state' | wikisql |
CREATE TABLE table_203_5 (
id number,
"season" text,
"competition" text,
"round" text,
"opponent" text,
"home" text,
"away" text,
"aggregate" text
) | how many times did they make it to the first round ? | SELECT COUNT(*) FROM table_203_5 WHERE "round" = 'first round' | squall |
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
C... | i need a flight from LOS ANGELES to CHARLOTTE today | 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 = 'CHARLOTTE' AND date_day.day_number = 22 AND date_day.month_number = 6 AND... | atis |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
... | Number of Posts per User. This is a query that returns the number of posts per user in descending order | SELECT COUNT(*) FROM Posts WHERE CreationDate >= DATEFROMPARTS(2013, 3, 1) | sede |
CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE dataset (
datasetid int,
datasetname varchar
)
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby i... | List the journals related to Temporal Data | SELECT DISTINCT paper.journalid FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'Temporal Data' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid GROUP BY paper.journalid | scholar |
CREATE TABLE Transactions (
transaction_id INTEGER,
investor_id INTEGER,
transaction_type_code VARCHAR(10),
date_of_transaction DATETIME,
amount_of_transaction DECIMAL(19,4),
share_count VARCHAR(40),
other_details VARCHAR(255)
)
CREATE TABLE Ref_Transaction_Types (
transaction_type_code... | Plot the number of investor details by grouped by investor details as a bar graph, display Y from high to low order. | SELECT Investor_details, COUNT(Investor_details) FROM Investors GROUP BY Investor_details ORDER BY COUNT(Investor_details) DESC | nvbench |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE intakeoutput (
intakeou... | compared to last measured on the last hospital visit is ionized calcium of patient 012-35670 less than second to last measured on the last hospital visit? | SELECT (SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '012-35670' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospi... | eicu |
CREATE TABLE table_name_91 (
position_in_table VARCHAR,
team VARCHAR,
replaced_by VARCHAR
) | Which position is team mons who was replaced by Christophe Dessy (caretaker)? | SELECT position_in_table FROM table_name_91 WHERE team = "mons" AND replaced_by = "christophe dessy (caretaker)" | sql_create_context |
CREATE TABLE table_name_70 (
type VARCHAR,
entered_service VARCHAR
) | What type entered service in 2000? | SELECT type FROM table_name_70 WHERE entered_service = "2000" | sql_create_context |
CREATE TABLE table_train_30 (
"id" int,
"serum_potassium" float,
"hyperkalemia" bool,
"renal_disease" bool,
"cardiopulmonary_resuscitation" bool,
"receiving_vasopressor" bool,
"age" float,
"NOUSE" float
) | requirement of high dose vasopressors ( defined as a cumulative vasopressor index = 4 ) to treat shock | SELECT * FROM table_train_30 WHERE receiving_vasopressor = 1 | criteria2sql |
CREATE TABLE Tasks (
task_id INTEGER,
project_id INTEGER,
task_details VARCHAR(255),
"eg Agree Objectives" VARCHAR(1)
)
CREATE TABLE Organisations (
organisation_id INTEGER,
organisation_type VARCHAR(10),
organisation_details VARCHAR(255)
)
CREATE TABLE Document_Types (
document_type_c... | Plot how many date from by grouped by date from as a bar graph | SELECT date_from, COUNT(date_from) FROM Project_Staff | nvbench |
CREATE TABLE table_30505 (
"Conference" text,
"Regular Season Winner" text,
"Conference Player of the Year" text,
"Conference Tournament" text,
"Tournament Venue (City)" text,
"Tournament Winner" text
) | During the Mid-American Conference who is listed as the tournament winner? | SELECT "Tournament Winner" FROM table_30505 WHERE "Conference" = 'Mid-American Conference' | wikisql |
CREATE TABLE table_12447 (
"Mininera DFL" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
) | What is the sum of byes when wins are 8, and losses are larger than 10? | SELECT COUNT("Byes") FROM table_12447 WHERE "Wins" = '8' AND "Losses" > '10' | wikisql |
CREATE TABLE table_78812 (
"Election" text,
"1st Member" text,
"1st Party" text,
"2nd Member" text,
"2nd Party" text
) | What's the 2nd party of 2nd member william goodenough hayter when the 1st member is hedworth hylton jolliffe? | SELECT "2nd Party" FROM table_78812 WHERE "1st Member" = 'hedworth hylton jolliffe' AND "2nd Member" = 'william goodenough hayter' | wikisql |
CREATE TABLE table_name_83 (
elevation__m_ INTEGER,
peak VARCHAR,
isolation__km_ VARCHAR
) | What is the highest elevation for the peak daurm l, and an Isolation (km) larger than 4? | SELECT MAX(elevation__m_) FROM table_name_83 WHERE peak = "daurmål" AND isolation__km_ > 4 | sql_create_context |
CREATE TABLE table_name_8 (
score VARCHAR,
date VARCHAR
) | What score has january 15, 2005 as the date? | SELECT score FROM table_name_8 WHERE date = "january 15, 2005" | sql_create_context |
CREATE TABLE table_54650 (
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text
) | who was the director of the episode with production code ad1a26? | SELECT "Directed by" FROM table_54650 WHERE "Production code" = 'ad1a26' | wikisql |
CREATE TABLE table_9493 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
) | Which team picked a player(s) from South Carolina? | SELECT "CFL Team" FROM table_9493 WHERE "College" = 'south carolina' | wikisql |
CREATE TABLE table_1569516_1 (
line VARCHAR,
destination VARCHAR
) | When London Bridge is the destination, how many lines are there? | SELECT COUNT(line) FROM table_1569516_1 WHERE destination = "London Bridge" | sql_create_context |
CREATE TABLE table_14342367_13 (
hometown VARCHAR,
player VARCHAR
) | Where is George W. Gregory from? | SELECT hometown FROM table_14342367_13 WHERE player = "George W. Gregory" | sql_create_context |
CREATE TABLE table_name_7 (
year INTEGER,
title VARCHAR
) | What year was Metroid Prime Hunters 5 released? | SELECT SUM(year) FROM table_name_7 WHERE title = "metroid prime hunters 5" | sql_create_context |
CREATE TABLE rating (
rid number,
mid number,
stars number,
ratingdate time
)
CREATE TABLE movie (
mid number,
title text,
year number,
director text
)
CREATE TABLE reviewer (
rid number,
name text
) | How many movie ratings have more than 3 stars? | SELECT COUNT(*) FROM rating WHERE stars > 3 | spider |
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,... | 在2007年12月20日到2016年9月1日间15522613这个患者买了几次西药? | SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '15522613' AND t_kc22.STA_DATE BETWEEN '2007-12-20' AND '2016-09-01' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' | css |
CREATE TABLE table_43839 (
"Series" text,
"Title" text,
"Broadcasts (TV) 1" real,
"Episodes (TV+extra) 2" text,
"Directors" text,
"Aired in Japan 3" text,
"US Release Date" text
) | What is the total number of Broadcasts (TV) 1, when Aired in Japan 3 is '5 January 2003 to 30 March 2003'? | SELECT COUNT("Broadcasts (TV) 1") FROM table_43839 WHERE "Aired in Japan 3" = '5 january 2003 to 30 march 2003' | wikisql |
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
... | Top 20 questions with the most answers. | SELECT Id AS "post_link", AnswerCount AS "number_of_answers" FROM Posts WHERE PostTypeId = 1 ORDER BY AnswerCount DESC LIMIT 20 | sede |
CREATE TABLE table_39544 (
"Rank" real,
"Place" text,
"County" text,
"Per Capita Income" text,
"Median House- hold Income" text,
"Median Family Income" text,
"Population" real,
"Number of Households" real
) | What is the Number of Households that have a Per Capita Income of $21,345? | SELECT AVG("Number of Households") FROM table_39544 WHERE "Per Capita Income" = '$21,345' | 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 demographic ... | how many patients are diagnosed with hx traumatic fracture? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.short_title = "Hx traumatic fracture" | mimicsql_data |
CREATE TABLE table_7617 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) | What is the sum of the attendance during the game against the philadelphia eagles after week 9? | SELECT SUM("Attendance") FROM table_7617 WHERE "Opponent" = 'philadelphia eagles' AND "Week" > '9' | wikisql |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime... | what are the drugs that patient 022-6959 has an allergic reaction to in 12/2105? | 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 = '022-6959')) AND STRFTIME('%y-%m', allergy.allergytime) = '2105-12' | eicu |
CREATE TABLE table_16132 (
"No." real,
"#" real,
"Title" text,
"Director" text,
"Writer" text,
"US air date" text,
"Storyteller" text,
"Villains" text
) | Who are the villains in the episodes where Megan is the storyteller and Lorette LeBlanc is the director? | SELECT "Villains" FROM table_16132 WHERE "Storyteller" = 'Megan' AND "Director" = 'Lorette LeBlanc' | wikisql |
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,
... | 日期均在2014-02-18之前的患者94709761的哪些住院就诊记录对应的检验报告单的报告?列出住院有什么就诊流水号? | SELECT zyjzjlb.JZLSH FROM hz_info JOIN zyjzjlb JOIN hz_info_zyjzjlb ON hz_info.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyj... | css |
CREATE TABLE table_25466 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Series" text
) | How many games are on the date of April 30? | SELECT MIN("Game") FROM table_25466 WHERE "Date" = 'April 30' | wikisql |
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... | calculate the total amount of chest tube output: pleural l output for patient 007-849 since 10/28/2103. | SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '007-849')) AND intakeoutput.celllabel = 'chest t... | eicu |
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE ... | Which 3 -credit courses cover Sociology of Latin America ? | SELECT DISTINCT department, name, number FROM course WHERE (description LIKE '%Sociology of Latin America%' OR name LIKE '%Sociology of Latin America%') AND credits = 3 | advising |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE cost (
costid number,
... | let's count how many times until 01/2104 patient 007-2001 had enteral pivot 1.5. | 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 = '007-2001')) AND intakeoutput.cellpath LIKE '%intake%' AND intakeoutput.cel... | eicu |
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... | what is the primary disease and drug name of Wilbur Braatz? | SELECT demographic.diagnosis, prescriptions.drug FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.name = "Wilbur Braatz" | mimicsql_data |
CREATE TABLE table_24350 (
"Type of Record" text,
"Attendance" real,
"Date/Year" text,
"Stadium" text,
"Result/Games" text
) | what is the attendance in 2011 records | SELECT "Attendance" FROM table_24350 WHERE "Date/Year" = '2011' | wikisql |
CREATE TABLE table_36570 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Record" text
) | Can you tell me the Record that has the Home of ny islanders? | SELECT "Record" FROM table_36570 WHERE "Home" = 'ny islanders' | 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 microlab (
microl... | are the respiration of patient 035-17122 measured at 2100-05-23 15:51:00 greater than measured at 2100-05-23 15:46:00? | SELECT (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 = '035-17122')) AND NOT vitalperiodic.respiration ... | eicu |
CREATE TABLE customers (
customer_id number,
customer_details text
)
CREATE TABLE claims (
claim_id number,
policy_id number,
date_claim_made time,
date_claim_settled time,
amount_claimed number,
amount_settled number
)
CREATE TABLE customer_policies (
policy_id number,
custome... | Find the number of settlements each claim corresponds to. Show the number together with the claim id. | SELECT T1.claim_id, COUNT(*) FROM claims AS T1 JOIN settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id | spider |
CREATE TABLE table_18618707_1 (
contestant VARCHAR,
height VARCHAR,
geographical_regions VARCHAR
) | When el cibao is the geographical region and the height is 1.80 who is the contestant? | SELECT contestant FROM table_18618707_1 WHERE height = "1.80" AND geographical_regions = "El Cibao" | sql_create_context |
CREATE TABLE table_38543 (
"Island's Name" text,
"Area (sq mi)" real,
"Area (km 2 )" real,
"Location" text,
"Population (2000)" text
) | What is the area located in Rhode Island with more than 38 sq mi area? | SELECT AVG("Area (km 2 )") FROM table_38543 WHERE "Location" = 'rhode island' AND "Area (sq mi)" > '38' | wikisql |
CREATE TABLE hz_info_zyjzjlb (
JZLSH number,
YLJGDM number,
zyjzjlb_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 t... | 患者03485032的检验报告单中有多少检验结果指标均异常?查询检验报告的单号 | SELECT jybgb.BGDH FROM hz_info JOIN mzjzjlb JOIN jybgb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE hz_info.RYBH = '03485032' AND NOT jybgb.BGDH IN (SELECT jyjgzbb.BGDH FROM jyjgzbb WH... | css |
CREATE TABLE table_8016 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Series" text
) | Who had the highest points when the series was 4-2? | SELECT "High points" FROM table_8016 WHERE "Series" = '4-2' | wikisql |
CREATE TABLE table_204_756 (
id number,
"year" number,
"team" text,
"games" number,
"combined tackles" number,
"tackles" number,
"assisted tackles" number,
"sacks" number,
"forced fumbles" number,
"fumble recoveries" number,
"fumble return yards" number,
"interceptions" n... | what is the total number of sacks smith has made ? | SELECT SUM("sacks") FROM table_204_756 | squall |
CREATE TABLE table_name_88 (
class_from_1928 VARCHAR,
class_to_1928 VARCHAR
) | Which class from 1928 had a class to 1928 of BDi-21? | SELECT class_from_1928 FROM table_name_88 WHERE class_to_1928 = "bdi-21" | 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 ... | how many patients stayed in hospital for more than 9 days and used the drug ibuprofen suspension? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "9" AND prescriptions.drug = "Ibuprofen Suspension" | mimicsql_data |
CREATE TABLE table_name_94 (
player VARCHAR,
score INTEGER
) | What player has a score larger than 67? | SELECT player FROM table_name_94 WHERE score > 67 | sql_create_context |
CREATE TABLE table_name_28 (
played INTEGER,
points VARCHAR,
position VARCHAR
) | Which Played has a Points of 2, and a Position smaller than 8? | SELECT AVG(played) FROM table_name_28 WHERE points = 2 AND position < 8 | sql_create_context |
CREATE TABLE table_name_87 (
country VARCHAR,
content VARCHAR,
television_service VARCHAR
) | What is the Country when the Content was general television, and a Television service of rai 1? | SELECT country FROM table_name_87 WHERE content = "general television" AND television_service = "rai 1" | sql_create_context |
CREATE TABLE table_31253 (
"Rank by average" real,
"Place" real,
"Couple" text,
"Total points" text,
"Number of dances" real,
"Average" text
) | How many times is the couple kerry & daniel? | SELECT COUNT("Place") FROM table_31253 WHERE "Couple" = 'Kerry & Daniel' | wikisql |
CREATE TABLE table_name_6 (
att INTEGER,
date VARCHAR
) | What was the attendance on June 27? | SELECT MIN(att) FROM table_name_6 WHERE date = "june 27" | sql_create_context |
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... | what's the last test patient 022-142620 has had until 11/2105? | SELECT lab.labname FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-142620')) AND STRFTIME('%y-%m', lab.labresulttime) <= '2105-11' ORDER BY lab.labresul... | eicu |
CREATE TABLE table_37339 (
"Track" text,
"City" text,
"State" text,
"Opened" text,
"Major Series" text,
"Turns" text
) | What shows for opened for the Nascar Major Series? | SELECT "Opened" FROM table_37339 WHERE "Major Series" = 'nascar' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.