context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_21390 ( "Year (Ceremony)" text, "Film title used in nomination" text, "Original title" text, "Language(s)" text, "Director" text, "Result" text )
What languages were spoken in the film 'FireDancer'?
SELECT "Language(s)" FROM table_21390 WHERE "Film title used in nomination" = 'FireDancer'
wikisql
CREATE TABLE table_31939 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
Who is the opponent for week 10?
SELECT "Opponent" FROM table_31939 WHERE "Week" = '10'
wikisql
CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId ...
Search for URL in answers.
SELECT Id AS "post_link", Score, Title FROM Posts WHERE Body LIKE '%##URL##%' AND CreationDate >= '2016-08-01' ORDER BY Score DESC
sede
CREATE TABLE restaurant ( id int, name varchar, food_type varchar, city_name varchar, rating "decimal ) CREATE TABLE location ( restaurant_id int, house_number int, street_name varchar, city_name varchar ) CREATE TABLE geographic ( city_name varchar, county varchar, reg...
where is a good place in mountain view for arabic food ?
SELECT location.house_number, restaurant.name FROM location, restaurant WHERE location.city_name = 'mountain view' AND restaurant.food_type = 'arabic' AND restaurant.id = location.restaurant_id AND restaurant.rating > 2.5
restaurants
CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, ...
Questions per month, Scala Web Frameworks. How do Scala web frameworks compare to each other? I'm restricting the questions to those tagged Scala, to avoid polluting Playframework's result. It might be unfair, but I can't think of any other way to do it. At least all frameworks are being equally discriminated against.
SELECT *, COUNT(*) AS "Count" FROM (SELECT DATE(CAST(TIME_TO_STR(CreationDate, '%Y') AS TEXT) + '-' + CAST(TIME_TO_STR(CreationDate, '%m') AS TEXT) + '-01') AS Month, t.TagName FROM (SELECT p.Id, p.CreationDate FROM Posts AS p JOIN PostTags AS pt ON pt.PostId = p.Id JOIN Tags AS t ON t.Id = pt.TagId WHERE t.TagName = '...
sede
CREATE TABLE table_57155 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What is the date an away ream scored 6.16 (52)?
SELECT "Date" FROM table_57155 WHERE "Away team score" = '6.16 (52)'
wikisql
CREATE TABLE table_74023 ( "Season" real, "Episodes" real, "Timeslot ( ET )" text, "Season premiere" text, "Season finale" text, "TV season" text, "Rank" text, "Viewers (in millions)" text )
What tv season was episode 23 broadcast?
SELECT "TV season" FROM table_74023 WHERE "Episodes" = '23'
wikisql
CREATE TABLE table_name_78 ( score VARCHAR, venue VARCHAR, year VARCHAR )
what is the score when the venue is athens olympic stadium on 30 april 2011?
SELECT score FROM table_name_78 WHERE venue = "athens olympic stadium" AND year = "30 april 2011"
sql_create_context
CREATE TABLE table_30018460_1 ( total INTEGER )
What is the minimum sum?
SELECT MIN(total) FROM table_30018460_1
sql_create_context
CREATE TABLE table_name_88 ( venue VARCHAR, date VARCHAR )
Name the venue for 23 january 2009
SELECT venue FROM table_name_88 WHERE date = "23 january 2009"
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, ...
从2010年10月13日到2013年9月11日,在这段就诊结算时间内,病人凤清华所有的医疗就诊记录的编号列一下
SELECT t_kc21.MED_CLINIC_ID 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 '2010-10-13' AND '2013-09-11'
css
CREATE TABLE table_11667521_17 ( team_classification VARCHAR, points_classification VARCHAR )
WHAT TEAM CLASSIFIED IN THE STAGE WHERE BRADLEY WIGGINS WON THE POINTS CLASSIFICATION ?
SELECT team_classification FROM table_11667521_17 WHERE points_classification = "Bradley Wiggins"
sql_create_context
CREATE TABLE table_name_23 ( group VARCHAR, population VARCHAR )
What group has a Population of see hoy?
SELECT group FROM table_name_23 WHERE population = "see hoy"
sql_create_context
CREATE TABLE table_41418 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" text, "Time" text, "Location" text )
Was the record of 8-1 (1) a win or a loss?
SELECT "Res." FROM table_41418 WHERE "Record" = '8-1 (1)'
wikisql
CREATE TABLE table_140297_1 ( density VARCHAR, principal_town VARCHAR )
What is the population density in the Brighton area?
SELECT density FROM table_140297_1 WHERE principal_town = "Brighton"
sql_create_context
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE medication ( medication...
in the last year has patient 007-10135 been prescribed glucagon (human recombinant) 1 mg/ml solution for injection.
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 = '007-10135')) AND medication.drugname = 'glucagon (human recombinant) 1 mg/...
eicu
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...
编号为S25.293疾病的患者其身体里降钙素原的参考值范围中的上限与下限分别达到多些?
SELECT jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE zzmzjzjlb.JZZDBM = 'S25.293' AND jyjgzbb.JCZBMC = '降钙素原' UNION SELECT jyjgzbb.CKZFWXX,...
css
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE outputevents ( row_id number, subject_id number, ...
what is the monthly average cerebral drain l ventricular drain of patient 462 on the first hospital visit?
SELECT AVG(outputevents.value) FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 462 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1)) AND outputevents...
mimic_iii
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 do not work in departments with managers that have ids between 100 and 200, give me the comparison about the average of manager_id over the hire_date bin hire_date by weekday.
SELECT HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200)
nvbench
CREATE TABLE table_45549 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "Location Attendance" text, "Record" text )
Which Game has a Record of 27 30?
SELECT SUM("Game") FROM table_45549 WHERE "Record" = '27–30'
wikisql
CREATE TABLE table_name_69 ( college_junior_club_team__league_ VARCHAR, nationality VARCHAR, position VARCHAR )
What is the School/Junior/Club Group (Class) that has a Nationality of canada, and a Place of goalie?
SELECT college_junior_club_team__league_ FROM table_name_69 WHERE nationality = "canada" AND position = "goalie"
sql_create_context
CREATE TABLE circuits ( circuitId INTEGER, circuitRef TEXT, name TEXT, location TEXT, country TEXT, lat REAL, lng REAL, alt TEXT, url TEXT ) CREATE TABLE drivers ( driverId INTEGER, driverRef TEXT, number TEXT, code TEXT, forename TEXT, surname TEXT, dob ...
How many races that had any driver whose forename is Lewis? Show me a line chart, and order x-axis in descending order.
SELECT year, COUNT(year) FROM results AS T1 JOIN races AS T2 ON T1.raceId = T2.raceId JOIN drivers AS T3 ON T1.driverId = T3.driverId WHERE T3.forename = "Lewis" ORDER BY year DESC
nvbench
CREATE TABLE table_55573 ( "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 when the away team was Hawthorn and there was a crowd larger than 20,851?
SELECT "Home team score" FROM table_55573 WHERE "Crowd" > '20,851' AND "Away team" = 'hawthorn'
wikisql
CREATE TABLE table_name_2 ( opponent VARCHAR, event VARCHAR )
Which Opponent has an Event of jungle fight 5?
SELECT opponent FROM table_name_2 WHERE event = "jungle fight 5"
sql_create_context
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id t...
How many of the patients who had insertion of drug-eluting coronary artery stent(s) were discharged to rehab/distinct?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "REHAB/DISTINCT PART HOSP" AND procedures.long_title = "Insertion of drug-eluting coronary artery stent(s)"
mimicsql_data
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 do not work in departments with managers that have ids between 100 and 200, find email and department_id , and visualize them by a bar chart, could you rank by the names in ascending?
SELECT EMAIL, DEPARTMENT_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY EMAIL
nvbench
CREATE TABLE table_9950 ( "Year" text, "Kansas" text, "Nebraska" text, "North Dakota" text, "Oklahoma" text, "South Dakota" text, "Texas" text )
Which Nebraska has 2004 year?
SELECT "Nebraska" FROM table_9950 WHERE "Year" = '2004'
wikisql
CREATE TABLE table_name_52 ( wins INTEGER, draws INTEGER )
How many wins are there when the draws are less than 0?
SELECT SUM(wins) FROM table_name_52 WHERE draws < 0
sql_create_context
CREATE TABLE table_name_4 ( placement_in_miss_universe VARCHAR, delegate VARCHAR )
What kind of Placement in Miss Universe that rosita cornell capuyon is in?
SELECT placement_in_miss_universe FROM table_name_4 WHERE delegate = "rosita cornell capuyon"
sql_create_context
CREATE TABLE table_name_81 ( goals INTEGER, team VARCHAR, division VARCHAR )
What is the average Goals, when Team is 'Rah Ahan', and when Division is less than 1?
SELECT AVG(goals) FROM table_name_81 WHERE team = "rah ahan" AND division < 1
sql_create_context
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, ...
what was the dose of captopril patient 9566 was prescribed in the current hospital encounter?
SELECT SUM(prescriptions.dose_val_rx) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 9566 AND admissions.dischtime IS NULL) AND prescriptions.drug = 'captopril'
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 )
What is the total number of captains in each rank and class? Let class as X-axis, and categorize by rank with a stacked bar chart.
SELECT Class, COUNT(Class) FROM captain GROUP BY Rank, Class
nvbench
CREATE TABLE table_11805 ( "Race" text, "Circuit" text, "Date" text, "Pole position" text, "Fastest lap" text, "Winning driver" text, "Constructor" text, "Report" text )
What circuit did Juan Manuel Fangio have the fastest lap at the german grand prix?
SELECT "Circuit" FROM table_11805 WHERE "Fastest lap" = 'juan manuel fangio' AND "Race" = 'german grand prix'
wikisql
CREATE TABLE table_name_71 ( code_name VARCHAR, api_level VARCHAR )
with api level of 18, what's the code name?
SELECT code_name FROM table_name_71 WHERE api_level = 18
sql_create_context
CREATE TABLE table_255188_1 ( founded INTEGER, joined VARCHAR )
When was the University founded that joined in 1978?
SELECT MAX(founded) FROM table_255188_1 WHERE joined = 1978
sql_create_context
CREATE TABLE table_1008653_1 ( capital___endonym__ VARCHAR, country___endonym__ VARCHAR )
What is the local name given to the capital of Anguilla?
SELECT capital___endonym__ FROM table_1008653_1 WHERE country___endonym__ = "Anguilla"
sql_create_context
CREATE TABLE table_17341 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
How many times was the final score l 96 123 (ot)?
SELECT COUNT("Record") FROM table_17341 WHERE "Score" = 'L 96–123 (OT)'
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...
Get the list of white-russian patients with a neb route of drug administration.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "WHITE - RUSSIAN" AND prescriptions.route = "NEB"
mimicsql_data
CREATE TABLE table_39482 ( "Date" text, "Tournament" text, "Winning score" text, "Margin of victory" text, "Runner(s)-up" text )
What was the margin of victory when the winning score was 12 (66-67-64-71=268)?
SELECT "Margin of victory" FROM table_39482 WHERE "Winning score" = '−12 (66-67-64-71=268)'
wikisql
CREATE TABLE table_44784 ( "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 deity that the state of Bihar was named after?
SELECT "Name of Deity" FROM table_44784 WHERE "Name of the State where found in India" = 'bihar'
wikisql
CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswer...
Utenti ordinati per numero di posts.
SELECT * FROM (Users AS U INNER JOIN Posts AS P ON U.Id = P.OwnerUserId)
sede
CREATE TABLE table_73483 ( "#" real, "Name" text, "Country" text, "1" real, "2" real, "3" real, "Other placings" real, "Total" real, "First appearance" real, "Last appearance" real, "Federation" text )
What are the rank/s of Eddie Guerrero?
SELECT "#" FROM table_73483 WHERE "Name" = 'Eddie Guerrero'
wikisql
CREATE TABLE table_1973842_2 ( nickname VARCHAR, location VARCHAR )
What's the nickname of the school in Maryville, Tennessee?
SELECT nickname FROM table_1973842_2 WHERE location = "Maryville, Tennessee"
sql_create_context
CREATE TABLE Addresses ( Address_ID INTEGER, address_details VARCHAR(255) ) CREATE TABLE Parties ( Party_ID INTEGER, Party_Details VARCHAR(255) ) CREATE TABLE Agreements ( Document_ID INTEGER, Event_ID INTEGER ) CREATE TABLE Products_in_Events ( Product_in_Event_ID INTEGER, Event_ID I...
Compare the total number of different product type codes.
SELECT Product_Type_Code, COUNT(Product_Type_Code) FROM Products GROUP BY Product_Type_Code
nvbench
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate n...
how much did it cost patient 010-5308 a hospital stay in the first hospital encounter?
SELECT SUM(cost.cost) FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-5308' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime LIMIT 1)
eicu
CREATE TABLE Product_Suppliers ( product_id INTEGER, supplier_id INTEGER, date_supplied_from DATETIME, date_supplied_to DATETIME, total_amount_purchased VARCHAR(80), total_value_purchased DECIMAL(19,4) ) CREATE TABLE Staff_Department_Assignments ( staff_id INTEGER, department_id INTEGER...
Create a scatter chart to show the correlation between relationship between minimum product price and maximum product price by each product type.
SELECT MAX(product_price), MIN(product_price), product_type_code FROM Products GROUP BY product_type_code
nvbench
CREATE TABLE table_1414743_1 ( fte_teachers VARCHAR, school_level VARCHAR, city VARCHAR )
List all FTE middle school teachers in Sunnyvale.
SELECT fte_teachers FROM table_1414743_1 WHERE school_level = "Middle" AND city = "Sunnyvale"
sql_create_context
CREATE TABLE table_name_9 ( best_score INTEGER, worst_dancer VARCHAR, worst_score VARCHAR )
What dance was Leeza Gibbons the worst dancer for, receiving a score lower than 15?
SELECT MIN(best_score) FROM table_name_9 WHERE worst_dancer = "leeza gibbons" AND worst_score < 15
sql_create_context
CREATE TABLE genre ( g_name varchar2(20), rating varchar2(10), most_popular_in varchar2(50) ) CREATE TABLE artist ( artist_name varchar2(50), country varchar2(20), gender varchar2(20), preferred_genre varchar2(50) ) CREATE TABLE song ( song_name varchar2(50), artist_name varchar2(5...
Bar graph to show the total number from different formats, and I want to rank by the x axis in desc.
SELECT formats, COUNT(*) FROM files GROUP BY formats ORDER BY formats DESC
nvbench
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
what is the primary disease and diagnosis long title of subject name steven sepulveda?
SELECT demographic.diagnosis, diagnoses.long_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Steven Sepulveda"
mimicsql_data
CREATE TABLE volume ( volume_id number, volume_issue text, issue_date text, weeks_on_top number, song text, artist_id number ) CREATE TABLE artist ( artist_id number, artist text, age number, famous_title text, famous_release_date text ) CREATE TABLE music_festival ( id...
Return the dates of ceremony and the results of all music festivals
SELECT date_of_ceremony, result FROM music_festival
spider
CREATE TABLE table_204_869 ( id number, "species" text, "country of origin" text, "total released" number, "first release" text, "last release" text, "areas of release" text, "areas established" text, "pasture type" text )
how many different species were released in south africa ?
SELECT COUNT(DISTINCT "species") FROM table_204_869 WHERE "country of origin" = 'south africa'
squall
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...
what is the patient name and procedure of the patient with id 29961?
SELECT demographic.name, procedures.short_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "29961"
mimicsql_data
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, ...
患有疾病M60.726的患者的在确诊时其D2聚体(柠檬酸盐)的含量参考值范围的下限与上限的数值都是多少?
SELECT jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM mzjzjlb JOIN jybgb JOIN jyjgzbb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE mzjzjlb.JZZDBM = 'M60.726' AND jyjgzbb.JCZBMC = 'D2聚体(柠檬酸盐)'
css
CREATE TABLE table_28957 ( "Rd." text, "Circuit" text, "City / State" text, "Date" text, "Championship" text, "Challenge" text, "Production" text )
Which circuit was held on 25 28 march?
SELECT "Circuit" FROM table_28957 WHERE "Date" = '25–28 March'
wikisql
CREATE TABLE table_70465 ( "Name" text, "Years" text, "Gender" text, "Area" text, "Authority" text, "Decile" real, "Roll" real )
Which years have a Decile larger than 4, and an Area of thames?
SELECT "Years" FROM table_70465 WHERE "Decile" > '4' AND "Area" = 'thames'
wikisql
CREATE TABLE table_name_23 ( format VARCHAR, _special_notes VARCHAR, title VARCHAR )
What is the Format and Special Notes for of the pact: ...of the gods?
SELECT format, _special_notes FROM table_name_23 WHERE title = "the pact: ...of the gods"
sql_create_context
CREATE TABLE table_15575 ( "Date" text, "Visiting Team" text, "Final Score" text, "Host Team" text, "Stadium" text )
At what stadium was the game with the final score of 26-24 played?
SELECT "Stadium" FROM table_15575 WHERE "Final Score" = '26-24'
wikisql
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
列出患者18784112就诊科室名称包含神外的所有门诊在医院0131624中就诊记录的流水号是什么?
SELECT wdmzjzjlb.JZLSH FROM hz_info JOIN wdmzjzjlb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE hz_info.RYBH = '18784112' AND hz_info.YLJGDM = '0131624' AND wdmzjzjlb.JZKSMC LIKE '%神外%' UNION SELECT bdmzjzjlb.JZLSH FROM hz_info JOIN bdmzjzjlb ON hz_info.YLJGDM...
css
CREATE TABLE table_64617 ( "Season" text, "Division" text, "Rank" text, "Avg.Att." text, "Europe" text, "Top Goalscorer" text, "Goals" real )
Wha is the rank for 52 574 avg. att?
SELECT "Rank" FROM table_64617 WHERE "Avg.Att." = '52 574'
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...
Top users by average score in a given tag (non-CW posts).
SELECT a.OwnerUserId AS "user_link", a.OwnerDisplayName, AVG(CAST(a.Score AS FLOAT)) AS "average_score", SUM(a.Score) AS "total_score", COUNT(a.Id) AS "num_answers" FROM Posts AS a JOIN Posts AS q ON a.ParentId = q.Id WHERE a.PostTypeId = 2 AND q.Tags LIKE '%<##tagName##>%' AND a.CommunityOwnedDate IS NULL GROUP BY a.O...
sede
CREATE TABLE table_name_98 ( class VARCHAR, league VARCHAR, school VARCHAR )
What is the class of the Middletown High School team that is in the DSHA league?
SELECT class FROM table_name_98 WHERE league = "dsha" AND school = "middletown high school"
sql_create_context
CREATE TABLE table_204_846 ( id number, "tie no" number, "home team" text, "score" text, "away team" text, "attendance" number )
did tie number 4 or tie number 6 have higher attendance ?
SELECT "tie no" FROM table_204_846 WHERE "tie no" IN (4, 6) ORDER BY "attendance" DESC LIMIT 1
squall
CREATE TABLE table_19531 ( "No. in series" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text )
Which series numbers were directed by Monte Young?
SELECT "No. in series" FROM table_19531 WHERE "Directed by" = 'Monte Young'
wikisql
CREATE TABLE table_2419754_1 ( left INTEGER )
In what year did the teams leave the conference?
SELECT MAX(left) FROM table_2419754_1
sql_create_context
CREATE TABLE table_46609 ( "Class" text, "Part 1" text, "Part 2" text, "Part 3" text, "Part 4" text, "Verb meaning" text )
What is the verb meaning when the part 2 is bl ot?
SELECT "Verb meaning" FROM table_46609 WHERE "Part 2" = 'blēot'
wikisql
CREATE TABLE table_train_104 ( "id" int, "migraines" bool, "depression" bool, "mini_mental_state_examination_mmse" int, "systolic_blood_pressure_sbp" int, "renal_disease" bool, "alzheimer" bool, "estimated_glomerular_filtration_rate_egfr" int, "diastolic_blood_pressure_dbp" int, ...
there must not be any history of uncontrolled depression.
SELECT * FROM table_train_104 WHERE depression = 0
criteria2sql
CREATE TABLE compartment_class ( compartment varchar, class_type varchar ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE city ( city_code varchar, ...
what does NW stand for
SELECT DISTINCT airline_code FROM airline WHERE airline_code = 'NW'
atis
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...
看一下在医疗就诊04812473443中给病人96393345做检验报告的审核人员有哪些?查一下他们的工号
SELECT jybgb.SHRGH, jybgb.SHRXM FROM jybgb WHERE jybgb.JZLSH = '04812473443'
css
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 lab ( subject_id text, hadm_id text, ...
give me the number of patients whose drug code is isos10?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "ISOS10"
mimicsql_data
CREATE TABLE table_72943 ( "Player" text, "Team" text, "Matches" real, "Overs" text, "Runs" real, "Wickets" real, "Best" text, "Econ" text, "S/Rate" text, "4/inns" real, "5+/inns" real, "Average" text )
Name the most wickets for best is 4/22
SELECT MAX("Wickets") FROM table_72943 WHERE "Best" = '4/22'
wikisql
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, ...
when had patient 46484 in 2103 get the last procedure?
SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 46484) AND STRFTIME('%y', procedures_icd.charttime) = '2103' ORDER BY procedures_icd.charttime DESC LIMIT 1
mimic_iii
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessD...
Users by approximate meta reputation.
SELECT u.Id AS "user_link", SUM(CASE WHEN v.VoteTypeId = 1 THEN 15 WHEN v.VoteTypeId = 2 AND p.PostTypeId = 1 THEN 5 WHEN v.VoteTypeId = 2 AND p.PostTypeId = 2 THEN 10 WHEN v.VoteTypeId = 3 THEN -2 END) AS Reputation FROM Posts AS p INNER JOIN Votes AS v ON p.Id = v.PostId INNER JOIN Users AS u ON p.OwnerUserId = u.Id ...
sede
CREATE TABLE table_59036 ( "Position" real, "Club" text, "Played" real, "Points" real, "Wins" real, "Draws" real, "Losses" real, "Goals for" real, "Goals against" real, "Goal Difference" real )
Which Position has 24 Goals against, and a Played smaller than 30?
SELECT MAX("Position") FROM table_59036 WHERE "Goals against" = '24' AND "Played" < '30'
wikisql
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( ...
count the number of patients for whom csf lab test was ordered.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.fluid = "Cerebrospinal Fluid (CSF)"
mimicsql_data
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CRE...
tell me the drug that patient 021-25705 had an allergic reaction to in 11/2105?
SELECT allergy.drugname FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-25705')) AND STRFTIME('%y-%m', allergy.allergytime) = '2105-11'
eicu
CREATE TABLE table_name_16 ( area_km_2 VARCHAR, census_ranking VARCHAR, population VARCHAR )
What is the area of the parish with a population larger than 1,172 and a census ranking of 1,871 of 5,008?
SELECT COUNT(area_km_2) FROM table_name_16 WHERE census_ranking = "1,871 of 5,008" AND population > 1 OFFSET 172
sql_create_context
CREATE TABLE table_name_75 ( a_side VARCHAR, b_side VARCHAR )
What is the A-side for it Never Entered My Mind, Part 2?
SELECT a_side FROM table_name_75 WHERE b_side = "it never entered my mind, part 2"
sql_create_context
CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZZMC ...
从02年6月25日至21年1月22日期间,病患鲁嘉歆被开出的所有检验报告单的检验报告单号都有哪些?
SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb 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 = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '鲁嘉歆' AND jybg...
css
CREATE TABLE perpetrator ( Injured VARCHAR )
List the number of people injured by perpetrators in ascending order.
SELECT Injured FROM perpetrator ORDER BY Injured
sql_create_context
CREATE TABLE table_22825058_23 ( result VARCHAR, opponents VARCHAR )
Name the result for ji nov k radek t p nek
SELECT result FROM table_22825058_23 WHERE opponents = "Jiří Novák Radek Štěpánek"
sql_create_context
CREATE TABLE table_2187333_1 ( wins INTEGER )
Name the least wins
SELECT MIN(wins) FROM table_2187333_1
sql_create_context
CREATE TABLE table_name_72 ( runner_up VARCHAR, season VARCHAR )
Which Runner-up played in the Season of 2000 01?
SELECT runner_up FROM table_name_72 WHERE season = "2000–01"
sql_create_context
CREATE TABLE table_name_6 ( magnitude VARCHAR, epicenter VARCHAR )
What is the magnitude of the earthquake with an epicenter in biskra province?
SELECT magnitude FROM table_name_6 WHERE epicenter = "biskra province"
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 lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
Calculate the minimum age of patients with bladder cancer/sda as the primary disease who were admitted to hospital in or after the year 2164.
SELECT MIN(demographic.age) FROM demographic WHERE demographic.diagnosis = "BLADDER CANCER/SDA" AND demographic.admityear >= "2164"
mimicsql_data
CREATE TABLE table_8396 ( "Name" text, "Country of Origin" text, "Position" text, "Elected" real, "Term" real )
What is the position elected in 2011 from the Country of Algeria?
SELECT "Position" FROM table_8396 WHERE "Elected" = '2011' AND "Country of Origin" = 'algeria'
wikisql
CREATE TABLE classroom ( building varchar(15), room_number varchar(7), capacity numeric(4,0) ) CREATE TABLE prereq ( course_id varchar(8), prereq_id varchar(8) ) CREATE TABLE section ( course_id varchar(8), sec_id varchar(8), semester varchar(6), year numeric(4,0), building var...
I want to see trend count(*) over year by semester, and binning by year,
SELECT year, COUNT(*) FROM section GROUP BY semester
nvbench
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...
Sample Posts and Comments query.
SELECT Posts.Id, COUNT(Comments.Id) FROM Comments INNER JOIN Posts ON Comments.PostId = Posts.Id GROUP BY Posts.Id ORDER BY COUNT(Comments.Id)
sede
CREATE TABLE table_name_71 ( engine VARCHAR, chassis VARCHAR, year VARCHAR )
What 1957 engine has a Chassis of connaught type b?
SELECT engine FROM table_name_71 WHERE chassis = "connaught type b" AND year > 1957
sql_create_context
CREATE TABLE table_name_86 ( attendance INTEGER, opponent VARCHAR, record VARCHAR )
What is the average attendance of the Mariners' attendance when their record was 62-64?
SELECT AVG(attendance) FROM table_name_86 WHERE opponent = "mariners" AND record = "62-64"
sql_create_context
CREATE TABLE table_233 ( "Race Name" text, "Circuit" text, "Date" text, "Winning driver" text, "Constructor" text, "Report" text )
Who won the race at the Jersey circuit?
SELECT "Winning driver" FROM table_233 WHERE "Circuit" = 'Jersey'
wikisql
CREATE TABLE table_name_10 ( high_assists VARCHAR, date VARCHAR )
How many high assists were on November 27?
SELECT high_assists FROM table_name_10 WHERE date = "november 27"
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 )
Give me a bar chart for sum price of each name, and could you order in ascending by the x axis?
SELECT Name, SUM(Price) FROM Products GROUP BY Name ORDER BY Name
nvbench
CREATE TABLE table_66127 ( "Rank" real, "Rowers" text, "Country" text, "Time" text, "Notes" text )
What was the rank for Great Britain?
SELECT COUNT("Rank") FROM table_66127 WHERE "Country" = 'great britain'
wikisql
CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBase...
INSERT INTO Posts (Score) VALUES(1).
SELECT Score, COUNT(Score) FROM Posts WHERE Score > 10 AND Score < 100 GROUP BY Score ORDER BY Score
sede
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions...
provide me the number of patients admitted before the year 2144 who had diagnosis icd9 code 28802.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2144" AND diagnoses.icd9_code = "28802"
mimicsql_data
CREATE TABLE table_20629 ( "No." real, "Name" text, "Mi from Kingston" text, "Km from Kingston" text, "Parish" text, "Length feet" real, "Length meters" text )
Which railroad is 112.6 kilometers from kingston?
SELECT "Name" FROM table_20629 WHERE "Km from Kingston" = '112.6'
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 demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob te...
what is the average age of patients whose admission type is urgent and who died before the year 2133?
SELECT AVG(demographic.age) FROM demographic WHERE demographic.admission_type = "URGENT" AND demographic.dod_year < "2133.0"
mimicsql_data
CREATE TABLE table_1499774_5 ( santee_sisseton VARCHAR, yankton_yanktonai VARCHAR )
Name the santee sisseton for wi h a
SELECT santee_sisseton FROM table_1499774_5 WHERE yankton_yanktonai = "wičháša"
sql_create_context
CREATE TABLE table_1128 ( "Administrative county" text, "Area 1891 (Statute acres)" real, "Population 1891" real, "Area 1961 (Statute acres)" real, "Population 1961" real )
Name the population 1891 for area being 175836
SELECT COUNT("Population 1891") FROM table_1128 WHERE "Area 1891 (Statute acres)" = '175836'
wikisql