context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_name_32 (
status VARCHAR,
official_name VARCHAR
) | Saint-Basile has what status? | SELECT status FROM table_name_32 WHERE official_name = "saint-basile" | sql_create_context |
CREATE TABLE table_name_50 (
place VARCHAR,
country VARCHAR
) | What place did the player from England come in? | SELECT place FROM table_name_50 WHERE country = "england" | sql_create_context |
CREATE TABLE table_3129 (
"No." real,
"Date" text,
"Tournament" text,
"Winning score" text,
"To par" text,
"Margin of victory" text,
"Runner(s)-up" text
) | What were the shots below par when the winning score was 67-64-63-71-66=331? | SELECT "To par" FROM table_3129 WHERE "Winning score" = '67-64-63-71-66=331' | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | Find the number of divorced patients who had a lactate dehydrogenase lab test. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "DIVORCED" AND lab.label = "Lactate Dehydrogenase (LD)" | mimicsql_data |
CREATE TABLE table_203_340 (
id number,
"rank" number,
"airport" text,
"passengers handled" number,
"% change 2011 / 12" number
) | looking at the top 10 busiest routes to and from london southend airport what is the average number of passengers handled ? | SELECT AVG("passengers handled") FROM table_203_340 | squall |
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... | what is age and gender of subject name charles nilsson? | SELECT demographic.age, demographic.gender FROM demographic WHERE demographic.name = "Charles Nilsson" | mimicsql_data |
CREATE TABLE table_2950964_1 (
title VARCHAR,
isbn VARCHAR
) | What is the title of ISBN 1-84990-243-7? | SELECT title FROM table_2950964_1 WHERE isbn = "isbn 1-84990-243-7" | sql_create_context |
CREATE TABLE table_name_89 (
height_metres___ft VARCHAR,
floors VARCHAR
) | Name the Height metres / ft of Floors of 05.0 n/a? | SELECT height_metres___ft FROM table_name_89 WHERE floors = "05.0 n/a" | sql_create_context |
CREATE TABLE Participants (
Participant_ID INTEGER,
Participant_Type_Code CHAR(15),
Participant_Details VARCHAR(255)
)
CREATE TABLE Services (
Service_ID INTEGER,
Service_Type_Code CHAR(15)
)
CREATE TABLE Participants_in_Events (
Event_ID INTEGER,
Participant_ID INTEGER
)
CREATE TABLE Eve... | Bar chart x axis participant type code y axis the number of participant type code, and list in ascending by the y-axis. | SELECT Participant_Type_Code, COUNT(Participant_Type_Code) FROM Participants GROUP BY Participant_Type_Code ORDER BY COUNT(Participant_Type_Code) | nvbench |
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,
... | provide the number of patients whose year of death is less than or equal to 2183 and procedure long title is annuloplasty? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dod_year <= "2183.0" AND procedures.long_title = "Annuloplasty" | mimicsql_data |
CREATE TABLE news_report (
journalist_ID int,
Event_ID int,
Work_Type text
)
CREATE TABLE event (
Event_ID int,
Date text,
Venue text,
Name text,
Event_Attendance int
)
CREATE TABLE journalist (
journalist_ID int,
Name text,
Nationality text,
Age text,
Years_working... | A bar chart about what are the nationalities and their average ages of journalists?, and order y-axis from high to low order. | SELECT Nationality, AVG(Age) FROM journalist GROUP BY Nationality ORDER BY AVG(Age) DESC | nvbench |
CREATE TABLE table_11428 (
"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 11.11 (77)? | SELECT "Home team score" FROM table_11428 WHERE "Away team score" = '11.11 (77)' | wikisql |
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
pr... | What Fall / Winter courses can I take to fulfill my MDE requirement ? | SELECT DISTINCT COURSEalias0.department, COURSEalias0.name, COURSEalias0.number, SEMESTERalias0.semester FROM (SELECT course_id FROM student_record WHERE earn_credit = 'Y' AND student_id = 1) AS DERIVED_TABLEalias0, course AS COURSEalias0, course_offering AS COURSE_OFFERINGalias0, program_course AS PROGRAM_COURSEalias0... | advising |
CREATE TABLE table_20291 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | Name the high rebounds for march 17 | SELECT "High rebounds" FROM table_20291 WHERE "Date" = 'March 17' | wikisql |
CREATE TABLE movie (
movie_id number,
title text,
year number,
director text,
budget_million number,
gross_worldwide number
)
CREATE TABLE book_club (
book_club_id number,
year number,
author_or_editor text,
book_title text,
publisher text,
category text,
result text... | What are all the different book publishers? | SELECT DISTINCT publisher FROM book_club | spider |
CREATE TABLE table_name_85 (
years VARCHAR,
roll VARCHAR
) | What years does the school have with a roll of 33? | SELECT years FROM table_name_85 WHERE roll = 33 | 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 diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE microbiolo... | count the number of times that patient 1862 was prescribed pantoprazole until 2 years ago. | SELECT COUNT(*) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 1862) AND prescriptions.drug = 'pantoprazole' AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-2 year') | mimic_iii |
CREATE TABLE repair_assignment (
technician_id int,
repair_ID int,
Machine_ID int
)
CREATE TABLE repair (
repair_ID int,
name text,
Launch_Date text,
Notes text
)
CREATE TABLE technician (
technician_id real,
Name text,
Team text,
Starting_Year real,
Age int
)
CREATE T... | Create a bar chart showing the total number across team, show X-axis from high to low order please. | SELECT Team, COUNT(*) FROM technician GROUP BY Team ORDER BY Team DESC | nvbench |
CREATE TABLE table_35259 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" text,
"Result" text
) | What district is Wyatt Aiken in? | SELECT "District" FROM table_35259 WHERE "Incumbent" = 'wyatt aiken' | wikisql |
CREATE TABLE table_name_15 (
opponent VARCHAR,
date VARCHAR
) | Who was the opponent for the game played on September 19, 1994? | SELECT opponent FROM table_name_15 WHERE date = "september 19, 1994" | sql_create_context |
CREATE TABLE zyjzjlb_jybgb (
YLJGDM_ZYJZJLB text,
BGDH number,
YLJGDM 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 te... | 列出患者20499920在10年5月11日到20年4月9日内被开出的所有检验报告单的检验报告单号是多少? | 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 = '20499920' AND jybgb.BGRQ BETWEEN '2010-05-11' AND '2020-04-09' UNION... | css |
CREATE TABLE table_19344 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Ground" text,
"Crowd" text,
"Date" text,
"Time" text,
"Report" text
) | What is the total number of attendees where the home team was Port Adelaide? | SELECT COUNT("Crowd") FROM table_19344 WHERE "Home team" = 'Port Adelaide' | wikisql |
CREATE TABLE table_train_52 (
"id" int,
"pregnancy_or_lactation" bool,
"consent" bool,
"surgery" bool,
"hemodynamic_instability" bool,
"age" float,
"NOUSE" float
) | pregnancy ( bhcg test positivity ) | SELECT * FROM table_train_52 WHERE pregnancy_or_lactation = 1 | criteria2sql |
CREATE TABLE table_17489 (
"Series #" real,
"Season #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (millions)" text
) | How many U.S Viewers, in millions, were for series # 26? | SELECT "U.S. viewers (millions)" FROM table_17489 WHERE "Series #" = '26' | wikisql |
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 Video_Games (
GameID INTEGER,
GName VARCHAR(40),
GType VARCHAR(40)
)
CREATE TABLE Plays_Games (
S... | How many students play each sport Show bar chart, and could you sort by the Y-axis in ascending please? | SELECT SportName, COUNT(*) FROM SportsInfo GROUP BY SportName ORDER BY COUNT(*) | nvbench |
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time... | what are the new prescriptions of patient 808 today vs. the prescription yesterday? | SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 808) AND DATETIME(prescriptions.startdate, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT prescriptions.drug FROM prescriptions WHERE p... | mimic_iii |
CREATE TABLE table_55088 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Record" text
) | On August 10, what was the record against the Expos? | SELECT "Record" FROM table_55088 WHERE "Opponent" = 'expos' AND "Date" = 'august 10' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE mzjzjlb_jybgb (
YLJGDM_MZJZJLB text,
BGDH number,
YLJGDM number
)
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
... | 在2002年7月29日到2003年2月5日这段时间内患者60923283被开出的所有检验报告单的科室编码是什么?科室名称是啥啊? | SELECT jybgb.KSBM, jybgb.KSMC FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN mzjzjlb_jybgb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND mzjzjlb_jybgb.YLJGDM = jybgb.YLJGDM AND mzjzjlb... | css |
CREATE TABLE table_2266230_1 (
manufacturer VARCHAR,
driver VARCHAR,
year VARCHAR
) | Name the manufacturer for cale yarborough for 1984 | SELECT manufacturer FROM table_2266230_1 WHERE driver = "Cale Yarborough" AND year = "1984" | sql_create_context |
CREATE TABLE table_62434 (
"Year" real,
"Miss Universe Philippines" text,
"Binibining Pilipinas-World" text,
"Binibining Pilipinas-International" text,
"Binibining Pilipinas-Tourism" text,
"First runner-up" text,
"Second runner-up" text
) | When Bianca Manalo won Miss Universe Philippines who was the second runner-up? | SELECT "Second runner-up" FROM table_62434 WHERE "Miss Universe Philippines" = 'bianca manalo' | wikisql |
CREATE TABLE ReviewTaskStates (
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 PostHistoryTypes (
I... | Select * from PostFeedback where IsAnonymous = 1. | SELECT COUNT(*), TIME_TO_STR(CreationDate, '%-mo%Mt%-I') FROM PostFeedback WHERE IsAnonymous = 1 GROUP BY TIME_TO_STR(CreationDate, '%-mo%Mt%-I') | sede |
CREATE TABLE table_name_59 (
grid VARCHAR,
rider VARCHAR,
laps VARCHAR
) | What is the total grid number when Fonsi Nieto had more than 22 laps? | SELECT COUNT(grid) FROM table_name_59 WHERE rider = "fonsi nieto" AND laps > 22 | sql_create_context |
CREATE TABLE table_name_79 (
total INTEGER,
nation VARCHAR,
gold VARCHAR
) | What is the lowest total from slovenia with a Gold smaller than 0? | SELECT MIN(total) FROM table_name_79 WHERE nation = "slovenia" AND gold < 0 | sql_create_context |
CREATE TABLE table_204_267 (
id number,
"tie no" number,
"home team" text,
"score" text,
"away team" text,
"date" text
) | what home team had the same score as aston villa on january 28th , 1922 ? | SELECT "home team" FROM table_204_267 WHERE "home team" <> 'aston villa' AND "score" = (SELECT "score" FROM table_204_267 WHERE "home team" = 'aston villa') AND "date" = '28 january 1922' | squall |
CREATE TABLE table_18201 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Status" text,
"Opponent" text
) | What party won in the district Georgia7? | SELECT "Party" FROM table_18201 WHERE "District" = 'Georgia7' | wikisql |
CREATE TABLE table_name_9 (
opponent VARCHAR,
round VARCHAR
) | Who was the opponent at the qf(r) round? | SELECT opponent FROM table_name_9 WHERE round = "qf(r)" | sql_create_context |
CREATE TABLE table_23718905_6 (
television VARCHAR,
matchup_results VARCHAR
) | How many different items appear in the television column when the results where Iowa State 14, Minnesota 13? | SELECT COUNT(television) FROM table_23718905_6 WHERE matchup_results = "Iowa State 14, Minnesota 13" | sql_create_context |
CREATE TABLE table_55118 (
"Region" text,
"Capital" text,
"Area (km\u00b2)" text,
"Area (sq. mi.)" text,
"Population" text,
"GDP ( bn )" text
) | What is the GDP for the region with an area of 7,263 sq. mi.? | SELECT "GDP ( bn )" FROM table_55118 WHERE "Area (sq. mi.)" = '7,263' | 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,
... | 患者任同和的地高辛情况在05年7月20日到2016年2月21日内啥样? | SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN hz_info_mzjzjlb ON person_info.RYBH = hz_info.RYBH AND 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_MZJZ... | css |
CREATE TABLE table_name_88 (
band VARCHAR,
frequency VARCHAR
) | Name the band with frequency of 102.3 | SELECT band FROM table_name_88 WHERE frequency = "102.3" | sql_create_context |
CREATE TABLE table_74257 (
"Year" real,
"Round" real,
"Winner" text,
"Hawthorn score" text,
"St Kilda score" text,
"Attendance" real,
"Venue" text,
"Silk-Miller Medallist" text
) | What the listed in round when the hawthorn score is 17.7.109? | SELECT MAX("Round") FROM table_74257 WHERE "Hawthorn score" = '17.7.109' | wikisql |
CREATE TABLE company (
Headquarters VARCHAR,
Industry VARCHAR
) | Show the headquarters that have both companies in banking industry and companies in oil and gas industry. | SELECT Headquarters FROM company WHERE Industry = "Banking" INTERSECT SELECT Headquarters FROM company WHERE Industry = "Oil and gas" | sql_create_context |
CREATE TABLE table_203_835 (
id number,
"season" text,
"club" text,
"country" text,
"competition" text,
"apps." number,
"goals" number
) | which competition occurred the most ? | SELECT "competition" FROM table_203_835 GROUP BY "competition" ORDER BY COUNT(*) DESC LIMIT 1 | squall |
CREATE TABLE table_2071644_2 (
weight__kg_m_ VARCHAR,
cross_section_area__cm_2__ VARCHAR
) | What is the weight with a cross section area of 25.3? | SELECT weight__kg_m_ FROM table_2071644_2 WHERE cross_section_area__cm_2__ = "25.3" | 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 demographic (... | count the number of patients whose admission year is less than 2155 and procedure short title is dx ultrasound-heart? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2155" AND procedures.short_title = "Dx ultrasound-heart" | mimicsql_data |
CREATE TABLE table_77410 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | What is Player, when Country is 'England', and when Place is 'T7'? | SELECT "Player" FROM table_77410 WHERE "Country" = 'england' AND "Place" = 't7' | wikisql |
CREATE TABLE table_60563 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent" text,
"Score" text
) | The game played 31 May 2010 was played on what surface? | SELECT "Surface" FROM table_60563 WHERE "Date" = '31 may 2010' | wikisql |
CREATE TABLE mountain (
id int,
name text,
Height real,
Prominence real,
Range text,
Country text
)
CREATE TABLE camera_lens (
id int,
brand text,
name text,
focal_length_mm real,
max_aperture real
)
CREATE TABLE photos (
id int,
camera_lens_id int,
mountain_id ... | What are the names of photos taken with the lens brand 'Sigma' or 'Olympus', and count them by a bar chart, sort by the x axis in asc. | SELECT T1.name, COUNT(T1.name) FROM camera_lens AS T1 JOIN photos AS T2 ON T2.camera_lens_id = T1.id WHERE T1.brand = 'Sigma' OR T1.brand = 'Olympus' GROUP BY T1.name ORDER BY T1.name | nvbench |
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
) | Return a bar chart on what are the names and average prices of products for manufacturers whose products cost on average 150 or more?, and I want to display y axis in ascending order. | SELECT T2.Name, AVG(T1.Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY AVG(T1.Price) | nvbench |
CREATE TABLE table_15322 (
"Version" text,
"Code name" text,
"Release date" text,
"API level" real,
"Distribution" text
) | with release date of february 9, 2011, what is the api level? | SELECT AVG("API level") FROM table_15322 WHERE "Release date" = 'february 9, 2011' | wikisql |
CREATE TABLE table_63714 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | What is the rank of the country with total more than 3 and more than 6 silver? | SELECT "Rank" FROM table_63714 WHERE "Total" > '3' AND "Silver" > '6' | wikisql |
CREATE TABLE table_204_9 (
id number,
"week" number,
"date" text,
"opponent" text,
"result" text,
"attendance" number
) | what is the total number of opponent ? | SELECT COUNT("opponent") FROM table_204_9 | squall |
CREATE TABLE table_65219 (
"School" text,
"Location" text,
"Mascot" text,
"County" text,
"Year Joined" real,
"Year Left" real,
"Conference Joined" text
) | What's the highest Year Left for the School of Danville? | SELECT MAX("Year Left") FROM table_65219 WHERE "School" = 'danville' | wikisql |
CREATE TABLE jybgb_jyjgzbb (
JYZBLSH number,
YLJGDM text,
jyjgzbb_id number
)
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH... | 检验报告单07524794645和检验报告单69656792404中名称相同的检测指标没有有?列出这些检测指标名称和检测指标结果单位及其定量、对应的检验报告单号都分别是什么? | SELECT jyjgzbb.JCZBMC, jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW, jyjgzbb.BGDH FROM jyjgzbb WHERE jyjgzbb.BGDH = '69656792404' OR jyjgzbb.BGDH = '07524794645' AND jyjgzbb.JCZBMC IN (SELECT jyjgzbb.JCZBMC FROM jyjgzbb WHERE jyjgzbb.BGDH = '69656792404' INTERSECT SELECT jyjgzbb.JCZBMC FROM jyjgzbb WHERE jyjgzbb.BGDH = '07524794... | css |
CREATE TABLE table_204_706 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"notes" text
) | how many times did his jump surpass 7.70 m ? | SELECT COUNT(*) FROM table_204_706 WHERE "notes" > 7.70 | squall |
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
good_feedback int,
tough_... | What is the easiest class I can take to get the MDE requirement fulfilled ? | SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%MDE%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_cou... | advising |
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,
... | what was the last output that patient 022-20829 has had on the first intensive care unit visit? | SELECT intakeoutput.celllabel FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-20829') AND NOT patient.unitdischargetime IS NULL ORDER ... | eicu |
CREATE TABLE table_32103 (
"Title" text,
"Japan" text,
"North America" text,
"Europe" text,
"Australia" text
) | Tell me north america for january 23, 2013 | SELECT "North America" FROM table_32103 WHERE "Japan" = 'january 23, 2013' | wikisql |
CREATE TABLE Video_Games (
GameID INTEGER,
GName VARCHAR(40),
GType VARCHAR(40)
)
CREATE TABLE SportsInfo (
StuID INTEGER,
SportName VARCHAR(32),
HoursPerWeek INTEGER,
GamesPlayed INTEGER,
OnScholarship VARCHAR(1)
)
CREATE TABLE Plays_Games (
StuID INTEGER,
GameID INTEGER,
... | Show all sport name and the number of students in a bar chart, sort from high to low by the Y. | SELECT SportName, COUNT(*) FROM SportsInfo GROUP BY SportName ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CRE... | Users with reputation > X by Join Date. | SELECT TOT.cYear, TOT.cMonth, totalUsers, repUsers, (1.0 * repUsers / totalUsers) AS Percentage FROM (SELECT YEAR(CreationDate) AS cYear, MONTH(CreationDate) AS cMonth, COUNT(*) AS repUsers FROM Users WHERE Reputation > '##baseRep##' GROUP BY YEAR(CreationDate), MONTH(CreationDate)) AS REP JOIN (SELECT YEAR(CreationDat... | sede |
CREATE TABLE table_28068063_2 (
match_points VARCHAR,
winners VARCHAR
) | What was the match points score for the match won by Connacht? | SELECT match_points FROM table_28068063_2 WHERE winners = "Connacht" | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | count the number of patients whose year of birth is less than 2090 and drug route is ih? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2090" AND prescriptions.route = "IH" | mimicsql_data |
CREATE TABLE table_5193 (
"Round" real,
"Player" text,
"Position" text,
"Nationality" text,
"College/Junior/Club Team" text
) | What is the round number of Jessie Rezansoff, who plays right wing? | SELECT SUM("Round") FROM table_5193 WHERE "Position" = 'right wing' AND "Player" = 'jessie rezansoff' | wikisql |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | 能告诉我病人金秀筠所有医疗记录中医疗费总额不低于8263.6元的入院诊断疾病编码和名称吗 | SELECT t_kc24.t_kc21_IN_DIAG_DIS_CD, t_kc24.t_kc21_IN_DIAG_DIS_NM FROM t_kc24 WHERE t_kc24.t_kc21_PERSON_NM = '金秀筠' AND t_kc24.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 8263.6) | css |
CREATE TABLE table_6281 (
"Runs" real,
"Match" real,
"City/Country" text,
"Venue" text,
"Year" real
) | Which Match has Runs of 100, and a Year larger than 1994? | SELECT SUM("Match") FROM table_6281 WHERE "Runs" = '100' AND "Year" > '1994' | wikisql |
CREATE TABLE table_18455 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | What is the first elected for georgia 4? | SELECT "First elected" FROM table_18455 WHERE "District" = 'Georgia 4' | wikisql |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
C... | what is drug route of drug name dexamethasone? | SELECT prescriptions.route FROM prescriptions WHERE prescriptions.drug = "Dexamethasone" | mimicsql_data |
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
Creati... | User List: Top N - Armenia - with false positive exclusions. | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, Location, LastAccessDate, UpVotes, DownVotes FROM Users WHERE (Location LIKE '%Armenia%' OR Location LIKE '%Yerevan%') AND NOT (Location LIKE '%Colombia%' OR Location LIKE '%Quind%o%') LIMIT 100 | sede |
CREATE TABLE table_name_35 (
opposing_teams VARCHAR,
against VARCHAR,
venue VARCHAR
) | What is Opposing Teams, when Against is '20', and when Venue is 'Twickenham , London'? | SELECT opposing_teams FROM table_name_35 WHERE against = 20 AND venue = "twickenham , london" | sql_create_context |
CREATE TABLE table_50220 (
"Date" text,
"Opponent#" text,
"Rank #" text,
"Site" text,
"Result" text,
"Attendance" text
) | What was the result when they played at Michigan State? | SELECT "Result" FROM table_50220 WHERE "Opponent#" = 'at michigan state' | wikisql |
CREATE TABLE table_42261 (
"Position" text,
"Jersey number" real,
"Name v t e" text,
"Height (cm)" real,
"Weight (kg)" real,
"Birthplace" text,
"2009-10 team" text,
"NHL rights, if any" text
) | What is the birthplace of the player who is 190 CM tall, plays the D position, and wears number 11? | SELECT "Birthplace" FROM table_42261 WHERE "Position" = 'd' AND "Height (cm)" = '190' AND "Jersey number" = '11' | 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... | what percentile is a -monos value of 13.0 among patients of the same age as patient 027-136480 during their current hospital encounter? | SELECT DISTINCT t1.c1 FROM (SELECT lab.labresult, PERCENT_RANK() OVER (ORDER BY lab.labresult) AS c1 FROM lab WHERE lab.labname = '-monos' AND lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age = (SELECT patient.age FROM patient WHERE patient.uniquepid = '027-136480' AND patient.h... | eicu |
CREATE TABLE table_204_191 (
id number,
"title" text,
"artist" text,
"year" text,
"location/gps coordinates" text,
"material" text,
"dimensions" text,
"owner" text
) | what was the first work completed ? | SELECT "title" FROM table_204_191 ORDER BY "year" LIMIT 1 | squall |
CREATE TABLE table_17798093_20 (
examples VARCHAR,
australian VARCHAR
) | which examples are pronounced et in australian | SELECT examples FROM table_17798093_20 WHERE australian = "et" | sql_create_context |
CREATE TABLE table_name_53 (
laps INTEGER,
grid VARCHAR
) | What is the sum of laps for grid 20? | SELECT SUM(laps) FROM table_name_53 WHERE grid = 20 | sql_create_context |
CREATE TABLE table_name_12 (
tournament VARCHAR,
runner_s__up VARCHAR
) | What tournament had a runner(s)-up of Scott Hoch & Kenny Perry? | SELECT tournament FROM table_name_12 WHERE runner_s__up = "scott hoch & kenny perry" | sql_create_context |
CREATE TABLE table_name_80 (
director_s_ VARCHAR,
recipient VARCHAR
) | Who directed a film for Cracking Film Productions? | SELECT director_s_ FROM table_name_80 WHERE recipient = "cracking film productions" | sql_create_context |
CREATE TABLE table_203_531 (
id number,
"date" text,
"tournament" text,
"location" text,
"winner" text,
"score" text,
"1st prize ($)" number
) | the mercedes championships and sony open in hawaii are located in what state ? | SELECT "location" FROM table_203_531 WHERE "tournament" = 'mercedes championships' | squall |
CREATE TABLE table_75748 (
"Type" text,
"Zinc\u2013carbon" text,
"Alkaline" text,
"Li-FeS 2" text,
"NiCd" text,
"NiMH" text
) | What is NiCd, when Type is 'Capacity under 500mA constant Drain'? | SELECT "NiCd" FROM table_75748 WHERE "Type" = 'capacity under 500ma constant drain' | wikisql |
CREATE TABLE table_name_74 (
pick INTEGER,
player VARCHAR,
round VARCHAR
) | What was the average pick with Ed O'Bannon and a round smaller than 1? | SELECT AVG(pick) FROM table_name_74 WHERE player = "ed o'bannon" AND round < 1 | sql_create_context |
CREATE TABLE table_40909 (
"Administrative Panel" real,
"Agricultural Panel" real,
"Cultural and Educational Panel" real,
"Industrial and Commercial Panel" real,
"Labour Panel" real,
"National University of Ireland" real,
"University of Dublin" real,
"Nominated by the Taoiseach" real,
... | What was the average number of members Nominated by the Taoiseach, when the Agricultural Panel had less than 1 member, and when the Administrative Panel had fewer than 0 members? | SELECT AVG("Nominated by the Taoiseach") FROM table_40909 WHERE "Agricultural Panel" < '1' AND "Administrative Panel" < '0' | wikisql |
CREATE TABLE table_name_99 (
color_commentator_s_ VARCHAR,
play_by_play VARCHAR,
flagship_station VARCHAR
) | Play-by-play of sean grande, and a Flagship Station of wrko involved what color commentator? | SELECT color_commentator_s_ FROM table_name_99 WHERE play_by_play = "sean grande" AND flagship_station = "wrko" | 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, return a scatter chart about the correlation between price and code , and group by attribute name. | SELECT T1.Price, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Name | nvbench |
CREATE TABLE table_2134521_1 (
pop__2001_ VARCHAR,
pop__1996_ VARCHAR
) | How many different results of the population count in 2001 are there for the census division whose population in 1996 is 880859? | SELECT COUNT(pop__2001_) FROM table_2134521_1 WHERE pop__1996_ = 880859 | sql_create_context |
CREATE TABLE table_27922491_24 (
Id VARCHAR
) | What is the minimum number of 50s scored? | SELECT MIN(50 AS s) FROM table_27922491_24 | sql_create_context |
CREATE TABLE table_200_32 (
id number,
"year" number,
"w" number,
"l" number,
"t" number,
"finish" text,
"coach" text
) | the muncie flyers played from 1910 to 1925 in all but one of those years . which year did the flyers not play ? | SELECT "year" FROM table_200_32 WHERE "w" IS NULL | squall |
CREATE TABLE table_name_64 (
coding VARCHAR,
genbank_id VARCHAR
) | What was the 3 UTR sequence when Coding was 6a 3 and the GenBank id is nm_001093770.2? | SELECT 3 AS ’utr_sequence FROM table_name_64 WHERE coding = "6a 3" AND genbank_id = "nm_001093770.2" | sql_create_context |
CREATE TABLE table_38769 (
"Medal" text,
"Name" text,
"Games" text,
"Sport" text,
"Event" text
) | What medal was won in the 1996 Atlanta games in wrestling? | SELECT "Medal" FROM table_38769 WHERE "Games" = '1996 atlanta' AND "Sport" = 'wrestling' | wikisql |
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
... | For all employees who have the letters D or S in their first name, find hire_date and the sum of employee_id bin hire_date by weekday, and visualize them by a bar chart, display by the Y in asc. | SELECT HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY SUM(EMPLOYEE_ID) | nvbench |
CREATE TABLE table_44833 (
"Game" text,
"Date" text,
"Team" text,
"Score" text,
"Location Attendance" text,
"Series" text
) | What is the Date of the game with a Score of L 115 118 (OT)? | SELECT "Date" FROM table_44833 WHERE "Score" = 'l 115–118 (ot)' | wikisql |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto 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
)
CREATE TABLE pat... | what are the three most frequent diagnoses that patients were diagnosed within 2 months after receiving a peripheral nerve graft? | SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissi... | mimic_iii |
CREATE TABLE table_name_10 (
state VARCHAR,
venue VARCHAR
) | Which state includes the Harry A. Gampel Pavilion venue? | SELECT state FROM table_name_10 WHERE venue = "harry a. gampel pavilion" | sql_create_context |
CREATE TABLE table_204_636 (
id number,
"season" text,
"tier" number,
"division" text,
"pos." text,
"notes" text
) | which tier appears the most ? | SELECT "tier" FROM table_204_636 GROUP BY "tier" ORDER BY COUNT(*) DESC LIMIT 1 | squall |
CREATE TABLE table_59065 (
"Shooter" text,
"Event" text,
"Rank points" text,
"Score points" text,
"Total" text
) | Which shooter had a total of 11 at the WC Munich with a score of 6? | SELECT "Shooter" FROM table_59065 WHERE "Total" = '11' AND "Event" = 'wc munich' AND "Score points" = '6' | wikisql |
CREATE TABLE table_60530 (
"First round" text,
"Semifinals" real,
"Conference Finals" real,
"Finals" real,
"Total" real
) | Can you tell me the total number of Total that has the First round of 0, and the Finals smaller than 5? | SELECT COUNT("Total") FROM table_60530 WHERE "First round" = '0' AND "Finals" < '5' | wikisql |
CREATE TABLE table_name_81 (
part_1 VARCHAR,
class VARCHAR
) | What is the entry for Part 1 for class 7d? | SELECT part_1 FROM table_name_81 WHERE class = "7d" | sql_create_context |
CREATE TABLE table_13802 (
"Model number" text,
"sSpec number" text,
"Cores" text,
"Frequency" text,
"Turbo" text,
"L2 cache" text,
"L3 cache" text,
"GPU model" text,
"GPU frequency" text,
"Socket" text,
"I/O bus" text,
"Release date" text,
"Part number(s)" text,
... | Which Release price (USD ) that has a Release date on april 2012 and a Part number(s) of cm8063701211900bx80637i73770s? | SELECT "Release price ( USD )" FROM table_13802 WHERE "Release date" = 'april 2012' AND "Part number(s)" = 'cm8063701211900bx80637i73770s' | wikisql |
CREATE TABLE table_name_83 (
builder VARCHAR,
length VARCHAR,
delivery VARCHAR
) | Who built the ship that is 42.8 m long and was delivered in 2007? | SELECT builder FROM table_name_83 WHERE length = "42.8 m" AND delivery = 2007 | sql_create_context |
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 maximum days of hospital stay of patients whose primary disease is atrial fibrillation\thoracoscopic maze procedure bilateral/sda? | SELECT MAX(demographic.days_stay) FROM demographic WHERE demographic.diagnosis = "ATRIAL FIBRILLATION\THORACOSCOPIC MAZE PROCEDURE BILATERAL/SDA" | mimicsql_data |
CREATE TABLE table_44785 (
"Name of Deity" text,
"Bhuta(Tatwa)" text,
"Name of the Stone (Sila)" text,
"Name of the River" text,
"Name of the State where found in India" text
) | What is the name of the diety for the river of sone? | SELECT "Name of Deity" FROM table_44785 WHERE "Name of the River" = 'sone' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.