context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_1358608_4 (
winner_2nd VARCHAR,
venue VARCHAR
) | Who was the winner of the race at Belmont? | SELECT winner_2nd FROM table_1358608_4 WHERE venue = "Belmont" | sql_create_context |
CREATE TABLE table_78843 (
"Season" text,
"League" text,
"Teams" text,
"Home" text,
"Away" text
) | What is the league with a 0:1 home? | SELECT "League" FROM table_78843 WHERE "Home" = '0:1' | wikisql |
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... | 患者04369427被开出过拉莫三嗪片在哪几家医院? | SELECT gwyjzb.MED_SER_ORG_NO FROM gwyjzb WHERE gwyjzb.PERSON_ID = '04369427' AND gwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.SOC_SRT_DIRE_NM = '拉莫三嗪片') UNION SELECT fgwyjzb.MED_SER_ORG_NO FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '04369427' AND fgwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_... | css |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | how many patients having clinic referral/premature as the admission location have undergone initial insertion of dual-chamber device? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_location = "CLINIC REFERRAL/PREMATURE" AND procedures.long_title = "Initial insertion of dual-chamber device" | mimicsql_data |
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 transfers (
row_id number,
subject_id number,
hadm_... | what is the yearly minimum amount of theophylline of patient 27172 since 5 years ago? | SELECT MIN(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 27172) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'theophylline') AND DATETIME(labevents.charttime) >= DATETIME(CURRENT_TIME()... | mimic_iii |
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
) | Stacked bar chart of how many nationality for with each Type in each nationality, and show Y-axis in ascending order please. | SELECT Nationality, COUNT(Nationality) FROM ship GROUP BY Type, Nationality ORDER BY COUNT(Nationality) | nvbench |
CREATE TABLE table_name_83 (
italian VARCHAR,
english VARCHAR
) | What's the Italian Pluperfect when the English is We Had Heard? | SELECT italian FROM table_name_83 WHERE english = "we had heard" | sql_create_context |
CREATE TABLE table_name_11 (
year VARCHAR,
silver VARCHAR
) | What is the total number of years when Mika Miyazato won the silver? | SELECT COUNT(year) FROM table_name_11 WHERE silver = "mika miyazato" | sql_create_context |
CREATE TABLE table_15569 (
"Tournament" text,
"Wins" real,
"Top-5" real,
"Top-10" real,
"Top-25" real,
"Events" real,
"Cuts made" real
) | What is the average value for Top-5, when the value Cuts is 5, and when the tournament is the Open Championship, and when the value Events is less than 6? | SELECT AVG("Top-5") FROM table_15569 WHERE "Cuts made" = '5' AND "Tournament" = 'the open championship' AND "Events" < '6' | wikisql |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (... | what is drug type and drug code of drug name amaryl? | SELECT prescriptions.drug_type, prescriptions.formulary_drug_cd FROM prescriptions WHERE prescriptions.drug = "Amaryl" | mimicsql_data |
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 AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_jyjgzbb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jybgb_jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH AND jybgb_jyjgzbb.JYZBLSH = jyjgzbb.JY... | css |
CREATE TABLE table_47120 (
"Period" text,
"Team" text,
"Player" text,
"Penalty" text,
"Time" text
) | In which period did Stanislav Chistov get a penalty? | SELECT "Period" FROM table_47120 WHERE "Player" = 'stanislav chistov' | wikisql |
CREATE TABLE voting_record (
stuid number,
registration_date text,
election_cycle text,
president_vote number,
vice_president_vote number,
secretary_vote number,
treasurer_vote number,
class_president_vote number,
class_senator_vote number
)
CREATE TABLE student (
stuid number,
... | Report the distinct registration date and the election cycle. | SELECT DISTINCT registration_date, election_cycle FROM voting_record | spider |
CREATE TABLE table_16348 (
"Year [e ] (Ceremony)" text,
"Film title used in nomination" text,
"Original title" text,
"Director" text,
"Result" text
) | What was the original title of the film submitted with the title A Woman in Flames? | SELECT "Original title" FROM table_16348 WHERE "Film title used in nomination" = 'A Woman in Flames' | wikisql |
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,
... | what is the number of patients admitted on emergency basis who have lab test item id 50927? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND lab.itemid = "50927" | mimicsql_data |
CREATE TABLE table_name_95 (
notes VARCHAR,
cardinalatial_order_and_title VARCHAR
) | What are the notes of Cardinal-Deacon of S. Maria in Portico? | SELECT notes FROM table_name_95 WHERE cardinalatial_order_and_title = "cardinal-deacon of s. maria in portico" | sql_create_context |
CREATE TABLE table_66044 (
"Rank" real,
"Stadium" text,
"Capacity" text,
"Location" text,
"Home Team" text
) | What is the lowest rank that has university park, pa as the location? | SELECT MIN("Rank") FROM table_66044 WHERE "Location" = 'university park, pa' | wikisql |
CREATE TABLE table_name_49 (
laps VARCHAR,
grid VARCHAR
) | How many laps for grid of 9? | SELECT laps FROM table_name_49 WHERE grid = 9 | sql_create_context |
CREATE TABLE table_name_15 (
record VARCHAR,
opponent VARCHAR
) | What was the record after the game against the St. Louis Cardinals? | SELECT record FROM table_name_15 WHERE opponent = "st. louis cardinals" | sql_create_context |
CREATE TABLE table_23286722_1 (
season__number VARCHAR,
production_code VARCHAR
) | Name the total number of season for production code 3m17 | SELECT COUNT(season__number) FROM table_23286722_1 WHERE production_code = "3M17" | sql_create_context |
CREATE TABLE table_50035 (
"Year" real,
"Round" text,
"Player" text,
"Nationality" text,
"Position" text,
"College/High School/Club" text
) | Who is the player with a year later than 2007 and the college/high school/club of Arizona? | SELECT "Player" FROM table_50035 WHERE "Year" > '2007' AND "College/High School/Club" = 'arizona' | wikisql |
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
)
... | how many patients are married and lab tested for bilirubin, indirect? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "MARRIED" AND lab.label = "Bilirubin, Indirect" | mimicsql_data |
CREATE TABLE technician (
technician_id real,
Name text,
Team text,
Starting_Year real,
Age int
)
CREATE TABLE repair (
repair_ID int,
name text,
Launch_Date text,
Notes text
)
CREATE TABLE repair_assignment (
technician_id int,
repair_ID int,
Machine_ID int
)
CREATE T... | List the number of the name of technicians whose team is not 'NYY', could you order from high to low by the Y-axis please? | SELECT Name, COUNT(Name) FROM technician WHERE Team <> "NYY" GROUP BY Name ORDER BY COUNT(Name) DESC | nvbench |
CREATE TABLE Projects (
Project_ID INTEGER,
Project_Details VARCHAR(255)
)
CREATE TABLE Accounts (
Account_ID INTEGER,
Statement_ID INTEGER,
Account_Details VARCHAR(255)
)
CREATE TABLE Ref_Budget_Codes (
Budget_Type_Code CHAR(15),
Budget_Type_Description VARCHAR(255)
)
CREATE TABLE Statem... | Bar chart x axis document name y axis the number of document name, and sort from low to high by the Document_Name. | SELECT Document_Name, COUNT(Document_Name) FROM Documents GROUP BY Document_Name ORDER BY Document_Name | nvbench |
CREATE TABLE table_49315 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | What was the Attendance on Week 10? | SELECT "Attendance" FROM table_49315 WHERE "Week" = '10' | wikisql |
CREATE TABLE table_22824199_1 (
three_pointers INTEGER,
free_throws VARCHAR
) | Of the players with 50 free throws, what is the lowest number of three pointers? | SELECT MIN(three_pointers) FROM table_22824199_1 WHERE free_throws = 50 | sql_create_context |
CREATE TABLE table_name_3 (
year VARCHAR,
main VARCHAR,
hessen VARCHAR
) | Which year has a Main of Eintracht Frankfurt and Hessen of FSV Mainz 05? | SELECT year FROM table_name_3 WHERE main = "eintracht frankfurt" AND hessen = "fsv mainz 05" | sql_create_context |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
C... | how many patients born before the year 2170 suffered from left internal jugular vein thrombosis;left arm edema? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "LEFT INTERNAL JUGULAR VEIN THROMBOSIS;LEFT ARM EDEMA" AND demographic.dob_year < "2170" | mimicsql_data |
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 flight_fare ... | what flights go from PHILADELPHIA to DALLAS with a stopover in ATLANTA | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALLAS' AND CITY_2.cit... | atis |
CREATE TABLE table_1670921_1 (
batting_team VARCHAR,
wicket VARCHAR
) | How many teams are listed for 3rd wickets? | SELECT COUNT(batting_team) FROM table_1670921_1 WHERE wicket = "3rd" | sql_create_context |
CREATE TABLE table_name_19 (
years_for_grizzlies VARCHAR,
school_club_team VARCHAR
) | What year were the Grizzlies in Providence? | SELECT years_for_grizzlies FROM table_name_19 WHERE school_club_team = "providence" | sql_create_context |
CREATE TABLE table_45546 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"Location Attendance" text,
"Record" text
) | Which High points has a Game larger than 58, and a High rebounds of francisco elson (7)? | SELECT "High points" FROM table_45546 WHERE "Game" > '58' AND "High rebounds" = 'francisco elson (7)' | wikisql |
CREATE TABLE table_51036 (
"Date" text,
"Series" text,
"Circuit" text,
"City / State" text,
"Winner" text,
"Team" text
) | What series was Dick Johnson Racing the team? | SELECT "Series" FROM table_51036 WHERE "Team" = 'dick johnson racing' | wikisql |
CREATE TABLE table_70266 (
"Name" text,
"Years" text,
"Gender" text,
"Area" text,
"Authority" text,
"Decile" real,
"Roll" real
) | Which roll has an Area of mahia? | SELECT "Roll" FROM table_70266 WHERE "Area" = 'mahia' | wikisql |
CREATE TABLE table_15887683_3 (
package_option VARCHAR,
television_service VARCHAR
) | What packages offer the Cartello Promozionale Sky HD service? | SELECT package_option FROM table_15887683_3 WHERE television_service = "Cartello promozionale Sky HD" | 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... | 患者华明煦被门诊诊断为矽肺壹期,查查胃泌素释放肽前体的结果定量及其单位 | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZ... | css |
CREATE TABLE table_62176 (
"Date" text,
"Round" real,
"Pair" text,
"Ages" text,
"Dance" text,
"Song" text
) | Who danced the Cha-Cha-Cha on November 18, 2008? | SELECT "Pair" FROM table_62176 WHERE "Dance" = 'cha-cha-cha' AND "Date" = 'november 18, 2008' | wikisql |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,... | Provide the frequency of the last names of employees earning more than the employee with id 163 using a bar chart, show bar in desc order. | SELECT LAST_NAME, COUNT(LAST_NAME) FROM employees WHERE SALARY > (SELECT SALARY FROM employees WHERE EMPLOYEE_ID = 163) GROUP BY LAST_NAME ORDER BY LAST_NAME DESC | nvbench |
CREATE TABLE table_50523 (
"Tournament" text,
"Surface" text,
"Week" text,
"Winner" text,
"Finalist" text,
"Semifinalists" text
) | what was the week for the match on a hard surface at Indian Wells tournament? | SELECT "Week" FROM table_50523 WHERE "Surface" = 'hard' AND "Tournament" = 'indian wells' | wikisql |
CREATE TABLE table_name_13 (
name VARCHAR,
authority VARCHAR,
roll VARCHAR
) | What is the Name of a state Authority that has a Roll of 72? | SELECT name FROM table_name_13 WHERE authority = "state" AND roll = "72" | sql_create_context |
CREATE TABLE table_79891 (
"Category" text,
"Film" text,
"Director(s)" text,
"Country" text,
"Nominating Festival" text
) | What film did abdelatif hwidar direct that was in the short film 2007 prix uip category? | SELECT "Film" FROM table_79891 WHERE "Category" = 'short film 2007 prix uip' AND "Director(s)" = 'abdelatif hwidar' | wikisql |
CREATE TABLE mountain (
Mountain_ID int,
Name text,
Height real,
Prominence real,
Range text,
Country text
)
CREATE TABLE climber (
Climber_ID int,
Name text,
Country text,
Time text,
Points real,
Mountain_ID int
) | Display a bar chart for how many climbers are from each country?, and could you display X in asc order? | SELECT Country, COUNT(*) FROM climber GROUP BY Country ORDER BY Country | nvbench |
CREATE TABLE field (
fieldid int
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE dataset (
datasetid int,
datasetname varchar
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid ... | What is the latest paper by emo todorov ? | SELECT DISTINCT writes.paperid FROM author, paper, writes WHERE author.authorname = 'emo todorov' AND writes.authorid = author.authorid AND writes.paperid = paper.paperid ORDER BY paper.year DESC | scholar |
CREATE TABLE perpetrator (
Country VARCHAR
) | What is the country that has the most perpetrators? | SELECT Country, COUNT(*) FROM perpetrator GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1 | sql_create_context |
CREATE TABLE table_13818 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text,
"TV Time" text,
"Attendance" text
) | what is the attendance on december 14, 2003? | SELECT "Attendance" FROM table_13818 WHERE "Date" = 'december 14, 2003' | wikisql |
CREATE TABLE table_12368 (
"Tournament" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
) | What is the 2009 value with A in 2012 and q2 in 2011? | SELECT "2009" FROM table_12368 WHERE "2012" = 'a' AND "2011" = 'q2' | wikisql |
CREATE TABLE table_36624 (
"Fraction" text,
"Ellipsis" text,
"Vinculum" text,
"Dots" text,
"Parentheses" text
) | What is the value for parentheses with a dots value of 0.\dot{6}? | SELECT "Parentheses" FROM table_36624 WHERE "Dots" = '0.\dot{6}' | wikisql |
CREATE TABLE Financial_Transactions (
transaction_id INTEGER,
previous_transaction_id INTEGER,
account_id INTEGER,
card_id INTEGER,
transaction_type VARCHAR(15),
transaction_date DATETIME,
transaction_amount DOUBLE,
transaction_comment VARCHAR(255),
other_transaction_details VARCHAR(... | Show all card type codes and the number of cards in each type by a bar chart, and list from high to low by the names please. | SELECT card_type_code, COUNT(*) FROM Customers_Cards GROUP BY card_type_code ORDER BY card_type_code DESC | nvbench |
CREATE TABLE table_42881 (
"Name" text,
"GP-GS" text,
"Gain" real,
"Loss" real,
"Long" real,
"Avg/G" real
) | What is the lowest long with a Gp-GS of 11-8, and a gain less than 228? | SELECT MIN("Long") FROM table_42881 WHERE "GP-GS" = '11-8' AND "Gain" < '228' | wikisql |
CREATE TABLE table_10568553_1 (
location VARCHAR,
milepost VARCHAR
) | Where is milepost 12.8? | SELECT location FROM table_10568553_1 WHERE milepost = "12.8" | sql_create_context |
CREATE TABLE table_name_72 (
event VARCHAR,
score INTEGER
) | Which event had a score of over 673 points? | SELECT event FROM table_name_72 WHERE score > 673 | sql_create_context |
CREATE TABLE table_48790 (
"Pick #" real,
"NFL Team" text,
"Player" text,
"Position" text,
"College" text
) | What college did Leon Perry attend? | SELECT "College" FROM table_48790 WHERE "Player" = 'leon perry' | wikisql |
CREATE TABLE table_name_46 (
date_from VARCHAR,
moving_to VARCHAR
) | What is Date From, when Moving To is 'Birmingham City'? | SELECT date_from FROM table_name_46 WHERE moving_to = "birmingham city" | sql_create_context |
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
war... | what was patient 3403's daily maximum value of body weight until 2104? | SELECT MAX(chartevents.valuenum) FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3403)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admit... | mimic_iii |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | A bar chart shows the distribution of ACC_Road and Team_ID , and group by attribute ACC_Home, list by the x-axis in ascending. | SELECT ACC_Road, Team_ID FROM basketball_match GROUP BY ACC_Home, ACC_Road ORDER BY ACC_Road | nvbench |
CREATE TABLE affected_region (
Region_id int,
Storm_ID int,
Number_city_affected real
)
CREATE TABLE storm (
Storm_ID int,
Name text,
Dates_active text,
Max_speed int,
Damage_millions_USD real,
Number_Deaths int
)
CREATE TABLE region (
Region_id int,
Region_code text,
R... | For all storms with at least 1 death, compare the number of deaths by name with a bar graph, and order by the bar in descending. | SELECT Name, Number_Deaths FROM storm WHERE Number_Deaths >= 1 ORDER BY Name DESC | nvbench |
CREATE TABLE table_27713583_11 (
high_assists VARCHAR,
location_attendance VARCHAR,
record VARCHAR
) | Name the high assists for madison square garden 19,763 and record is 39 38 | SELECT high_assists FROM table_27713583_11 WHERE location_attendance = "Madison Square Garden 19,763" AND record = "39–38" | sql_create_context |
CREATE TABLE table_name_97 (
nhl_team VARCHAR,
player VARCHAR
) | Which NHL team has a Player of steve durbano? | SELECT nhl_team FROM table_name_97 WHERE player = "steve durbano" | sql_create_context |
CREATE TABLE salary (
salary VARCHAR,
YEAR VARCHAR
) | What were all the salary values of players in 2010 and 2001? | SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001 | sql_create_context |
CREATE TABLE table_9386 (
"Game" real,
"January" real,
"Opponent" text,
"Score" text,
"Record" text
) | What is the total number of Game, when Record is '11-17-7'? | SELECT COUNT("Game") FROM table_9386 WHERE "Record" = '11-17-7' | wikisql |
CREATE TABLE table_59056 (
"Parish (Prestegjeld)" text,
"Sub-Parish (Sokn)" text,
"Church Name" text,
"Year Built" text,
"Location of the Church" text
) | When was the Hopperstad Stavkyrkje built? | SELECT "Year Built" FROM table_59056 WHERE "Church Name" = 'hopperstad stavkyrkje' | wikisql |
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE... | My answers order by view count. | SELECT SUM(q.ViewCount) FROM Posts AS a, Posts AS q WHERE a.OwnerUserId = 132438 AND a.ParentId = q.Id AND a.PostTypeId = 2 AND q.PostTypeId = 1 | sede |
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... | 门诊给患者韩奇正诊断为疾病Z28.586,那检测指标609254的结果定量及其单位是什么 | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN wdmzjzjlb JOIN jybgb JOIN jyjgzbb 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_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZ... | css |
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE area (
course_id int,
... | Which courses have been taught now , later , or previously by James Peterson ? | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%James Peterson%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id ... | advising |
CREATE TABLE table_38169 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text,
"Game Site" text,
"Attendance" real
) | What Game Site has a Week smaller than 11, and a Date of october 21, 1973? | SELECT "Game Site" FROM table_38169 WHERE "Week" < '11' AND "Date" = 'october 21, 1973' | wikisql |
CREATE TABLE table_1370559_1 (
pf INTEGER
) | What is the lowest PF? | SELECT MIN(pf) FROM table_1370559_1 | sql_create_context |
CREATE TABLE club_rank (
Rank real,
Club_ID int,
Gold real,
Silver real,
Bronze real,
Total real
)
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 (
... | Compare the total number of competitions for each country, rank Country in ascending order. | SELECT Country, COUNT(Country) FROM competition GROUP BY Country ORDER BY Country | nvbench |
CREATE TABLE ftxmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZD... | 从00年2月1日开始06年5月3日结束患者89244700所有检验结果指标记录中的仪器编号以及名称都是啥吗? | SELECT jyjgzbb.YQBH, jyjgzbb.YQMC FROM hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH ... | css |
CREATE TABLE table_204_164 (
id number,
"branding" text,
"callsign" text,
"frequency" text,
"power (kw)" text,
"location" text
) | what is the total number of stations with frequencies above 100 mhz ? | SELECT COUNT("branding") FROM table_204_164 WHERE "frequency" > 100 | squall |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime t... | how many patients have been admitted? | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.hospitaldischargetime IS NULL | eicu |
CREATE TABLE table_65005 (
"Municipality" text,
"FIPS code" real,
"Founded" real,
"Population (2010)" real,
"Area" text
) | What is the FIPS code for the municipality that has an area of 58.60 sq mi (151.77 sq km) and had a 2010 population smaller than 166,327? | SELECT COUNT("FIPS code") FROM table_65005 WHERE "Population (2010)" < '166,327' AND "Area" = '58.60 sq mi (151.77 sq km)' | wikisql |
CREATE TABLE CloseReasonTypes (
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 ReviewTasks (
Id num... | Tags sorted by your average post reputation. | SELECT TagName, CAST(SUM(Posts.Score) AS FLOAT) / COUNT(*) AS Reputation FROM Tags INNER JOIN PostTags ON PostTags.TagId = Tags.Id INNER JOIN Posts ON Posts.ParentId = PostTags.PostId GROUP BY TagName HAVING COUNT(*) > 5000 ORDER BY Reputation | sede |
CREATE TABLE table_1140090_6 (
circuit VARCHAR,
race_name VARCHAR
) | What circuit is the Vi Rhein-Pokalrennen race in? | SELECT circuit FROM table_1140090_6 WHERE race_name = "VI Rhein-Pokalrennen" | sql_create_context |
CREATE TABLE Rooms (
decor VARCHAR,
basePrice INTEGER
) | Find the average and minimum price of the rooms in different decor. | SELECT decor, AVG(basePrice), MIN(basePrice) FROM Rooms GROUP BY decor | sql_create_context |
CREATE TABLE table_name_18 (
gold INTEGER,
total VARCHAR,
bronze VARCHAR
) | What is the sum of the golds of the nation with 5 total and less than 0 bronze medals? | SELECT SUM(gold) FROM table_name_18 WHERE total = 5 AND bronze < 0 | sql_create_context |
CREATE TABLE table_name_51 (
record VARCHAR,
score VARCHAR,
location_attendance VARCHAR,
game VARCHAR
) | Which Record has a Location/Attendance of ford center, a Game larger than 30, and a Score of 87 79? | SELECT record FROM table_name_51 WHERE location_attendance = "ford center" AND game > 30 AND score = "87–79" | sql_create_context |
CREATE TABLE table_68216 (
"Year" real,
"Manufacturer" text,
"Start" real,
"Finish" real,
"Team" text
) | Name the year when start was 32 | SELECT "Year" FROM table_68216 WHERE "Start" = '32' | wikisql |
CREATE TABLE table_17348 (
"#" real,
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Leading scorer" text,
"Attendance" text,
"Record" text,
"Streak" text
) | what's the home where date is march 27 | SELECT "Home" FROM table_17348 WHERE "Date" = 'March 27' | wikisql |
CREATE TABLE table_204_743 (
id number,
"pos" text,
"no" number,
"driver" text,
"constructor" text,
"laps" number,
"time/retired" text,
"grid" number,
"points" number
) | what driver was last on the list ? | SELECT "driver" FROM table_204_743 ORDER BY id DESC LIMIT 1 | squall |
CREATE TABLE table_name_10 (
lead VARCHAR,
skip VARCHAR
) | Who was the lead when Ritvars Gulbis was the skip? | SELECT lead FROM table_name_10 WHERE skip = "ritvars gulbis" | 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, show me about the distribution of name and code , and group by attribute name in a bar chart, and could you show bar in ascending order? | SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name ORDER BY T1.Name | nvbench |
CREATE TABLE Lots (
lot_id INTEGER,
investor_id INTEGER,
lot_details VARCHAR(255)
)
CREATE TABLE Sales (
sales_transaction_id INTEGER,
sales_details VARCHAR(255)
)
CREATE TABLE Investors (
investor_id INTEGER,
Investor_details VARCHAR(255)
)
CREATE TABLE Purchases (
purchase_transacti... | Bin all date of transactions into the YEAR interval, and give the average of the share count for each bin What is the trend?, sort x-axis in desc order. | SELECT date_of_transaction, AVG(share_count) FROM Transactions ORDER BY date_of_transaction DESC | nvbench |
CREATE TABLE table_17876 (
"No" real,
"Player" text,
"Height" text,
"Position" text,
"Year born" real,
"Current Club" text
) | what's current club with player being nikolaos chatzivrettas | SELECT "Current Club" FROM table_17876 WHERE "Player" = 'Nikolaos Chatzivrettas' | wikisql |
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(... | 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, return a bar chart about the distribution of job_id and the average of department_id , and group by attribute job_id, rank by the total number from low to high. | SELECT JOB_ID, AVG(DEPARTMENT_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY AVG(DEPARTMENT_ID) | nvbench |
CREATE TABLE table_7435 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) | How many people attended the game on December 20, 1964? | SELECT "Attendance" FROM table_7435 WHERE "Date" = 'december 20, 1964' | wikisql |
CREATE TABLE table_name_37 (
disposition_of_ship VARCHAR,
tonnage VARCHAR,
ship_name VARCHAR
) | The ship named Bacchus with a tonnage of t had what disposition of ship? | SELECT disposition_of_ship FROM table_name_37 WHERE tonnage = "t" AND ship_name = "bacchus" | sql_create_context |
CREATE TABLE table_2259285_1 (
winning_pct__percentage VARCHAR,
goals_for VARCHAR
) | What is the winning pct % if the goal for are 229? | SELECT winning_pct__percentage FROM table_2259285_1 WHERE goals_for = 229 | sql_create_context |
CREATE TABLE table_51008 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Attendance" text
) | Who was the away team when the attendance was 206? | SELECT "Away team" FROM table_51008 WHERE "Attendance" = '206' | wikisql |
CREATE TABLE table_204_389 (
id number,
"rnd." number,
"pick #" number,
"nfl team" text,
"player" text,
"pos." text,
"college" text,
"conf." text,
"notes" text
) | how many players from wisconsin were picked in the first round ? | SELECT COUNT("player") FROM table_204_389 WHERE "college" = 'wisconsin' AND "rnd." = 1 | squall |
CREATE TABLE table_52837 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What did the home team score in the game where the away team scored 9.13 (67)? | SELECT "Home team score" FROM table_52837 WHERE "Away team score" = '9.13 (67)' | wikisql |
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 bar chart about the distribution of name and the average of revenue , and group by attribute name, rank total number in asc order. | SELECT T1.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T2.Revenue | nvbench |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREAT... | what is the price of a drug named enoxaparin 40 mg/0.4 ml syr? | SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'medication' AND cost.eventid IN (SELECT medication.medicationid FROM medication WHERE medication.drugname = 'enoxaparin 40 mg/0.4 ml syr') | eicu |
CREATE TABLE table_name_9 (
employee__real_name_ VARCHAR,
pick__number VARCHAR,
brand__to_ VARCHAR
) | what is the employee (real name) when the pick # is higher than 10 and the brand (to) is raw? | SELECT employee__real_name_ FROM table_name_9 WHERE pick__number > 10 AND brand__to_ = "raw" | sql_create_context |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,... | what was the daily minimum intake of po intake that patient 10266 had received since 01/2104? | 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 = 10266)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.lab... | mimic_iii |
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... | calculate the minimum age of unmarried patients who have colangitis primary disease. | SELECT MIN(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.diagnosis = "COLANGITIS" | mimicsql_data |
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... | provide the number of patients whose ethnicity is unknown/not specified and primary disease is morbid obesity/sda? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "UNKNOWN/NOT SPECIFIED" AND demographic.diagnosis = "MORBID OBESITY/SDA" | mimicsql_data |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text... | 患者82545528的体重和身高各是多少? | SELECT zzmzjzjlb.SG, zzmzjzjlb.TZ FROM hz_info JOIN zzmzjzjlb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX WHERE hz_info.RYBH = '82545528' UNION SELECT fzzmzjzjlb.SG, fzzmzjzjlb.TZ FROM hz_info JOIN fzzmzjzjlb ON hz_info.YLJGDM = fzzmzjzjlb.YLJGDM AND hz_info.KH = f... | css |
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE instructor (
instructo... | Of the classes being offered in Fall and Winter term , how many are 200 -level ? | SELECT COUNT(DISTINCT course.department, course.name, course.number, semester.semester) FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'department0' AND course.number BETWEEN 200 AND 200 + 100 AND semester.semester IN ('FA', 'WN') AND semester.semester_... | advising |
CREATE TABLE table_1745843_2 (
verb_meaning VARCHAR,
part_3 VARCHAR
) | What is the verb meaning for *bundun? | SELECT verb_meaning FROM table_1745843_2 WHERE part_3 = "*bundun" | sql_create_context |
CREATE TABLE table_59254 (
"Player" text,
"Seasons" text,
"Games" text,
"Goals" text,
"Assists" text,
"Points" text
) | How many points were scored by the player who played 348 games? | SELECT "Points" FROM table_59254 WHERE "Games" = '348' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.