context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_4154 ( "Pick #" real, "Player" text, "Position" text, "Nationality" text, "NHL team" text, "College/junior/club team" text )
What position does Olaf Kolzig play?
SELECT "Position" FROM table_4154 WHERE "Player" = 'Olaf Kolzig'
wikisql
CREATE TABLE table_23269 ( "Institution" text, "Location" text, "Nickname" text, "Founded" real, "Type" text, "Enrollment" real, "Joined" real )
When has Clark University joined the Conference?
SELECT MAX("Joined") FROM table_23269 WHERE "Institution" = 'Clark University'
wikisql
CREATE TABLE table_name_95 ( opponent VARCHAR, round VARCHAR )
Who was the opponent in the round of R2?
SELECT opponent FROM table_name_95 WHERE round = "r2"
sql_create_context
CREATE TABLE t_kc21 ( CLINIC_ID text, CLINIC_TYPE text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
把医疗机构0195557做过项目0152检查的记录查看一下
SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 JOIN t_kc21_t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc22.MED_CLINIC_ID AND t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID WHERE t_kc21.MED_SER_ORG_NO = '0195557' AND t_kc22.SOC_SRT_DIRE_CD = '0152'
css
CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int ) CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE swimme...
Visualize a bar chart about the distribution of name and ID , I want to order by the Y-axis in asc.
SELECT name, ID FROM swimmer ORDER BY ID
nvbench
CREATE TABLE table_15291 ( "First game" real, "Played" real, "Drawn" real, "Lost" real, "Percentage" text )
How many games drawn when there are 78 losses and over 121 games played?
SELECT COUNT("Drawn") FROM table_15291 WHERE "Lost" = '78' AND "Played" > '121'
wikisql
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
give the age of subject id 83678.
SELECT demographic.age FROM demographic WHERE demographic.subject_id = "83678"
mimicsql_data
CREATE TABLE table_52177 ( "Club" text, "League" text, "Sport" text, "Venue" text, "Established" real, "Championships" text )
What is the total number of the established club of Lehigh Valley Storm?
SELECT COUNT("Established") FROM table_52177 WHERE "Club" = 'lehigh valley storm'
wikisql
CREATE TABLE table_name_70 ( party VARCHAR, member VARCHAR )
What is Hon Paul Keating's Party?
SELECT party FROM table_name_70 WHERE member = "hon paul keating"
sql_create_context
CREATE TABLE table_name_95 ( draw INTEGER, artist VARCHAR, points VARCHAR )
What is the lowest Draw when the Artist is Stine Findsen and the Points are larger than 42?
SELECT MIN(draw) FROM table_name_95 WHERE artist = "stine findsen" AND points > 42
sql_create_context
CREATE TABLE table_23644 ( "Standard Yarn Weight System" text, "Yarn Type (US)" text, "Ply (UK, NZ, AU)" text, "m/100g" text, "Wraps Per Inch (WPI)" text )
Name the wraps per inch for 120-240
SELECT "Wraps Per Inch (WPI)" FROM table_23644 WHERE "m/100g" = '120-240'
wikisql
CREATE TABLE zyb ( 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...
在二零一零年一月七日到二零一零年十月九日的这段时间里,医疗机构7738882的总金额和统筹总金额分别是怎么样的
SELECT SUM(t_kc24.MED_AMOUT), SUM(t_kc24.OVE_PAY) FROM qtb JOIN t_kc24 ON qtb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE qtb.MED_SER_ORG_NO = '7738882' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2010-01-07' AND '2010-10-09' UNION SELECT SUM(t_kc24.MED_AMOUT), SUM(t_kc24.OVE_PAY) FROM gyb JOIN t_kc24 ON gyb.MED_CLINIC_ID = t_k...
css
CREATE TABLE building ( building_id text, Name text, Street_address text, Years_as_tallest text, Height_feet int, Floors int ) CREATE TABLE protein ( common_name text, protein_name text, divergence_from_human_lineage real, accession_number text, sequence_length real, seq...
For each building, show the name of the building and the number of institutions in it. Plot them as bar chart.
SELECT Name, COUNT(*) FROM building AS T1 JOIN Institution AS T2 ON T1.building_id = T2.building_id GROUP BY T1.building_id
nvbench
CREATE TABLE table_48788 ( "Pick #" real, "NFL Team" text, "Player" text, "Position" text, "College" text )
What college did Marcus Wilson attend?
SELECT "College" FROM table_48788 WHERE "Player" = 'marcus wilson'
wikisql
CREATE TABLE table_11354111_3 ( night_rank VARCHAR, viewers__m_ VARCHAR )
what's the night rank with viewers (m) of 6.63
SELECT night_rank FROM table_11354111_3 WHERE viewers__m_ = "6.63"
sql_create_context
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE cost ( costid number, ...
during this hospital encounter, when patient 031-3355 had the first blood, venipuncture microbiology test?
SELECT microlab.culturetakentime FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-3355' AND patient.hospitaldischargetime IS NULL)) AND microla...
eicu
CREATE TABLE table_1812 ( "Year" real, "Lok Sabha" text, "Members of Parliament" text, "Party Won" text, "Winners % votes" text, "Trailing Party" text, "Trailing Party % votes" text )
When the winners votes were 50.54% who were the members of parliment?
SELECT "Members of Parliament" FROM table_1812 WHERE "Winners % votes" = '50.54%'
wikisql
CREATE TABLE table_name_23 ( domestic_freight INTEGER, change VARCHAR, total_freight_and_mail VARCHAR )
What is the most domestic freight with a change of +9,8% and a total freight and mail of more than 3,278?
SELECT MAX(domestic_freight) FROM table_name_23 WHERE change = "+9,8%" AND total_freight_and_mail > 3 OFFSET 278
sql_create_context
CREATE TABLE table_64702 ( "Player" text, "Matches" text, "Runs" text, "Balls" text, "Strike Rate" text, "Average" text, "100s" text )
When the strike rate is 70.10, what is the balls?
SELECT "Balls" FROM table_64702 WHERE "Strike Rate" = '70.10'
wikisql
CREATE TABLE table_name_82 ( debut VARCHAR, born VARCHAR )
What is the debut for the person born in Poole?
SELECT debut FROM table_name_82 WHERE born = "poole"
sql_create_context
CREATE TABLE table_27267 ( "English" text, "Slovianski" text, "\u0421\u043b\u043e\u0432\u0458\u0430\u043d\u0441\u043a\u0438" text, "Russian" text, "Ukrainian" text, "Belarusian" text, "Polish" text, "Czech" text, "Slovak" text, "Upper Sorbian" text, "Slovene" text, "Croat...
What area all values for Slovak when value for Ukranian is , ?
SELECT "Slovak" FROM table_27267 WHERE "Ukrainian" = 'пес, собака'
wikisql
CREATE TABLE table_name_1 ( place VARCHAR, to_par VARCHAR, player VARCHAR )
Which Place has a To par of 1 and don pooley?
SELECT place FROM table_name_1 WHERE to_par = "−1" AND player = "don pooley"
sql_create_context
CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varchar, friday varchar, saturday varchar, sunday varchar, has_final_proje...
Of all the courses , which are worth 14 credits ?
SELECT DISTINCT name, number FROM course WHERE credits = 14 AND department = 'EECS'
advising
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsysto...
what were the top four most frequent microbiology tests given to patients in the same hospital visit after receiving a anti-psychotic agent?
SELECT t3.culturesite FROM (SELECT t2.culturesite, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'anti-psyc...
eicu
CREATE TABLE table_name_37 ( composition VARCHAR, founded VARCHAR )
What composition was founded in 1976?
SELECT composition FROM table_name_37 WHERE founded = 1976
sql_create_context
CREATE TABLE table_11454 ( "Year" text, "Winners" text, "Score" text, "Runners Up" text, "Venue" text, "3rd Place" text )
Who is in third place when the kaizer chiefs won 1-0?
SELECT "3rd Place" FROM table_11454 WHERE "Winners" = 'kaizer chiefs' AND "Score" = '1-0'
wikisql
CREATE TABLE table_34336 ( "Name" text, "Hanzi" text, "Origin" text, "Launch" real, "Owner" text )
What is the origin for the item with an owner of Hunan Broadcasting System (HBS)?
SELECT "Origin" FROM table_34336 WHERE "Owner" = 'hunan broadcasting system (hbs)'
wikisql
CREATE TABLE table_name_45 ( attendance VARCHAR, week VARCHAR, date VARCHAR )
What is the attendance number later than week 9 on November 20, 1983?
SELECT COUNT(attendance) FROM table_name_45 WHERE week > 9 AND date = "november 20, 1983"
sql_create_context
CREATE TABLE table_203_803 ( id number, "draw" number, "country" text, "language" text, "artist" text, "song" text, "english translation" text, "place" number, "points" number )
what artist scored the least number of points ?
SELECT "artist" FROM table_203_803 ORDER BY "points" LIMIT 1
squall
CREATE TABLE table_24540893_6 ( player VARCHAR, cfl_team VARCHAR )
Who was drafted by the calgary stampeders?
SELECT player FROM table_24540893_6 WHERE cfl_team = "Calgary Stampeders"
sql_create_context
CREATE TABLE table_78571 ( "Year" real, "Single" text, "Chart" text, "Position" real, "Appeared on album" text )
When the position is less than 7, what is the appeared on album?
SELECT "Appeared on album" FROM table_78571 WHERE "Position" < '7'
wikisql
CREATE TABLE table_name_60 ( venue VARCHAR, result VARCHAR )
What is the Venue when the result was 2-1?
SELECT venue FROM table_name_60 WHERE result = "2-1"
sql_create_context
CREATE TABLE table_32908 ( "Date" text, "Venue" text, "Opposition" text, "Att." real, "Result" text, "Goals" real )
Which date had less than 3 goals and a result of (w) 2-0?
SELECT "Date" FROM table_32908 WHERE "Goals" < '3' AND "Result" = '(w) 2-0'
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...
give me the nuber of patients with diagnoses icd9 code e8788.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.icd9_code = "E8788"
mimicsql_data
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_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(25...
Display a bar chart for what is the average salary for each job title?, and rank in descending by the X please.
SELECT JOB_TITLE, AVG(SALARY) FROM employees AS T1 JOIN jobs AS T2 ON T1.JOB_ID = T2.JOB_ID GROUP BY T2.JOB_TITLE ORDER BY JOB_TITLE DESC
nvbench
CREATE TABLE table_name_35 ( year INTEGER, genre VARCHAR )
What is the earliest year when action was the genre?
SELECT MIN(year) FROM table_name_35 WHERE genre = "action"
sql_create_context
CREATE TABLE table_54916 ( "Tournament" text, "Wins" real, "Top-5" real, "Top-25" real, "Events" real, "Cuts made" real )
I want to know the highest wins for cuts made more than 5
SELECT MAX("Wins") FROM table_54916 WHERE "Cuts made" > '5'
wikisql
CREATE TABLE table_31201 ( "Skip (Club)" text, "W" real, "L" real, "PF" real, "PA" real, "Ends Won" real, "Ends Lost" real, "Blank Ends" real, "Stolen Ends" real )
Name the least pa for w being 2
SELECT MIN("PA") FROM table_31201 WHERE "W" = '2'
wikisql
CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE PostHistory ( Id number, PostHistoryT...
All questions with Bounty with tag android.
SELECT Posts.CreationDate, Posts.Id, Votes.BountyAmount, Posts.Title, Posts.AcceptedAnswerId, Posts.Tags FROM Posts LEFT JOIN Votes ON Votes.PostId = Posts.Id WHERE Posts.Tags LIKE ('%##Tag##%') AND BountyAmount > 0 ORDER BY Posts.CreationDate DESC LIMIT 30
sede
CREATE TABLE weather ( date VARCHAR, zip_code VARCHAR, min_dew_point_f INTEGER )
On which day and in which zip code was the min dew point lower than any day in zip code 94107?
SELECT date, zip_code FROM weather WHERE min_dew_point_f < (SELECT MIN(min_dew_point_f) FROM weather WHERE zip_code = 94107)
sql_create_context
CREATE TABLE table_name_53 ( gross_to_date VARCHAR, date VARCHAR )
Name the Gross-to-date which has a Date of august 23 25?
SELECT gross_to_date FROM table_name_53 WHERE date = "august 23–25"
sql_create_context
CREATE TABLE train ( Train_ID int, Name text, Time text, Service text ) CREATE TABLE station ( Station_ID int, Name text, Annual_entry_exit real, Annual_interchanges real, Total_Passengers real, Location text, Main_Services text, Number_of_Platforms int ) CREATE TABLE t...
Give me a pie chart about the proportion of the number of platforms in different locations.
SELECT Location, SUM(Number_of_Platforms) FROM station GROUP BY Location
nvbench
CREATE TABLE table_5376 ( "Game" real, "January" real, "Opponent" text, "Score" text, "Record" text, "Points" real )
Which January has a Game of 50?
SELECT AVG("January") FROM table_5376 WHERE "Game" = '50'
wikisql
CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE Comments ( Id number, PostId number, Score numb...
Top 50 SO Users from Iran.
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, Location FROM Users WHERE LOWER(Location) LIKE '%iran' ORDER BY Reputation DESC LIMIT 50
sede
CREATE TABLE COURSE ( Instructor VARCHAR, CName VARCHAR ) CREATE TABLE FACULTY ( Fname VARCHAR, Lname VARCHAR, FacID VARCHAR )
Find the first name and last name of the instructor of course that has course name
SELECT T2.Fname, T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID WHERE T1.CName = "COMPUTER LITERACY"
sql_create_context
CREATE TABLE fzzmzjzjlb ( 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...
请提供云秀美这位病患从17.9.12起,截止到20.12.29期间就诊医生数
SELECT COUNT(zzmzjzjlb.ZZYSGH) FROM person_info JOIN hz_info JOIN zzmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX WHERE person_info.XM = '云秀美' AND zzmzjzjlb.JZKSRQ BETWEEN '2017-09-12' AND '2020-12-29' UNION SELECT COUNT(fz...
css
CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varchar, friday varchar, saturday varchar, sunday varchar, has_final_proje...
What are the upper level options next semester that do not meet on Friday ?
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program_course, semester WHERE course_offering.friday = 'N' AND course.course_id = course_offering.course_id AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND semester.semester = 'FA' ...
advising
CREATE TABLE PersonFriend ( name varchar(20), friend varchar(20), year INTEGER ) CREATE TABLE Person ( name varchar(20), age INTEGER, city TEXT, gender TEXT, job TEXT )
How old is the youngest person for each job Visualize by bar chart, could you list in ascending by the names?
SELECT job, MIN(age) FROM Person GROUP BY job ORDER BY job
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 )
Bar chart x axis name y axis the number of name
SELECT Name, COUNT(Name) FROM Products GROUP BY Name
nvbench
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, ...
Find all questions from specified UserId.
SELECT Qus.CreationDate, Qus.Tags, Qus.Title, Qus.ViewCount, Qus.Score, Qus.Id, Qus.AcceptedAnswerId FROM Posts AS Qus WHERE Qus.OwnerUserId = '##UserId##' AND Qus.PostTypeId = 1 ORDER BY Qus.CreationDate DESC
sede
CREATE TABLE table_name_23 ( game INTEGER, date VARCHAR )
WHAT IS THE GAME ON SEPTEMBER 13?
SELECT AVG(game) FROM table_name_23 WHERE date = "september 13"
sql_create_context
CREATE TABLE table_name_38 ( call_sign VARCHAR, erp_w INTEGER )
What is the call sign for the translator with an ERP W larger than 10?
SELECT call_sign FROM table_name_38 WHERE erp_w > 10
sql_create_context
CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varcha...
show me the FIRST class fares from BALTIMORE to DALLAS
SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, fare_basis, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BALTIMORE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code A...
atis
CREATE TABLE table_42837 ( "Name" text, "Seat" text, "Population (2011)" real, "Area (km 2 )" real, "Density (inhabitants/km 2 )" real )
What is the total area of drakenstein and a population less than 251,262?
SELECT COUNT("Area (km 2 )") FROM table_42837 WHERE "Name" = 'drakenstein' AND "Population (2011)" < '251,262'
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 admission type of subject id 3343?
SELECT demographic.admission_type FROM demographic WHERE demographic.subject_id = "3343"
mimicsql_data
CREATE TABLE table_name_4 ( name VARCHAR, captain VARCHAR )
What Name has the Captain Aaron Heal?
SELECT name FROM table_name_4 WHERE captain = "aaron heal"
sql_create_context
CREATE TABLE table_19998428_3 ( san_javier_municipality___percentage_ INTEGER, language VARCHAR )
For language Aymara Simi, what was the maximum San Javier municipality percentage?
SELECT MAX(san_javier_municipality___percentage_) FROM table_19998428_3 WHERE language = "Aymara simi"
sql_create_context
CREATE TABLE table_59744 ( "A. Dyck" text, "H. Rempel" text, "R. Epp" text, "J. Thiessen" text, "J. J. Neufeld" text, "Ed Zacharias" text, "word meaning" text )
Which of the R. Epp, has J Thiessen of Tjoatj?
SELECT "R. Epp" FROM table_59744 WHERE "J. Thiessen" = 'tjoatj'
wikisql
CREATE TABLE table_63597 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location/Attendance" text, "Record" text )
What was the score of the game against Minnesota?
SELECT "Score" FROM table_63597 WHERE "Opponent" = 'minnesota'
wikisql
CREATE TABLE table_203_672 ( id number, "week" number, "date" text, "opponent" text, "result" text, "venue" text, "attendance" number )
what is the number of fans in attendance at the game held at mile high stadium ?
SELECT "attendance" FROM table_203_672 WHERE "venue" = 'mile high stadium'
squall
CREATE TABLE party ( First_year VARCHAR, Last_year VARCHAR, Party_Theme VARCHAR )
Show the first year and last year of parties with theme 'Spring' or 'Teqnology'.
SELECT First_year, Last_year FROM party WHERE Party_Theme = "Spring" OR Party_Theme = "Teqnology"
sql_create_context
CREATE TABLE table_30517 ( "Nr." real, "Player" text, "Games played" real, "Starting" real, "Sub" real, "Subbed" real, "Mins played" real, "Goals" real, "Pens. against" real, "Pens. for" real, "Fouls suff." real, "Fouls comm." real, "Yellow C" real, "Red c" real, ...
What is the fewest minutes played for the player with exactly 638 good passes?
SELECT MIN("Mins played") FROM table_30517 WHERE "Good passes" = '638'
wikisql
CREATE TABLE gwyjzb ( CLINIC_ID text, CLINIC_TYPE text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
编号为8898248的医院在一一年十一月二十日到一四年三月五日的这段时间里,有多少医疗费总额超过5327.65元的科室
SELECT COUNT(*) FROM (SELECT gwyjzb.MED_ORG_DEPT_CD FROM gwyjzb JOIN t_kc24 ON gwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gwyjzb.MED_SER_ORG_NO = '8898248' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2011-11-20' AND '2014-03-05' GROUP BY gwyjzb.MED_ORG_DEPT_CD HAVING SUM(t_kc24.MED_AMOUT) > 5327.65 UNION SELECT fgwyjzb....
css
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE zyjybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH number, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, ...
由门诊诊断为矽肺Ⅲ期的病号的检测指标586304数值的平均值以及最值各自是多少?
SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM mzjzjlb JOIN zyjybgb JOIN jyjgzbb ON mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB AND zyjybgb.YLJGDM = jyjgzbb.YLJGDM AND zyjybgb.BGDH = jyjgzbb.BGDH WHERE mzjzjlb.JZZDSM = '矽肺(硅肺)Ⅲ期' AND jyjgzbb.JCZBDM ...
css
CREATE TABLE table_200_14 ( id number, "act" text, "year signed" number, "# albums released under bad boy" number )
what year was machine gun kelly signed ?
SELECT "year signed" FROM table_200_14 WHERE "act" = 'machine gun kelly'
squall
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, ...
what is diagnoses long title of subject name kelly gallardo?
SELECT diagnoses.long_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Kelly Gallardo"
mimicsql_data
CREATE TABLE table_name_76 ( since VARCHAR, transfer_fee VARCHAR )
What the since year of the player with a transfer fee of 75k?
SELECT since FROM table_name_76 WHERE transfer_fee = "£ 75k"
sql_create_context
CREATE TABLE table_name_6 ( home_team VARCHAR, away_team VARCHAR )
Who was the home team for the away game that Canvey Island played?
SELECT home_team FROM table_name_6 WHERE away_team = "canvey island"
sql_create_context
CREATE TABLE table_204_151 ( id number, "game" number, "day" text, "date" text, "kickoff" text, "opponent" text, "results\nscore" text, "results\nrecord" text, "location" text, "attendance" number )
how many games did the harrisburg heat win in which they scored eight or more goals ?
SELECT COUNT(*) FROM table_204_151 WHERE "results\nscore" = 'w' AND "results\nscore" >= 8
squall
CREATE TABLE table_203_686 ( id number, "release date" text, "album" text, "record label" text, "uk albums chart" number, "u.s. billboard 200 chart" number )
what was the first album released ?
SELECT "album" FROM table_203_686 ORDER BY "release date" LIMIT 1
squall
CREATE TABLE table_59802 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
What is the rank when bronze was more than 0, gold more than 1, Nation is japan, and silver less than 0?
SELECT AVG("Rank") FROM table_59802 WHERE "Bronze" > '0' AND "Gold" > '1' AND "Nation" = 'japan' AND "Silver" < '0'
wikisql
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 unmarried patients who have copd exacerbation as their primary disease.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.diagnosis = "COPD EXACERBATION"
mimicsql_data
CREATE TABLE table_25701 ( "Player" text, "Games Played" real, "Minutes" real, "Field Goals" real, "Three Pointers" real, "Free Throws" real, "Rebounds" real, "Assists" real, "Blocks" real, "Steals" real, "Points" real )
Name the field goals for alexis yackley
SELECT MAX("Field Goals") FROM table_25701 WHERE "Player" = 'Alexis Yackley'
wikisql
CREATE TABLE table_name_96 ( team VARCHAR, home_venue VARCHAR )
What is the Team with a venue of Anyang Stadium?
SELECT team FROM table_name_96 WHERE home_venue = "anyang stadium"
sql_create_context
CREATE TABLE table_1745843_5 ( verb_meaning VARCHAR, class VARCHAR )
What is the meaning of the class 6 verbs?
SELECT verb_meaning FROM table_1745843_5 WHERE class = "6"
sql_create_context
CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, maximum_...
can you show me the list of flights that fly from WASHINGTON to SAN FRANCISCO via DALLAS
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 = 'SAN FRANCISCO' AND CIT...
atis
CREATE TABLE table_name_67 ( attendance VARCHAR, home VARCHAR )
What is the attendance total of the game with the Lakers as the home team?
SELECT COUNT(attendance) FROM table_name_67 WHERE home = "lakers"
sql_create_context
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
how many male patients have diagnoses icd9 code 71690?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "M" AND diagnoses.icd9_code = "71690"
mimicsql_data
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 frequently given specimen tests for patients who had previously been diagnosed with dmii wo cmp uncntrld within 2 months, since 2105?
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, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_...
mimic_iii
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid num...
has patient 004-29334 received ssri administration - fluoxetine (prozac) at other hospitals?
SELECT COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.uniquepid = '004-29334' AND patient.hospitalid <> (SELECT DISTINCT patient.hospitalid FROM patient WHERE patient.uniquepid = '004-29334' AND patient.hospitaldischargetime IS NULL)) AND tr...
eicu
CREATE TABLE table_64081 ( "Year" real, "Category" text, "Film" text, "Result" text, "Lost to" text )
Which the Lost to is in 2000
SELECT "Lost to" FROM table_64081 WHERE "Year" = '2000'
wikisql
CREATE TABLE table_23619005_3 ( cfl_team VARCHAR, position VARCHAR )
What CFL team was the player playing on SB position drafted for?
SELECT cfl_team FROM table_23619005_3 WHERE position = "SB"
sql_create_context
CREATE TABLE aircraft ( aircraft_code varchar, aircraft_description varchar, manufacturer varchar, basic_type varchar, engines int, propulsion varchar, wide_body varchar, wing_span int, length int, weight int, capacity int, pay_load int, cruising_speed int, range_...
find the cheapest one way fare from BOSTON to SAN FRANCISCO
SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_...
atis
CREATE TABLE table_54487 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
Who was the home team at MCG?
SELECT "Home team" FROM table_54487 WHERE "Venue" = 'mcg'
wikisql
CREATE TABLE table_10705060_1 ( points VARCHAR, season VARCHAR )
How many points for 2005?
SELECT COUNT(points) FROM table_10705060_1 WHERE season = "2005"
sql_create_context
CREATE TABLE table_name_32 ( drg_number_s_ VARCHAR, railway_number_s_ VARCHAR )
Which DRG number has xxx railway number?
SELECT drg_number_s_ FROM table_name_32 WHERE railway_number_s_ = "xxx"
sql_create_context
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, program_id int, declare_major varchar, total_credit int, total_gpa float, entered_as ...
What classes are 12 credits that are upper-level ?
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.credits = 12 AND program_course.category LIKE 'ULCS'
advising
CREATE TABLE table_23486853_8 ( opponent VARCHAR, date VARCHAR )
Who is every opponent on the date of March 16?
SELECT opponent FROM table_23486853_8 WHERE date = "March 16"
sql_create_context
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE diagnosis ( diagn...
count the number of patients who were prescribed 0.4 ml syringe : enoxaparin sodium 40 mg/0.4ml sc soln in the same hospital encounter after being diagnosed with obesity.
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'obesity') AS t1 JOIN (SELECT patient.uniquepid, medication.drugstarttime,...
eicu
CREATE TABLE table_58626 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Opponent" text, "Score" text )
What is Tournament, when Opponent is 'Lu Jiaxiang'?
SELECT "Tournament" FROM table_58626 WHERE "Opponent" = 'lu jiaxiang'
wikisql
CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE airport ( airport_code varchar, airport_name text, airport_location text, state_code varchar, country_name varchar, time_zone_code varchar, minimum_connect_...
what kinds of planes are used by AA
SELECT DISTINCT aircraft.aircraft_code FROM aircraft, equipment_sequence, flight WHERE equipment_sequence.aircraft_code = aircraft.aircraft_code AND flight.aircraft_code_sequence = equipment_sequence.aircraft_code_sequence AND flight.airline_code = 'AA'
atis
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TA...
is any medicine prescribed to patient 032-24135 on the current hospital visit?
SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '032-24135' AND patient.hospitaldischargetime IS NULL))
eicu
CREATE TABLE table_39523 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text )
in riyadh, saudi arabia, what is the score?
SELECT "Score" FROM table_39523 WHERE "Venue" = 'riyadh, saudi arabia'
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...
how many patients with drug code cafcit stayed in the hospital for more than 27 days?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "27" AND prescriptions.formulary_drug_cd = "CAFCIT"
mimicsql_data
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 maximum hospital cost in which are involved social work consult?
SELECT MAX(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'social work consult')) GROUP BY cost.patient...
eicu
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number...
SO XPages - Question users. Users asking XPages questions
SELECT DISTINCT Posts.OwnerUserId, Users.DisplayName, Reputation, ProfileImageUrl, AccountId FROM Posts INNER JOIN PostTags ON Posts.Id = PostTags.PostId INNER JOIN Users ON Posts.OwnerUserId = Users.Id WHERE Posts.PostTypeId = 1 AND PostTags.TagId IN (66326, 80737, 80738)
sede
CREATE TABLE table_52879 ( "Date(s) conducted" text, "Cons" text, "Plaid Cymru" text, "Lib Dem" text, "UKIP" text, "Green" text, "Others" text, "Lead" text )
On 5 May 2011, what was the lead percentage?
SELECT "Lead" FROM table_52879 WHERE "Date(s) conducted" = '5 may 2011'
wikisql
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 d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text )...
when was patient 3118 last prescribed heparin flush midline (100 units/ml) until 14 months ago?
SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3118) AND prescriptions.drug = 'heparin flush midline (100 units/ml)' AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-14 month') ORDER BY prescrip...
mimic_iii
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ...
tell me the top four procedures that were the most common in this year.
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 DATETIME(procedures_icd.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of ye...
mimic_iii
CREATE TABLE table_27715173_6 ( high_assists VARCHAR, score VARCHAR )
Who had the high assists when the score was w 107 95 (ot)?
SELECT high_assists FROM table_27715173_6 WHERE score = "W 107–95 (OT)"
sql_create_context