context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_name_49 ( venue VARCHAR, competition VARCHAR )
What was the venue that had a friendly match competition?
SELECT venue FROM table_name_49 WHERE competition = "friendly match"
sql_create_context
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...
count the number of patients diagnosed with acute respiratory failure who did not come back to the hospital within 2 months of the diagnosis.
SELECT (SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'acute respiratory failure') AS t1) - (SELECT COUNT(DISTINCT t2.uniquepid) FROM (SELECT patient.uniqu...
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...
从2016年1月19到2018年2月22的这段时间里,看看医疗机构3982610处理的新生儿门诊的就诊记录
SELECT COUNT(*) FROM zzmzjzjlb WHERE zzmzjzjlb.YLJGDM = '3982610' AND zzmzjzjlb.JZKSRQ BETWEEN '2016-01-19' AND '2018-02-22' AND zzmzjzjlb.ZSEBZ > 0 UNION SELECT COUNT(*) FROM fzzmzjzjlb WHERE fzzmzjzjlb.YLJGDM = '3982610' AND fzzmzjzjlb.JZKSRQ BETWEEN '2016-01-19' AND '2018-02-22' AND fzzmzjzjlb.ZSEBZ > 0
css
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...
A bar chart shows the distribution of All_Games and School_ID , and could you list by the bars in desc?
SELECT All_Games, School_ID FROM basketball_match ORDER BY All_Games DESC
nvbench
CREATE TABLE Faculty_Participates_in ( FacID INTEGER, actid INTEGER ) CREATE TABLE Faculty ( FacID INTEGER, Lname VARCHAR(15), Fname VARCHAR(15), Rank VARCHAR(15), Sex VARCHAR(1), Phone INTEGER, Room VARCHAR(5), Building VARCHAR(13) ) CREATE TABLE Student ( StuID INTEGER, ...
How many faculty members participate in each activity? Return the activity names and the number of faculty members by a bar chart, and display Y-axis in asc order.
SELECT activity_name, COUNT(*) FROM Activity AS T1 JOIN Faculty_Participates_in AS T2 ON T1.actid = T2.actid GROUP BY T1.actid ORDER BY COUNT(*)
nvbench
CREATE TABLE table_1691800_2 ( population__2010_ VARCHAR, municipality VARCHAR )
what is the population where municipality is san jacinto?
SELECT population__2010_ FROM table_1691800_2 WHERE municipality = "San Jacinto"
sql_create_context
CREATE TABLE table_name_10 ( nba_draft VARCHAR, school VARCHAR )
What is the NBA Draft for the School Bishop O'Connell High School?
SELECT nba_draft FROM table_name_10 WHERE school = "bishop o'connell high school"
sql_create_context
CREATE TABLE table_33305 ( "Round" real, "Overall" real, "Player" text, "Position" text, "College" text )
What is the average round in which a Safety with an overall rank higher than 89 was drafted?
SELECT AVG("Round") FROM table_33305 WHERE "Position" = 'safety' AND "Overall" > '89'
wikisql
CREATE TABLE table_33270 ( "Dance" text, "Best dancer" text, "Best score" real, "Worst dancer" text, "Worst score" real )
What is the average Worst score for Mario Lopez as the Best dancer and Tango as the Dance?
SELECT AVG("Worst score") FROM table_33270 WHERE "Best dancer" = 'mario lopez' AND "Dance" = 'tango'
wikisql
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE vitalperiodic ( vitalperiodici...
what lab test did patient 006-207754 last receive since 97 months ago?
SELECT lab.labname FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-207754')) AND DATETIME(lab.labresulttime) >= DATETIME(CURRENT_TIME(), '-97 month') OR...
eicu
CREATE TABLE roller_coaster ( Status VARCHAR )
Show the different statuses and the numbers of roller coasters for each status.
SELECT Status, COUNT(*) FROM roller_coaster GROUP BY Status
sql_create_context
CREATE TABLE table_name_1 ( character VARCHAR, year VARCHAR, award_ceremony VARCHAR )
Which character was nominated in the 2010 Indian Television Academy Awards?
SELECT character FROM table_name_1 WHERE year = 2010 AND award_ceremony = "indian television academy awards"
sql_create_context
CREATE TABLE table_name_35 ( score VARCHAR, date VARCHAR )
What was the score on May 3?
SELECT score FROM table_name_35 WHERE date = "may 3"
sql_create_context
CREATE TABLE fgwyjzb ( 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, ...
想知道患者戚星剑在二00六年一月二日到二0一四年六月二十一日期间被开出药品304714-w的总次数是多少
SELECT COUNT(*) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '戚星剑' AND t_kc22.STA_DATE BETWEEN '2006-01-02' AND '2014-06-21' AND t_kc22.SOC_SRT_DIRE_CD = '304714-w' UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE fgw...
css
CREATE TABLE table_203_166 ( id number, "pos" text, "no" number, "rider" text, "manufacturer" text, "laps" number, "time" text, "grid" number, "points" number )
which rider completed all 21 laps of the 2008 malaysian motorcycle grand prixwith the longest time ?
SELECT "rider" FROM table_203_166 WHERE "laps" = 21 ORDER BY "pos" DESC LIMIT 1
squall
CREATE TABLE table_19654 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" real )
Who directed the episode with the production code 176252?
SELECT "Directed by" FROM table_19654 WHERE "Production code" = '176252'
wikisql
CREATE TABLE table_203_630 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number )
who won more gold medals , brazil or china ?
SELECT "nation" FROM table_203_630 WHERE "nation" IN ('brazil', 'china') ORDER BY "gold" DESC LIMIT 1
squall
CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId num...
New answers or questions from specific period.
SELECT Q.Id AS "post_link", Q.LastActivityDate FROM Posts AS Q WHERE Q.PostTypeId = 1 AND NOT Q.Tags LIKE @Pattern AND Q.LastActivityDate BETWEEN @SubFrom AND @SubTo AND (Q.CreationDate BETWEEN @From AND @To OR EXISTS(SELECT * FROM Posts AS A WHERE A.PostTypeId = 2 AND A.ParentId = Q.Id AND A.CreationDate BETWEEN @From...
sede
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, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescription...
Find the name of female patients who had a granular casts lab test.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.gender = "F" AND lab.label = "Granular Casts"
mimicsql_data
CREATE TABLE table_53058 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What date was the game played at Punt Road Oval?
SELECT "Date" FROM table_53058 WHERE "Venue" = 'punt road oval'
wikisql
CREATE TABLE table_3873 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Series" text )
What is the series number when al horford (10) had the high rebounds?
SELECT "Series" FROM table_3873 WHERE "High rebounds" = 'Al Horford (10)'
wikisql
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, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescription...
what is ethnicity of subject id 16438?
SELECT demographic.ethnicity FROM demographic WHERE demographic.subject_id = "16438"
mimicsql_data
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime...
what is the name of the drug which patient 004-29334 was allergic to since 03/2104?
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 = '004-29334')) AND STRFTIME('%y-%m', allergy.allergytime) >= '2104-03'
eicu
CREATE TABLE zyjzjlb ( YLJGDM text, JZLSH text, MZJZLSH text, KH text, KLX number, HZXM text, WDBZ number, RYDJSJ time, RYTJDM number, RYTJMC text, JZKSDM text, JZKSMC text, RZBQDM text, RZBQMC text, RYCWH text, CYKSDM text, CYKSMC text, CYBQDM tex...
在2007年2月2日至2014年12月8日内编码为7089893的医院开出的检验报告单中不同检测指标名称以及不同检测指标结果定量单位下,检测指标结果定量的平均值是什么?
SELECT JCZBMC, JCZBJGDW, AVG(JCZBJGDL) FROM jyjgzbb WHERE YLJGDM = '7089893' AND BGRQ BETWEEN '2007-02-02' AND '2014-12-08' GROUP BY JCZBMC, JCZBJGDW
css
CREATE TABLE table_26914759_3 ( manner_of_departure VARCHAR, team VARCHAR, incoming_manager VARCHAR )
What was the manner of departure for notts county with an incoming manager of martin allen
SELECT manner_of_departure FROM table_26914759_3 WHERE team = "Notts County" AND incoming_manager = "Martin Allen"
sql_create_context
CREATE TABLE table_29572583_20 ( player VARCHAR, status VARCHAR )
which player had the status to the fourth round lost to tsvetana pironkova [32] Answers:
SELECT player FROM table_29572583_20 WHERE status = "Fourth round lost to Tsvetana Pironkova [32]"
sql_create_context
CREATE TABLE table_name_44 ( home VARCHAR, visitor VARCHAR, date VARCHAR )
What is the Home team of the event on Thursday, December 11 with Visitor Modo Hockey?
SELECT home FROM table_name_44 WHERE visitor = "modo hockey" AND date = "thursday, december 11"
sql_create_context
CREATE TABLE table_76383 ( "Round" real, "Pick" real, "Overall" real, "Name" text, "Position" text, "College" text )
What is the lowest round for an overall pick of 349 with a pick number in the round over 11?
SELECT MIN("Round") FROM table_76383 WHERE "Overall" = '349' AND "Pick" > '11'
wikisql
CREATE TABLE table_38485 ( "Name" text, "Team" text, "Qual 1" text, "Qual 2" real, "Best" real )
Which team has a qualifying 2 time under 59.612 and a best of 59.14?
SELECT "Team" FROM table_38485 WHERE "Qual 2" < '59.612' AND "Best" = '59.14'
wikisql
CREATE TABLE table_18734298_1 ( title VARCHAR, production_code VARCHAR )
What is the title of the production code 1acx09?
SELECT title FROM table_18734298_1 WHERE production_code = "1ACX09"
sql_create_context
CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_airport text, arrival_time int, arrival_airline text, arrival_flight_number int, departure_time int, departure_airline text, departure_flight_number int, stop_time int ) CREATE TABLE month ( ...
what type of airplane is an M80
SELECT DISTINCT aircraft_code FROM aircraft WHERE aircraft_code = 'M80'
atis
CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE departments ( DEPARTME...
Show me a line chart to show the change of salary for those employees whose first name does not containing the letter M over the corresponding hire date.
SELECT HIRE_DATE, SALARY FROM employees WHERE NOT FIRST_NAME LIKE '%M%'
nvbench
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, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( ...
calculate the number of patients admitted to emergency who had colostomy, not otherwise specified.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND procedures.long_title = "Colostomy, not otherwise specified"
mimicsql_data
CREATE TABLE table_56896 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
The home team has a score of 12.9 (81) what is the score of the away team?
SELECT "Away team score" FROM table_56896 WHERE "Home team score" = '12.9 (81)'
wikisql
CREATE TABLE table_53653 ( "Place (Posici\u00f3n)" real, "Team (Equipo)" text, "Played (PJ)" real, "Won (PG)" real, "Draw (PE)" real, "Lost (PP)" real, "Goals Scored (GF)" real, "Goals Conceded (GC)" real, "+/- (Dif.)" real, "Points (Pts.)" real )
What is the average number of goals conceded where more than 19 goals were scored, the team had 31 points, and more than 7 draws?
SELECT AVG("Goals Conceded (GC)") FROM table_53653 WHERE "Goals Scored (GF)" > '19' AND "Points (Pts.)" = '31' AND "Draw (PE)" > '7'
wikisql
CREATE TABLE table_3565 ( "Contestant" text, "Place" real, "Age" real, "Country" text, "Federal state" text, "City" text, "Height" text, "Measurements (in cm)" text )
what measurement does the contestant from sindelfingen have?
SELECT "Measurements (in cm)" FROM table_3565 WHERE "City" = 'Sindelfingen'
wikisql
CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, chart...
has the 'arterial bp mean' level of patient 433 remained normal since 10/23/2105?
SELECT COUNT(*) > 0 FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 433)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp mean' A...
mimic_iii
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
provide the number of patients whose discharge location is short term hospital and admission year is before 2198
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "SHORT TERM HOSPITAL" AND demographic.admityear < "2198"
mimicsql_data
CREATE TABLE ship ( name VARCHAR, ship_id VARCHAR ) CREATE TABLE captain ( ship_id VARCHAR )
Find the name of the ships that have more than one captain.
SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id GROUP BY t2.ship_id HAVING COUNT(*) > 1
sql_create_context
CREATE TABLE table_name_69 ( runner_up VARCHAR, winning_score VARCHAR )
Which Runner-up has a Winning score of 20 (70-69-64-65=268)?
SELECT runner_up FROM table_name_69 WHERE winning_score = −20(70 - 69 - 64 - 65 = 268)
sql_create_context
CREATE TABLE table_27715173_8 ( game VARCHAR, high_points VARCHAR )
what is the game where the high points is by manu gin bili (26)?
SELECT game FROM table_27715173_8 WHERE high_points = "Manu Ginóbili (26)"
sql_create_context
CREATE TABLE table_50944 ( "Rider" text, "Manufacturer" text, "Laps" real, "Time" text, "Grid" real )
What are the average Laps on Grid 15?
SELECT AVG("Laps") FROM table_50944 WHERE "Grid" = '15'
wikisql
CREATE TABLE table_66598 ( "Year" real, "Competition" text, "Venue" text, "Position" text, "Event" text, "Notes" text )
What event was in a year later than 2007 and in the 88th position?
SELECT "Event" FROM table_66598 WHERE "Year" > '2007' AND "Position" = '88th'
wikisql
CREATE TABLE table_53525 ( "Position" real, "Club" text, "Played" real, "Points" text, "Wins" real, "Draws" real, "Losses" real, "Goals for" real, "Goals against" real, "Goal Difference" real )
Which highest 'goals against' number had wins of 19 and a 'goals for' number that was bigger than 53?
SELECT MAX("Goals against") FROM table_53525 WHERE "Wins" = '19' AND "Goals for" > '53'
wikisql
CREATE TABLE table_203_871 ( id number, "#" number, "player" text, "pos" text, "pts" number, "tries" number, "conv" number, "pens" number, "drop" number, "opposition" text, "venue" text, "date" text )
what is the name of the first player on this list ?
SELECT "player" FROM table_203_871 WHERE id = 1
squall
CREATE TABLE table_42917 ( "m\u00e5cha" text, "indicative" text, "imperative" text, "subjunctive" text, "inverse subjunctive" text )
What inverse subjunctive has as the imperative and a subjunctive of se m chadn?
SELECT "inverse subjunctive" FROM table_42917 WHERE "imperative" = '—' AND "subjunctive" = 'se måchadn'
wikisql
CREATE TABLE table_name_76 ( term_in_office VARCHAR, electorate VARCHAR, state VARCHAR, party VARCHAR )
Which term in office has a qld state, a Party of labor, and an Electorate of fisher?
SELECT term_in_office FROM table_name_76 WHERE state = "qld" AND party = "labor" AND electorate = "fisher"
sql_create_context
CREATE TABLE Documents ( document_id INTEGER, document_type_code VARCHAR(10), grant_id INTEGER, sent_date DATETIME, response_received_date DATETIME, other_details VARCHAR(255) ) CREATE TABLE Grants ( grant_id INTEGER, organisation_id INTEGER, grant_amount DECIMAL(19,4), grant_st...
A bar chart for what are the number of the descriptions of all the project outcomes?, and show X in desc order.
SELECT outcome_description, COUNT(outcome_description) FROM Research_Outcomes AS T1 JOIN Project_Outcomes AS T2 ON T1.outcome_code = T2.outcome_code GROUP BY outcome_description ORDER BY outcome_description DESC
nvbench
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, Mark...
users with my same first name who have twitter in their about me.
SELECT COUNT(*) FROM Users WHERE DisplayName LIKE 'Abby %' AND WebsiteUrl LIKE '%twitter%'
sede
CREATE TABLE table_name_40 ( score VARCHAR, money___$__ VARCHAR )
What is the score for the player who won $3,600?
SELECT score FROM table_name_40 WHERE money___$__ = "3,600"
sql_create_context
CREATE TABLE table_72533 ( "Player" text, "Position" text, "Starter" text, "Touchdowns" real, "Extra points" real, "Field goals" real, "Points" real )
Name the most field goals
SELECT MAX("Field goals") FROM table_72533
wikisql
CREATE TABLE table_53833 ( "Year" text, "Winner" text, "Jockey" text, "Trainer" text, "Owner" text, "Distance" text, "Time" text, "Purse" text )
What year did jockey Ramon Dominguez have a distance of 1-1/16?
SELECT "Year" FROM table_53833 WHERE "Distance" = '1-1/16' AND "Jockey" = 'ramon dominguez'
wikisql
CREATE TABLE table_73867 ( "Constituency" text, "Candidate" text, "Affiliation" text, "Result - votes" real, "Result - %" text, "Loss/gain" text )
What is the largest vote result if loss/gain is -0.5%?
SELECT MAX("Result - votes") FROM table_73867 WHERE "Loss/gain" = '-0.5%'
wikisql
CREATE TABLE table_36845 ( "Game" real, "December" real, "Opponent" text, "Score" text, "Record" text )
What is the sum for December when the record was 22-12-5?
SELECT SUM("December") FROM table_36845 WHERE "Record" = '22-12-5'
wikisql
CREATE TABLE COURSE ( CRS_CODE varchar(10), DEPT_CODE varchar(10), CRS_DESCRIPTION varchar(35), CRS_CREDIT float(8) ) CREATE TABLE EMPLOYEE ( EMP_NUM int, EMP_LNAME varchar(15), EMP_FNAME varchar(12), EMP_INITIAL varchar(1), EMP_JOBCODE varchar(5), EMP_HIREDATE datetime, EMP...
Find the number of professors in each office with a bar chart, and order y axis in descending order.
SELECT PROF_OFFICE, COUNT(PROF_OFFICE) FROM PROFESSOR AS T1 JOIN EMPLOYEE AS T2 ON T1.EMP_NUM = T2.EMP_NUM GROUP BY PROF_OFFICE ORDER BY COUNT(PROF_OFFICE) DESC
nvbench
CREATE TABLE table_22851 ( "Year" real, "Worldwide" real, "Africa" real, "America" real, "Asia" real, "Australia" real, "Europe" real )
How many members did Africa have the year that Australia had 94615?
SELECT "Africa" FROM table_22851 WHERE "Australia" = '94615'
wikisql
CREATE TABLE table_2533 ( "Outcome" text, "Year" real, "Championship" text, "Surface" text, "Opponent in the final" text, "Score in the final" text )
List the total number of years that have a score of 3 6, 4 6, 2 6.
SELECT COUNT("Year") FROM table_2533 WHERE "Score in the final" = '3–6, 4–6, 2–6'
wikisql
CREATE TABLE table_55184 ( "Week" text, "Date" text, "Opponent" text, "Result" text, "Kickoff [a ]" text, "Game site" text, "Attendance" text, "Record" text )
What is the result when the Indianapolis Colts are the opponents?
SELECT "Result" FROM table_55184 WHERE "Opponent" = 'indianapolis colts'
wikisql
CREATE TABLE table_name_67 ( country VARCHAR, season VARCHAR, team VARCHAR )
Which country does FC Atyrau represent after the 2006 season?
SELECT country FROM table_name_67 WHERE season > 2006 AND team = "fc atyrau"
sql_create_context
CREATE TABLE table_15857 ( "Player" text, "No." real, "Nationality" text, "Position" text, "Years in Toronto" text, "School/Club Team" text )
Who played in the Toronto Raptors from 1995-96?
SELECT "Player" FROM table_15857 WHERE "Years in Toronto" = '1995-96'
wikisql
CREATE TABLE table_21949 ( "Parish (Prestegjeld)" text, "Sub-Parish (Sokn)" text, "Church Name" text, "Year Built" text, "Location of the Church" text )
What's the sub-parish (sokn) of Eikefjord?
SELECT "Sub-Parish (Sokn)" FROM table_21949 WHERE "Location of the Church" = 'Eikefjord'
wikisql
CREATE TABLE table_1341472_15 ( first_elected VARCHAR, district VARCHAR )
what's the first elected with district illinois 18
SELECT first_elected FROM table_1341472_15 WHERE district = "Illinois 18"
sql_create_context
CREATE TABLE table_79458 ( "Title" text, "Series" text, "Director" text, "Production Number" real, "Release date" text )
What is the highest production number released on 1955-04-02 with i. freleng as the director?
SELECT MAX("Production Number") FROM table_79458 WHERE "Director" = 'i. freleng' AND "Release date" = '1955-04-02'
wikisql
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...
Orphan questions that were migrated from another site. Questions that were migrated and have no owner
SELECT p.Id AS "post_link", p.CreationDate AS "date", p.OwnerDisplayName AS "current_user_name", ph.Comment AS "comment" FROM Posts AS p INNER JOIN PostHistory AS ph ON ph.PostId = p.Id WHERE ph.PostHistoryTypeId = 17 AND p.PostTypeId = 1 AND p.OwnerUserId IS NULL ORDER BY p.Id DESC LIMIT 1000
sede
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 was hired before 2002-06-21, draw a bar chart about the distribution of hire_date and the average of employee_id bin hire_date by time, and I want to sort y-axis from low to high order.
SELECT HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY AVG(EMPLOYEE_ID)
nvbench
CREATE TABLE table_name_61 ( skip VARCHAR, third VARCHAR )
What is the Skip when the Third was john morris?
SELECT skip FROM table_name_61 WHERE third = "john morris"
sql_create_context
CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME, Day_Number INTEGER ) CREATE TABLE Document_Locations ( Document_ID INTEGER, Location_Code CHAR(15), Date_in_Location_From DATETIME, Date_in_Locaton_To DATETIME ) CREATE TABLE Documents_to_be_Destroyed ( Document_ID INTEGER, Destructio...
Show the number of documents for each location code in a bar chart.
SELECT Location_Code, COUNT(Location_Code) FROM Document_Locations GROUP BY Location_Code
nvbench
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...
能知道在2004-09-23到2010-08-14内,患者曹婉娜在看病时是哪些工号及姓名的医生给检测指标537012的吗
SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_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 = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH =...
css
CREATE TABLE table_48113 ( "Province" text, "Largest city" text, "2nd Largest" text, "3rd Largest" text, "4th largest" text )
What is the 3rd largest when 2nd largest in Minab?
SELECT "3rd Largest" FROM table_48113 WHERE "2nd Largest" = 'minab'
wikisql
CREATE TABLE table_6658 ( "Date" text, "City" text, "Opponent" text, "Results\u00b9" text, "Type of game" text )
What type of game was held against France with the results of 3:1?
SELECT "Type of game" FROM table_6658 WHERE "Results\u00b9" = '3:1' AND "Opponent" = 'france'
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 (...
Give the number of patients that died with a drug named pneumococcal vac polyvalent.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.expire_flag = "1" AND prescriptions.drug = "PNEUMOcoccal Vac Polyvalent"
mimicsql_data
CREATE TABLE table_31987 ( "Year" real, "Album" text, "Song" text, "Label" text, "Catalog#" text, "Format" text, "Country" text )
Which song had Central Station as a label and whose album was Various - Wild Nights 4?
SELECT "Song" FROM table_31987 WHERE "Label" = 'central station' AND "Album" = 'various - wild nights 4'
wikisql
CREATE TABLE table_10510 ( "Season" text, "Winner" text, "Team" text, "Position" text, "Win #" real )
Who had more than 3 wins?
SELECT "Winner" FROM table_10510 WHERE "Win #" > '3'
wikisql
CREATE TABLE table_66500 ( "Draw" real, "Artist" text, "Song" text, "Televote/SMS" text, "Place" real )
how many times was the televote/sms 2.39% and the place more than 9?
SELECT COUNT("Draw") FROM table_66500 WHERE "Televote/SMS" = '2.39%' AND "Place" > '9'
wikisql
CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_airport text, arrival_time int, arrival_airline text, arrival_flight_number int, departure_time int, departure_airline text, departure_flight_number int, stop_time int ) CREATE TABLE month ( ...
from WASHINGTON to ATLANTA
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 = 'WASHINGTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATL...
atis
CREATE TABLE table_train_119 ( "id" int, "systolic_blood_pressure_sbp" int, "hemoglobin_a1c_hba1c" float, "diastolic_blood_pressure_dbp" int, "hypotension" bool, "allergy_to_milk" bool, "allergy_to_soy" bool, "body_mass_index_bmi" float, "plasma_creatinine" float, "NOUSE" float )
plasma creatinine > 2 mg / dl.
SELECT * FROM table_train_119 WHERE plasma_creatinine > 2
criteria2sql
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_DIRE_CD text, MED_DIRE_NM text,...
医院9182083所有的记录里按科室名的差异列一下医保的统筹基金和总的医疗费用之比的平均比值
SELECT t_kc21.MED_ORG_DEPT_NM, AVG(t_kc24.OVE_PAY) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '9182083' GROUP BY t_kc21.MED_ORG_DEPT_NM
css
CREATE TABLE table_204_177 ( id number, "player" text, "years played" text, "total w-l" text, "singles w-l" text, "doubles w-l" text )
how many years did an jae sung play ?
SELECT "years played" FROM table_204_177 WHERE "player" = 'an jae-sung'
squall
CREATE TABLE table_39203 ( "Week" text, "Date" text, "Opponent" text, "Result" text, "Record" text )
Name the week for date of bye
SELECT "Week" FROM table_39203 WHERE "Date" = 'bye'
wikisql
CREATE TABLE Clients ( Client_ID INTEGER, Address_ID INTEGER, Customer_Email_Address VARCHAR(255), Customer_Name VARCHAR(255), Customer_Phone VARCHAR(255), Other_Details VARCHAR(255) ) CREATE TABLE Addresses ( Address_ID VARCHAR(100), Line_1 VARCHAR(255), Line_2 VARCHAR(255), Ci...
A bar chart for what are the number of the names of the workshop groups that have bookings with status code 'stop'?, I want to list by the Y in asc.
SELECT Store_Name, COUNT(Store_Name) FROM Bookings AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T1.Status_Code = "stop" GROUP BY Store_Name ORDER BY COUNT(Store_Name)
nvbench
CREATE TABLE table_name_45 ( drawn INTEGER, lost VARCHAR )
What is the sum of the drawn values for teams with 2 losses?
SELECT SUM(drawn) FROM table_name_45 WHERE lost = 2
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 files ( f_id number(10), artist_name varchar2(50), ...
What is the average rating of songs for each language. Plot them as pie chart.
SELECT languages, AVG(rating) FROM song GROUP BY languages
nvbench
CREATE TABLE table_name_81 ( wins VARCHAR, top_25 VARCHAR, top_10 VARCHAR )
What is the total number of Wins, when Top-25 is less than 4, and when Top-10 is less than 1?
SELECT COUNT(wins) FROM table_name_81 WHERE top_25 < 4 AND top_10 < 1
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 lab ( subject_id text, hadm_id text, ...
How many patients of black/cape verdean ethnicity were primarily diagnosed with the disease colangitis
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN" AND demographic.diagnosis = "COLANGITIS"
mimicsql_data
CREATE TABLE Timed_Status_of_Things ( thing_id INTEGER, Date_and_Date DATETIME, Status_of_Thing_Code CHAR(15) ) CREATE TABLE Services ( service_id INTEGER, organization_id INTEGER, service_type_code CHAR(15), service_details VARCHAR(255) ) CREATE TABLE Customers ( customer_id INTEGER, ...
What is the proportion of each customer's move in date? Show me the bar chart.
SELECT date_moved_in, COUNT(date_moved_in) FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id GROUP BY date_moved_in
nvbench
CREATE TABLE team_franchise ( franchise_id TEXT, franchise_name TEXT, active TEXT, na_assoc TEXT ) CREATE TABLE manager ( player_id TEXT, year INTEGER, team_id TEXT, league_id TEXT, inseason INTEGER, g INTEGER, w INTEGER, l INTEGER, rank NUMERIC, plyr_mgr TEXT ) ...
Can you draw the trend of sum attendance over the binning year?, show by the X-axis in descending.
SELECT year, SUM(attendance) FROM home_game ORDER BY year DESC
nvbench
CREATE TABLE instruments ( songid number, bandmateid number, instrument text ) CREATE TABLE tracklists ( albumid number, position number, songid number ) CREATE TABLE band ( id number, firstname text, lastname text ) CREATE TABLE albums ( aid number, title text, year n...
What are the vocal types used in song 'Le Pop'?
SELECT type FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Le Pop"
spider
CREATE TABLE table_79845 ( "Title" text, "Album" text, "Country" text, "Peak position" real, "Weeks on chart" real )
what is the most weeks on chart when the peak position is less than 5 and from Sweden?
SELECT MAX("Weeks on chart") FROM table_79845 WHERE "Peak position" < '5' AND "Country" = 'sweden'
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...
Count the number of patients died in or before year 2111 whose lab test fluid is ascites.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dod_year <= "2111.0" AND lab.fluid = "Ascites"
mimicsql_data
CREATE TABLE table_name_61 ( series VARCHAR, season VARCHAR )
What was the series in season 2009?
SELECT series FROM table_name_61 WHERE season = 2009
sql_create_context
CREATE TABLE sampledata15 ( sample_pk number, state text, year text, month text, day text, site text, commod text, source_id text, variety text, origin text, country text, disttype text, commtype text, claim text, quantity number, growst text, packst t...
What is the maximum pesticide concentration ever found in a commodity?
SELECT MAX(concen) FROM resultsdata15
pesticide
CREATE TABLE table_45338 ( "Year" real, "Domestic freight" real, "Domestic mail" real, "International freight" real, "International mail" real, "Total freight and mail" real, "Change" text )
What is the international mail with the highest number that has a change of +0,2% and less than 0 domestic mail?
SELECT MAX("International mail") FROM table_45338 WHERE "Change" = '+0,2%' AND "Domestic mail" < '0'
wikisql
CREATE TABLE table_name_97 ( park_and_ride_lot VARCHAR, station_name VARCHAR )
What is the park & ride lot for the Temple Square station?
SELECT park_and_ride_lot FROM table_name_97 WHERE station_name = "temple square"
sql_create_context
CREATE TABLE table_22824319_3 ( player VARCHAR, points VARCHAR )
Name the total number of player for 51 points
SELECT COUNT(player) FROM table_22824319_3 WHERE points = 51
sql_create_context
CREATE TABLE table_name_51 ( round INTEGER, name VARCHAR, overall VARCHAR )
Name of David Kimball, and an Overall smaller than 229 is what highest round?
SELECT MAX(round) FROM table_name_51 WHERE name = "david kimball" AND overall < 229
sql_create_context
CREATE TABLE table_53964 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
How is the crowd of the team Geelong?
SELECT AVG("Crowd") FROM table_53964 WHERE "Away team" = 'geelong'
wikisql
CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE flight_fare ( flight_id int, f...
flights from MILWAUKEE to PHOENIX on saturday or sunday AA
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 AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, flight WHERE (((flight.airline_code = 'AA') AND ((flight.flight_days = DAYS_0.days_code AND DA...
atis
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 lab ( subject_id text, hadm_id text, ...
provide the number of patients whose discharge location is snf and days of hospital stay is greater than 13?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "SNF" AND demographic.days_stay > "13"
mimicsql_data
CREATE TABLE repair ( repair_ID int, name text, Launch_Date text, Notes text ) CREATE TABLE machine ( Machine_ID int, Making_Year int, Class text, Team text, Machine_series text, value_points real, quality_rank int ) CREATE TABLE repair_assignment ( technician_id int, ...
For each team, how many technicians are there, and sort from high to low by the y axis.
SELECT Team, COUNT(*) FROM technician GROUP BY Team ORDER BY COUNT(*) DESC
nvbench
CREATE TABLE jyjgzbb ( JYZBLSH text, YLJGDM text, BGDH text, BGRQ time, JYRQ time, JCRGH text, JCRXM text, SHRGH text, SHRXM text, JCXMMC text, JCZBDM text, JCFF text, JCZBMC text, JCZBJGDX text, JCZBJGDL number, JCZBJGDW text, SBBM text, YQBH text...
在01573441264的这次门诊就诊中,就诊状态的名字是什么?代码呢
SELECT JZZTDM, JZZTMC FROM mzjzjlb WHERE JZLSH = '01573441264'
css