context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_24538587_11 ( i_o_bus VARCHAR, brand_name__list_ VARCHAR )
What is the i/o bus for the brand name Core i3-21xx?
SELECT i_o_bus FROM table_24538587_11 WHERE brand_name__list_ = "Core i3-21xx"
sql_create_context
CREATE TABLE table_54822 ( "Rank" text, "Name" text, "Height m (ft)" text, "Floors" real, "Year" real )
What is the name of the building housing more than 101 floors, that was built after 2006?
SELECT "Name" FROM table_54822 WHERE "Year" > '2006' AND "Floors" > '101'
wikisql
CREATE TABLE table_name_34 ( against INTEGER, losses VARCHAR, byes VARCHAR )
What is the total number of against when they had 14 losses and more than 0 byes?
SELECT SUM(against) FROM table_name_34 WHERE losses = 14 AND byes > 0
sql_create_context
CREATE TABLE table_name_13 ( score VARCHAR, country VARCHAR )
What did the golfer from Australia score?
SELECT score FROM table_name_13 WHERE country = "australia"
sql_create_context
CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text...
List of all tagnames (each with one post).
SELECT t.TagName, MIN(q.Id) AS "post_link" FROM Tags AS t INNER JOIN PostTags AS pt ON t.Id = pt.TagId INNER JOIN Posts AS q ON q.Id = pt.PostId GROUP BY t.TagName ORDER BY t.TagName
sede
CREATE TABLE table_name_98 ( _number_of_bids VARCHAR, conference VARCHAR )
How many bids does Atlantic 10 have?
SELECT _number_of_bids FROM table_name_98 WHERE conference = "atlantic 10"
sql_create_context
CREATE TABLE table_45484 ( "Year" real, "Australian Open" text, "French Open" text, "Wimbledon" text, "US Open" text )
What is the total number of years Andy Murray was at Wimbledon?
SELECT COUNT("Year") FROM table_45484 WHERE "Wimbledon" = 'andy murray'
wikisql
CREATE TABLE table_name_64 ( laps INTEGER, constructor VARCHAR, grid VARCHAR )
What is the least number of laps for the constructor Ferrari and where the grid number was less than 4?
SELECT MIN(laps) FROM table_name_64 WHERE constructor = "ferrari" AND grid < 4
sql_create_context
CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int )...
When will EECS 582 be offered ?
SELECT DISTINCT semester.semester, semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 582 AND course_offering.semester = semester.semester_id AND semester.semester_id > (SELECT SEMESTERalias1.semester_id FROM semeste...
advising
CREATE TABLE table_1208 ( "Episode No." text, "Episode Title" text, "UK Broadcast Date" text, "Presenter" text, "Countries Visited" text )
What episode number is presented by Ben Okri ?
SELECT "Episode No." FROM table_1208 WHERE "Presenter" = 'Ben Okri'
wikisql
CREATE TABLE table_51322 ( "Episode" text, "Air Date" text, "Timeslot (EST)" text, "Season" real, "Rating" real, "Share" real, "18\u201349" real, "Viewers (m)" real, "Rank (#)" text )
What is the average rating of viewers 18 to 49 where the total viewer count is 3.93 million and share less than 4?
SELECT AVG("18\u201349") FROM table_51322 WHERE "Viewers (m)" = '3.93' AND "Share" < '4'
wikisql
CREATE TABLE table_2668264_8 ( candidates VARCHAR, result VARCHAR )
Who were the candidates for election that had a result of a retired jacksonian gain?
SELECT candidates FROM table_2668264_8 WHERE result = "Retired Jacksonian gain"
sql_create_context
CREATE TABLE table_39340 ( "Season" real, "Winner" text, "Score" text, "Runner-up" text, "Venue" text )
Who is the Runner-up that has a Season less than 2005?
SELECT "Runner-up" FROM table_39340 WHERE "Season" < '2005'
wikisql
CREATE TABLE table_66527 ( "Airing date" text, "English title (Chinese title)" text, "Number of episodes" real, "Theme song (T) Sub-theme song (ST)" text, "Genre" text )
Which Airing date has a Number of episodes larger than 20, and a Genre of modern drama?
SELECT "Airing date" FROM table_66527 WHERE "Number of episodes" > '20' AND "Genre" = 'modern drama'
wikisql
CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text ) CREATE TABLE university ( Scho...
Show me about the distribution of All_Games and Team_ID in a bar chart, display in desc by the y-axis.
SELECT All_Games, Team_ID FROM basketball_match ORDER BY Team_ID DESC
nvbench
CREATE TABLE table_name_11 ( date_of_birth VARCHAR, player VARCHAR )
What is the birth date for Mervyn Dillon?
SELECT date_of_birth FROM table_name_11 WHERE player = "mervyn dillon"
sql_create_context
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE outputevents ( row_id number, subject_id number, ...
what were the four most commonly given microbiology tests a year before for patients who had previously undergone packed cell transfusion within the same hospital visit?
SELECT t3.spec_type_desc FROM (SELECT t2.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime, admissions.hadm_id FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_pro...
mimic_iii
CREATE TABLE table_15352 ( "Media market name" text, "Callsign" text, "Analog" text, "Digital" text, "Affiliation" text )
what is the analog type for cw on digital 26?
SELECT "Analog" FROM table_15352 WHERE "Affiliation" = 'cw' AND "Digital" = '26'
wikisql
CREATE TABLE journal ( Journal_ID int, Date text, Theme text, Sales int ) CREATE TABLE editor ( Editor_ID int, Name text, Age real ) CREATE TABLE journal_committee ( Editor_ID int, Journal_ID int, Work_Type text )
Display a bar chart for the names and the ages of editors, list by the bar from low to high.
SELECT Name, Age FROM editor ORDER BY Name
nvbench
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...
Find All_Road and Team_ID , and visualize them by a bar chart.
SELECT All_Road, Team_ID FROM basketball_match
nvbench
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, ...
what are the top three most frequent procedures among the patients who have 20s since 3 years ago?
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age B...
mimic_iii
CREATE TABLE captain ( Captain_ID int, Name text, Ship_ID int, age text, Class text, Rank text ) CREATE TABLE Ship ( Ship_ID int, Name text, Type text, Built_Year real, Class text, Flag text )
How many captains with younger than 50 are in each rank. Visualize by pie chart.
SELECT Rank, COUNT(*) FROM captain WHERE age < 50 GROUP BY Rank
nvbench
CREATE TABLE table_56456 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
Which home team scored 18.11 (119)?
SELECT "Home team" FROM table_56456 WHERE "Home team score" = '18.11 (119)'
wikisql
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), ...
For those employees who was hired before 2002-06-21, a line chart shows the change of manager_id over hire_date, display X-axis in descending order.
SELECT HIRE_DATE, MANAGER_ID FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY HIRE_DATE DESC
nvbench
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ...
what were the number of times patient 015-56390 produced a nephrostomy right output on the last icu visit?
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 = '015-56390') AND NOT patient.unitdischargetime IS NULL ORDER BY patient.uni...
eicu
CREATE TABLE labevents ( row_id number, subject_id number, hadm_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, drug text, dose...
count the number of times patient 27703's rbc, csf test has been taken last month.
SELECT COUNT(*) FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'rbc, csf') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 27703) AND DATETIME(labevents.charttime, 'start of month') = DATETIME(CURRENT_TIME(), ...
mimic_iii
CREATE TABLE table_59207 ( "Rider" text, "Bike" text, "Laps" real, "Time" text, "Grid" real )
Name the Rider which has a Time of +59.304?
SELECT "Rider" FROM table_59207 WHERE "Time" = '+59.304'
wikisql
CREATE TABLE qtb ( CLINIC_ID text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, INSU_TYPE text, IN...
名字是奚星晖的患者在医院编码5472060出院诊断疾病名称不包含社交的医疗就诊记录编号是多少呀?
SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_NM = '奚星晖' AND qtb.MED_SER_ORG_NO = '5472060' AND NOT qtb.OUT_DIAG_DIS_NM LIKE '%社交%' UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_NM = '奚星晖' AND gyb.MED_SER_ORG_NO = '5472060' AND NOT gyb.OUT_DIAG_DIS_NM LIKE '%社交%' UNION SELECT zyb.MED_CLINIC_ID FROM zyb ...
css
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...
患者何歌韵的免疫球蛋白M(标准)在2007-12-19到2017-04-22期间是怎样的
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 labevents ( row_id number, subject_id number, hadm_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, drug text, dose...
what are the three most common drugs prescribed until 1 year ago for patients of 40s?
SELECT t1.drug FROM (SELECT prescriptions.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age BETWEEN 40 AND 49) AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-1 year') GROUP BY pres...
mimic_iii
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...
从07年1月10日开始到11年12月26日之内病患葛云英医保的医疗费一共多少钱?
SELECT SUM(t_kc24.MED_AMOUT) FROM t_kc21 JOIN t_kc24 JOIN t_kc21_t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc24.MED_CLINIC_ID AND t_kc21_t_kc24.MED_SAFE_PAY_ID = t_kc24.MED_SAFE_PAY_ID WHERE t_kc21.PERSON_NM = '葛云英' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2007-01-10' AND '2011-12-26'
css
CREATE TABLE table_13981 ( "Draw" real, "Language" text, "Artist" text, "Song" text, "English translation" text, "Place" real, "Points" real )
How many points does catcat have with more than 2 draws?
SELECT AVG("Points") FROM table_13981 WHERE "Artist" = 'catcat' AND "Draw" > '2'
wikisql
CREATE TABLE table_name_23 ( bowling VARCHAR, season VARCHAR )
What is the bowling score of season 1907?
SELECT bowling FROM table_name_23 WHERE season = "1907"
sql_create_context
CREATE TABLE table_name_27 ( position VARCHAR, competition VARCHAR, year VARCHAR )
Which Position has a Competition of world championships, and a Year larger than 1997?
SELECT position FROM table_name_27 WHERE competition = "world championships" AND year > 1997
sql_create_context
CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), SALARY decimal(8,2), COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0), DEPARTMENT_ID decimal(...
For those employees who did not have any job in the past, what is the relationship between salary and manager_id ?
SELECT SALARY, MANAGER_ID FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history)
nvbench
CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE program ( program_id int, name varchar, ...
What courses are required as a prerequisite to LATINOAM 204 ?
SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND NOT COURSE_0.course_id IN (SELECT STUDENT_RECORDalias0.course_id FROM student_record AS STUDENT_RECORDalias0 WHERE STUDENT...
advising
CREATE TABLE table_name_19 ( height__cm_ VARCHAR, jersey__number VARCHAR, name VARCHAR )
How many different Heights (cm) did Mark Fusco have, when his Jersey # was less than 16?
SELECT COUNT(height__cm_) FROM table_name_19 WHERE jersey__number < 16 AND name = "mark fusco"
sql_create_context
CREATE TABLE table_7716 ( "Season" real, "Overall" real, "Slalom" text, "Super G" real, "Downhill" text, "Combined" text )
What is the highest Super G, when Season is later than 1996?
SELECT MAX("Super G") FROM table_7716 WHERE "Season" > '1996'
wikisql
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 is the name of drug patient 015-1581 has been prescribed two or more times until 57 months ago?
SELECT t1.drugname FROM (SELECT medication.drugname, COUNT(medication.drugstarttime) AS c1 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015...
eicu
CREATE TABLE Allergy_Type ( Allergy VARCHAR(20), AllergyType VARCHAR(20) ) CREATE TABLE Has_Allergy ( StuID INTEGER, Allergy VARCHAR(20) ) CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER...
How many students are affected by each allergy type Visualize by bar chart, order by the X-axis in ascending.
SELECT AllergyType, COUNT(*) FROM Has_Allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy GROUP BY T2.AllergyType ORDER BY AllergyType
nvbench
CREATE TABLE table_16884579_1 ( seasons_and_winners VARCHAR, premiere VARCHAR )
Name the seasons and winners that airs 28 january 2007
SELECT seasons_and_winners FROM table_16884579_1 WHERE premiere = "28 January 2007"
sql_create_context
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 minimum age of patients whose primary disease is gangrene and days of hospital stay is 27?
SELECT MIN(demographic.age) FROM demographic WHERE demographic.diagnosis = "GANGRENE" AND demographic.days_stay = "27"
mimicsql_data
CREATE TABLE table_name_35 ( score VARCHAR, december VARCHAR, points VARCHAR, game VARCHAR )
Which Score has Points larger than 46, and a Game smaller than 35, and a December of 21?
SELECT score FROM table_name_35 WHERE points > 46 AND game < 35 AND december = 21
sql_create_context
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE diagnoses_icd ( row_id number, subject_i...
what is the dose of phenylephrine hcl, that patient 12274 was first prescribed in 01/2105?
SELECT prescriptions.dose_val_rx FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 12274) AND prescriptions.drug = 'phenylephrine hcl' AND STRFTIME('%y-%m', prescriptions.startdate) = '2105-01' ORDER BY prescriptions.startdate LIMIT 1
mimic_iii
CREATE TABLE table_203_358 ( id number, "pos." number, "athlete" text, "run 1" number, "run 2" number, "total" text )
how long did it take for jan urfer to complete run 2 ?
SELECT "run 2" FROM table_203_358 WHERE "athlete" = 'jan urfer'
squall
CREATE TABLE table_39366 ( "Game" real, "December" real, "Opponent" text, "Score" text, "Record" text )
Which game has an opponent of Phoenix Coyotes and was before Dec 9?
SELECT AVG("Game") FROM table_39366 WHERE "Opponent" = 'phoenix coyotes' AND "December" < '9'
wikisql
CREATE TABLE table_13079788_3 ( date VARCHAR, gt3_winner VARCHAR )
what are all the date for gt3 winner oliver bryant matt harris
SELECT date FROM table_13079788_3 WHERE gt3_winner = "Oliver Bryant Matt Harris"
sql_create_context
CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text, meter_300 text, meter_40...
Visualize a bar chart about the distribution of Time and meter_100 , could you display in descending by the x-axis?
SELECT Time, meter_100 FROM swimmer ORDER BY Time DESC
nvbench
CREATE TABLE table_name_31 ( original_nfl_team VARCHAR, pos VARCHAR )
What is the Original NFL team of the CB Player?
SELECT original_nfl_team FROM table_name_31 WHERE pos = "cb"
sql_create_context
CREATE TABLE table_68651 ( "Tournament" text, "2003" text, "2007" text, "2008" text, "2009" text, "2011" text )
What is the 2007 value with 2r in 2011 and 2r in 2008?
SELECT "2007" FROM table_68651 WHERE "2011" = '2r' AND "2008" = '2r'
wikisql
CREATE TABLE table_204_53 ( id number, "date" text, "result" text, "opponent" text, "event" text, "location" text, "method" text, "round" number, "time" text )
how many matches were held in the netherlands ?
SELECT COUNT("event") FROM table_204_53 WHERE "location" = 'netherlands'
squall
CREATE TABLE table_203_860 ( id number, "rank" number, "city" text, "population (2011)" number, "population (2001)" number, "state/territory" text )
who is ranked before delhi ?
SELECT "city" FROM table_203_860 WHERE "rank" = (SELECT "rank" FROM table_203_860 WHERE "city" = 'delhi') - 1
squall
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...
自2002-09-25到2006-02-25,编号9853882的医疗机构的医疗费总额是多少
SELECT SUM(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.t_kc21_MED_SER_ORG_NO = '9853882' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2002-09-25' AND '2006-02-25'
css
CREATE TABLE table_name_58 ( percent_of_mass VARCHAR, molecules VARCHAR )
what is the perfect of mass when the molecules is 1.74e14*?
SELECT percent_of_mass FROM table_name_58 WHERE molecules = "1.74e14*"
sql_create_context
CREATE TABLE table_name_49 ( tournament VARCHAR, winning_score VARCHAR )
What Tournament had a Winning score of 6 (73-68-72-69=282)?
SELECT tournament FROM table_name_49 WHERE winning_score = –6(73 - 68 - 72 - 69 = 282)
sql_create_context
CREATE TABLE table_name_93 ( lost INTEGER, against VARCHAR, played VARCHAR )
What is the Lost with Against smaller than 25, and Played smaller than 1?
SELECT AVG(lost) FROM table_name_93 WHERE against < 25 AND played < 1
sql_create_context
CREATE TABLE Catalog_Contents_Additional_Attributes ( catalog_entry_id VARCHAR, catalog_level_number VARCHAR ) CREATE TABLE Catalog_Contents ( catalog_entry_name VARCHAR, catalog_entry_id VARCHAR )
Find the names of catalog entries with level number 8.
SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.catalog_level_number = "8"
sql_create_context
CREATE TABLE fare_basis ( fare_basis_code text, booking_class text, class_type text, premium text, economy text, discounted text, night text, season text, basis_days text ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturd...
what flights leave from CHICAGO to SEATTLE on saturday
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 = 'SEATTLE' AND date_day.day_number = 26 AND date_day.month_number = 7 AND d...
atis
CREATE TABLE table_30247 ( "No." real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" real, "U.S. viewers (million)" text )
How many production codes are there for the episode that had 4.36 million u.s. viewers?
SELECT COUNT("Production code") FROM table_30247 WHERE "U.S. viewers (million)" = '4.36'
wikisql
CREATE TABLE table_name_95 ( opponent VARCHAR, loss VARCHAR, date VARCHAR )
Loss of wilcox, and a Date of jun 18 had what opponent?
SELECT opponent FROM table_name_95 WHERE loss = "wilcox" AND date = "jun 18"
sql_create_context
CREATE TABLE table_2618113_1 ( directed_by VARCHAR, production_code VARCHAR )
Who directed k0122?
SELECT directed_by FROM table_2618113_1 WHERE production_code = "K0122"
sql_create_context
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, ZYLBDM text, ZYMC text ) CREATE TABLE mzjzjlb ( HXPLC number, HZXM ...
哪些医务人员在2012年5月30日到2014年9月25日期间为患者朱清佳检测指标204728的,提供一下工号及姓名
SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM person_info JOIN hz_info JOIN mzjzjlb JOIN zyjybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB ...
css
CREATE TABLE table_11703336_1 ( link_abilities VARCHAR, predecessors VARCHAR )
What is the link abilities when the predecessors is ti-85?
SELECT link_abilities FROM table_11703336_1 WHERE predecessors = "TI-85"
sql_create_context
CREATE TABLE table_14816 ( "Year" text, "Start" text, "Qual" text, "Rank" text, "Finish" text, "Laps" real )
What was the finish with less than 200 laps in 1953?
SELECT "Finish" FROM table_14816 WHERE "Laps" < '200' AND "Year" = '1953'
wikisql
CREATE TABLE table_7187 ( "Date" text, "Opponent" text, "Venue" text, "Result" text, "Attendance" real )
What is the Result with a Venue that is n?
SELECT "Result" FROM table_7187 WHERE "Venue" = 'n'
wikisql
CREATE TABLE paper ( paperid int, title varchar, venueid int, year int, numciting int, numcitedby int, journalid int ) CREATE TABLE venue ( venueid int, venuename varchar ) CREATE TABLE journal ( journalid int, journalname varchar ) CREATE TABLE writes ( paperid int, ...
how many papers are in emnlp ?
SELECT DISTINCT COUNT(paper.paperid) FROM paper, venue WHERE venue.venueid = paper.venueid AND venue.venuename = 'emnlp'
scholar
CREATE TABLE station_company ( Station_ID int, Company_ID int, Rank_of_the_Year int ) CREATE TABLE gas_station ( Station_ID int, Open_Year int, Location text, Manager_Name text, Vice_Manager_Name text, Representative_Name text ) CREATE TABLE company ( Company_ID int, Rank i...
How many companies that are not headquartered in the United States for each main industry? Show me a bar chart, and could you display by the total number from high to low?
SELECT Main_Industry, COUNT(Main_Industry) FROM company WHERE Headquarters <> 'USA' GROUP BY Main_Industry ORDER BY COUNT(Main_Industry) DESC
nvbench
CREATE TABLE table_name_33 ( tournament VARCHAR, partner VARCHAR, opponent_in_the_final VARCHAR )
What Tournament did Silva Partner with Nicole Thijssen with Opponent in the final Nina Bratchikova & Frederica Piedade?
SELECT tournament FROM table_name_33 WHERE partner = "nicole thijssen" AND opponent_in_the_final = "nina bratchikova & frederica piedade"
sql_create_context
CREATE TABLE table_name_72 ( goals_conceded INTEGER, played INTEGER )
If the games played are smaller than 18, what are the lowest goals conceded?
SELECT MIN(goals_conceded) FROM table_name_72 WHERE played < 18
sql_create_context
CREATE TABLE table_name_91 ( total VARCHAR, gold VARCHAR )
What is the total medal count for the nation that has 5 gold?
SELECT total FROM table_name_91 WHERE gold = "5"
sql_create_context
CREATE TABLE table_59964 ( "Week 1" text, "Week 2" text, "Week 3" text, "Week 4" text, "Week 5" text, "Week 6" text, "Week 7" text, "Week 8" text, "Week 9" text, "Week 10 FINAL" text )
What kind of Week 1 has a Week 8 of not eligible, and a Week 9 of no nominations, and a Week 3 of cyril? Question 3
SELECT "Week 1" FROM table_59964 WHERE "Week 8" = 'not eligible' AND "Week 9" = 'no nominations' AND "Week 3" = 'cyril'
wikisql
CREATE TABLE Projects ( Code Char(4), Name Char(50), Hours int ) CREATE TABLE AssignedTo ( Scientist int, Project char(4) ) CREATE TABLE Scientists ( SSN int, Name Char(30) )
What are the naems of all the projects, and how many scientists were assigned to each of them.
SELECT Name, COUNT(*) FROM Projects AS T1 JOIN AssignedTo AS T2 ON T1.Code = T2.Project GROUP BY T1.Name
nvbench
CREATE TABLE t_kc24 ( MED_SAFE_PAY_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, REF_SLT_FLG number, CLINIC_SLT_DATE time, COMP_ID text, PERSON_ID text, FLX_MED_ORG_ID text, INSU_TYPE text, MED_AMOUT number, PER_ACC_PAY number, OVE_PAY numb...
能知道患者07653980在2002.1.4到2003.6.25这段时间看的最主要的疾病吗
SELECT IN_DIAG_DIS_CD, IN_DIAG_DIS_NM FROM t_kc21 WHERE PERSON_ID = '07653980' AND IN_HOSP_DATE BETWEEN '2002-01-04' AND '2003-06-25' GROUP BY IN_DIAG_DIS_CD ORDER BY COUNT(*) DESC LIMIT 1
css
CREATE TABLE table_24575 ( "Train No." text, "Train Name" text, "Destination" text, "Category" text, "Frequency" text )
How many destinations have a weekly frequency and are named AC Express?
SELECT COUNT("Destination") FROM table_24575 WHERE "Frequency" = 'Weekly' AND "Train Name" = 'AC Express'
wikisql
CREATE TABLE table_74799 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
Which team plays home at Princes Park?
SELECT "Home team" FROM table_74799 WHERE "Venue" = 'princes park'
wikisql
CREATE TABLE table_49511 ( "Position" real, "Name" text, "Played" real, "Drawn" real, "Lost" real, "Points" real )
What was the average losses for team with points larger than 3 and played larger thna 14?
SELECT AVG("Lost") FROM table_49511 WHERE "Points" > '3' AND "Played" > '14'
wikisql
CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE airport ( airport_code varchar, ...
show me the flights from DENVER to PHILADELPHIA again
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADE...
atis
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 )
Bar chart of minimal price from each name
SELECT Name, MIN(Price) FROM Products GROUP BY Name
nvbench
CREATE TABLE table_name_23 ( to_par INTEGER, country VARCHAR, year_s__won VARCHAR )
What is the sum of To Par, when Country is 'United States', and when Year(s) Won is '1973'?
SELECT SUM(to_par) FROM table_name_23 WHERE country = "united states" AND year_s__won = "1973"
sql_create_context
CREATE TABLE hz_info_mzjzjlb ( JZLSH number, YLJGDM number, mzjzjlb_id number ) 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 tim...
检验报告单36585431258是哪个患者住院就诊中开出的
SELECT person_info.XM FROM person_info JOIN hz_info JOIN zyjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND zyjzjlb.YLJGDM = jybgb.YLJGDM_ZYJZJLB AND zyjzjlb.JZLSH = jybgb.JZLSH_ZYJZJLB WHERE jybgb.BGDH = '36585431258'
css
CREATE TABLE table_5195 ( "Name" text, "Team" text, "Qual 1" text, "Qual 2" text, "Best" text )
What was the qualifying 2 time for the team with a qualifying 1 time of 1:01.630?
SELECT "Qual 2" FROM table_5195 WHERE "Qual 1" = '1:01.630'
wikisql
CREATE TABLE table_21059 ( "Name" text, "Latitude" text, "Longitude" text, "Diameter" text, "Year named" real, "Namesake" text )
How many longitudes have a diameter of 224.0?
SELECT COUNT("Longitude") FROM table_21059 WHERE "Diameter" = '224.0'
wikisql
CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime ...
when was the first time that patient 31696 has been prescribed medication via td route in 07/last year?
SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31696) AND prescriptions.route = 'td' AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') AND STRFTIME('%m',...
mimic_iii
CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) ...
Emacs questions across Stack Exchange, per month. Number of questions posted each month about Emacs across Stack Exchange. All questions from Emacs Stack Exchange are included, as well as questions tagged [emacs*], [elisp] or [org-mode] on other sites.
SELECT so.month AS "month", emacs.count AS "emacs", so.count AS "so" FROM (SELECT CAST(YEAR(p.CreationDate) AS TEXT(4)) + '-' + CAST(MONTH(p.CreationDate) AS TEXT(2)) AS "month", COUNT(*) AS "count" FROM "stackexchange.emacs".dbo.Posts AS p GROUP BY YEAR(p.CreationDate), MONTH(p.CreationDate)) AS emacs JOIN (SELECT CAS...
sede
CREATE TABLE table_8021 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text )
Who was the away team when bournemouth was the home team?
SELECT "Away team" FROM table_8021 WHERE "Home team" = 'bournemouth'
wikisql
CREATE TABLE table_1840495_2 ( number_of_households VARCHAR, per_capita_income VARCHAR )
With a per capita income of $30,298, what was the total number of households?
SELECT COUNT(number_of_households) FROM table_1840495_2 WHERE per_capita_income = "$30,298"
sql_create_context
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id t...
count the number of patients whose admission year is less than 2198 and diagnoses short title is aftrcre traum fx low leg?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2198" AND diagnoses.short_title = "Aftrcre traum fx low leg"
mimicsql_data
CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, m...
of the flights available from DALLAS to BALTIMORE on 8 3 which airline has the least expensive flight
SELECT DISTINCT airline.airline_code FROM airline, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, fare, flight, flight_fare WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND date_day.day_number = 3 A...
atis
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,...
is joseph dillman single, married, or widowed?
SELECT demographic.marital_status FROM demographic WHERE demographic.name = "Joseph Dillman"
mimicsql_data
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, ZYLBDM text, ZYMC text ) CREATE TABLE jybgb ( BBCJBW text, BBDM tex...
入院登记日期时间在2012-01-28之后的数量是多少?在1211179这个医疗机构的住院就诊记录中查一下
SELECT COUNT(*) FROM wdmzjzjlb WHERE wdmzjzjlb.YLJGDM = '1211179' AND wdmzjzjlb.RYDJSJ > '2012-01-28' UNION SELECT COUNT(*) FROM bdmzjzjlb WHERE bdmzjzjlb.YLJGDM = '1211179' AND bdmzjzjlb.RYDJSJ > '2012-01-28'
css
CREATE TABLE Document_Locations ( Document_ID INTEGER, Location_Code CHAR(15), Date_in_Location_From DATETIME, Date_in_Locaton_To DATETIME ) CREATE TABLE Ref_Document_Types ( Document_Type_Code CHAR(15), Document_Type_Name VARCHAR(255), Document_Type_Description VARCHAR(255) ) CREATE TABLE...
Show all calendar dates and day Numbers in a line chart, sort in desc by the x axis.
SELECT Calendar_Date, Day_Number FROM Ref_Calendar ORDER BY Calendar_Date DESC
nvbench
CREATE TABLE people ( People_ID int, Name text, Height real, Weight real, Birth_Date text, Birth_Place text ) CREATE TABLE body_builder ( Body_Builder_ID int, People_ID int, Snatch real, Clean_Jerk real, Total real )
Visualize a scatter chart about the correlation between Clean_Jerk and Total .
SELECT Clean_Jerk, Total FROM body_builder
nvbench
CREATE TABLE table_204_147 ( id number, "#" number, "date" text, "opponent" text, "score" text, "win" text, "loss" text, "save" text, "attendance" number, "record" text )
how many games had an attendance of more than 30,000 ?
SELECT COUNT(*) FROM table_204_147 WHERE "attendance" > 30000
squall
CREATE TABLE table_49940 ( "Player" text, "Team" text, "Matches" real, "Wickets" real, "Average" real, "Best Bowling" text )
What is the total average for the England team when the wickets are less than 18, the best bowling is 4/138, and there are less than 3 matches?
SELECT COUNT("Average") FROM table_49940 WHERE "Team" = 'england' AND "Wickets" < '18' AND "Best Bowling" = '4/138' AND "Matches" < '3'
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...
从2006年10月22日到2014年7月12日期间里,号码是08644482的病人所有检验报告单的审核日期是什么时候吗?
SELECT jybgb.SHSJ FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN hz_info_mzjzjlb ON hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info...
css
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE FlagTypes ( Id number, Name text, Des...
Do Questions Get Answers on Math.StackExchange?.
SELECT q1."# ans", q1."ct" AS "#q", q2."ct" AS "#q score>5" FROM (SELECT Posts.AnswerCount AS "# ans", COUNT(*) AS "ct" FROM Posts WHERE Posts.AnswerCount >= -1 AND Posts.AnswerCount < 10 AND Posts.Score > 0 GROUP BY Posts.AnswerCount) AS q1 INNER JOIN (SELECT Posts.AnswerCount AS "# ans", COUNT(*) AS "ct" FROM Posts W...
sede
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, ZYLBDM text, ZYMC text ) CREATE TABLE hz_info ( KH text, KLX number...
那个在2001年11月11日到15年3月7日这段时间里,16229426病患的全部检察结果指标记录的检测人为66553479的检查指标流水号是多少?
SELECT jyjgzbb.JYZBLSH FROM hz_info JOIN mzjzjlb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJZJLB WHERE hz_info.RYBH = '16229426' AND jyjgzbb.JYRQ BETWEEN '2001-11-1...
css
CREATE TABLE Payments ( Payment_ID INTEGER, Settlement_ID INTEGER, Payment_Method_Code VARCHAR(255), Date_Payment_Made DATE, Amount_Payment INTEGER ) CREATE TABLE Claims ( Claim_ID INTEGER, Policy_ID INTEGER, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed INTEGER,...
Return the number of the claim start date for the claims whose claimed amount is no more than the average, could you show by the Y-axis in ascending?
SELECT Date_Claim_Made, COUNT(Date_Claim_Made) FROM Claims WHERE Amount_Settled <= (SELECT AVG(Amount_Settled) FROM Claims) ORDER BY COUNT(Date_Claim_Made)
nvbench
CREATE TABLE table_name_38 ( date VARCHAR, set_3 VARCHAR, score VARCHAR, time VARCHAR )
Which Date has a Score of 2 3, a Time of 20:30, and a Set 3 of 16 25?
SELECT date FROM table_name_38 WHERE score = "2–3" AND time = "20:30" AND set_3 = "16–25"
sql_create_context
CREATE TABLE table_name_49 ( film_title_used_in_nomination VARCHAR, serbian_title VARCHAR )
What is the Film title used in nomination of the Film with a Serbian title of ?
SELECT film_title_used_in_nomination FROM table_name_49 WHERE serbian_title = "бело одело"
sql_create_context