context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_8665 ( "Province" text, "Capital" text, "Population at 2010 Census" real, "Area (km\u00b2)" real, "Density (2010)" real, "Geographical unit" text, "Number of Cities (kota)" real, "Number of Regencies (kabupaten)" real, "Number of Districts (kecamatan)" real, "V...
What is the lowest number of districts (kecamatan) in the north sulawesi province with more than 1,510 villages?
SELECT MIN("Number of Districts (kecamatan)") FROM table_8665 WHERE "Province" = 'north sulawesi' AND "Villages" > '1,510'
wikisql
CREATE TABLE table_name_17 ( surface VARCHAR, score VARCHAR )
Which Surface has a Score of 7 5, 6 4?
SELECT surface FROM table_name_17 WHERE score = "7–5, 6–4"
sql_create_context
CREATE TABLE table_name_49 ( venue VARCHAR, opponent VARCHAR )
What is the venue of the match with the cronulla sharks as the opponent?
SELECT venue FROM table_name_49 WHERE opponent = "cronulla sharks"
sql_create_context
CREATE TABLE pilot ( POSITION VARCHAR, Join_Year INTEGER )
Show the pilot positions that have both pilots joining after year 2005 and pilots joining before 2000.
SELECT POSITION FROM pilot WHERE Join_Year < 2000 INTERSECT SELECT POSITION FROM pilot WHERE Join_Year > 2005
sql_create_context
CREATE TABLE table_15813 ( "Department" text, "Head" text, "Full professors" real, "Honorary professors" real, "Lecturers" real )
What is the average number of honorary professors in the economics department with 1 lecturer?
SELECT AVG("Honorary professors") FROM table_15813 WHERE "Lecturers" = '1' AND "Department" = 'economics'
wikisql
CREATE TABLE table_name_66 ( enzyme VARCHAR, disorder VARCHAR )
What is the enzyme involved in the disorder of Ornithine Transcarbamylase deficiency?
SELECT enzyme FROM table_name_66 WHERE disorder = "ornithine transcarbamylase deficiency"
sql_create_context
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 cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id...
what is the minimum daily number of patients with tobacco use disorder diagnosed the last year?
SELECT MIN(t1.c1) FROM (SELECT COUNT(DISTINCT diagnoses_icd.hadm_id) AS c1 FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'tobacco use disorder') AND DATETIME(diagnoses_icd.charttime, 'start of year') = DATETIME(CURRENT_TIME(...
mimic_iii
CREATE TABLE table_27430 ( "Skip (Club)" text, "W" real, "L" real, "PF" real, "PA" real, "Ends Won" real, "Ends Lost" real, "Blank Ends" real, "Stolen Ends" real )
What are the number of points for associated with exactly 3 stolen ends?
SELECT COUNT("PF") FROM table_27430 WHERE "Stolen Ends" = '3'
wikisql
CREATE TABLE table_41035 ( "Year" real, "Song" text, "Canada Singles" text, "US Hot 100" text, "US A.C." text )
What is the US A.C. in 1974?
SELECT "US A.C." FROM table_41035 WHERE "Year" = '1974'
wikisql
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 ...
患者苗纳兰的住院就诊检验报告单中有哪些报告的日期是在18年9月28以前的?查询这些住院就诊的流水号
SELECT zyjzjlb.JZLSH FROM person_info JOIN hz_info JOIN zyjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE person_info.XM = '苗纳兰' AND NOT zyjzjlb.JZLSH IN (SELECT zyjybgb.JZLSH FROM zyjybgb WHERE zyjybgb.BGRQ >= '2018-09-28' UNI...
css
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, ...
calculate the total drain out #1 other production for patient 3242 until 01/13/2104.
SELECT SUM(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 = 3242)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'drai...
mimic_iii
CREATE TABLE table_name_47 ( attendance INTEGER, h___a VARCHAR, date VARCHAR )
How many Attendances have a H / A of h on 7 march 1903?
SELECT MIN(attendance) FROM table_name_47 WHERE h___a = "h" AND date = "7 march 1903"
sql_create_context
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic (...
how many patients have stayed in the hospital for more than 13 days with a po/ng drug route?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "13" AND prescriptions.route = "PO/NG"
mimicsql_data
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, ...
count the number of patients whose admission type is emergency and drug name is nafcillin?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND prescriptions.drug = "Nafcillin"
mimicsql_data
CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownV...
Number of Votes per Month. The total number of votes (upvotes and downvotes) per month
SELECT UpVotes, DownVotes FROM Users WHERE Id = '##userid##'
sede
CREATE TABLE table_78829 ( "College or Campus Name" text, "Location" text, "District" text, "Affiliation" text, "Weblink" text )
What Weblink has a College or Campus Name of anna university college of engineering tindivanam?
SELECT "Weblink" FROM table_78829 WHERE "College or Campus Name" = 'anna university college of engineering tindivanam'
wikisql
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 job_history ( EMPLOYEE...
For all employees who have the letters D or S in their first name, give me the comparison about the average of salary over the job_id , and group by attribute job_id by a bar chart, I want to rank names from high to low order please.
SELECT JOB_ID, AVG(SALARY) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY JOB_ID DESC
nvbench
CREATE TABLE table_name_90 ( director VARCHAR, title VARCHAR )
Who was the director of the episode Rebel Rabbit?
SELECT director FROM table_name_90 WHERE title = "rebel rabbit"
sql_create_context
CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text, ZYLBDM text, ZYMC text ) CREATE TABLE jyjgzbb ( BGDH text, BGRQ tim...
查询两千年一月二十二日到零八年十一月八日医生72531455接待过多少门诊病人
SELECT COUNT(*) FROM wdmzjzjlb WHERE wdmzjzjlb.ZZYSGH = '72531455' AND wdmzjzjlb.JZKSRQ BETWEEN '2000-01-22' AND '2008-11-08' UNION SELECT COUNT(*) FROM bdmzjzjlb WHERE bdmzjzjlb.ZZYSGH = '72531455' AND bdmzjzjlb.JZKSRQ BETWEEN '2000-01-22' AND '2008-11-08'
css
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, ...
自二零一零年四月五日开始,截止到二零一三年四月九日,患者孔岚翠的病历里有多少种疾病
SELECT COUNT(t_kc21.IN_DIAG_DIS_CD) FROM t_kc21 WHERE t_kc21.PERSON_NM = '孔岚翠' AND t_kc21.IN_HOSP_DATE BETWEEN '2010-04-05' AND '2013-04-09'
css
CREATE TABLE table_39973 ( "Year" real, "Venue" text, "Winner" text, "Country" text, "Score" text )
What is Scotland's winner?
SELECT "Winner" FROM table_39973 WHERE "Country" = 'scotland'
wikisql
CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
卫星纬这位患者的204895指标在零一年四月三十日至零六年一月三十一日期间的情况
SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM...
css
CREATE TABLE table_33479 ( "Season" real, "Coach" text, "Record as played" text, "Actual adjusted record" text, "Regular season Vacated" text )
What is the regular season vacated for the Record as played of 12 19?
SELECT "Regular season Vacated" FROM table_33479 WHERE "Record as played" = '12–19'
wikisql
CREATE TABLE table_43583 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text )
What event did tim Hague have a record of 3-0?
SELECT "Event" FROM table_43583 WHERE "Record" = '3-0'
wikisql
CREATE TABLE table_4449 ( "Runs (Balls)" text, "Wicket" text, "Partnerships" text, "Opponent" text, "Venue" text, "Date" text )
Name the venue for netherlands opponent
SELECT "Venue" FROM table_4449 WHERE "Opponent" = 'netherlands'
wikisql
CREATE TABLE days ( days_code varchar, day_name varchar ) 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, departur...
show me all flights both direct and connecting from DALLAS FORT WORTH to either SAN FRANCISCO or oakland that depart after 1900
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 WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DALLAS FORT WORTH' AND flight.from_...
atis
CREATE TABLE table_name_91 ( original_title VARCHAR, title_in_english VARCHAR )
The Last Metro refers to which Original Title?
SELECT original_title FROM table_name_91 WHERE title_in_english = "the last metro"
sql_create_context
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...
在06年4月14日到2019年11月24日之间患者16067327所有检验结果指标记录中的检测方法都有什么?
SELECT jyjgzbb.JCFF FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz_in...
css
CREATE TABLE table_4192 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" real )
How many dates did 'dick jokes' originally air on?
SELECT COUNT("Original air date") FROM table_4192 WHERE "Title" = 'Dick Jokes'
wikisql
CREATE TABLE table_name_8 ( pronunciation_spelled_free VARCHAR, pronunciation_spelled_checked VARCHAR )
What is Pronunciation Spelled Free, when Pronunciation Spelled Checked is ' '?
SELECT pronunciation_spelled_free FROM table_name_8 WHERE pronunciation_spelled_checked = "ʏ"
sql_create_context
CREATE TABLE table_224844_4 ( reason_for_change VARCHAR, district VARCHAR )
Why was a seat left open fo Connecticut at-large?
SELECT reason_for_change FROM table_224844_4 WHERE district = "Connecticut At-large"
sql_create_context
CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varchar, how varchar, transfer_source varchar, earn_credit varchar, repeat_term varchar, test...
In the Spring and Summer terms , how many 400 -level classes are being offered ?
SELECT COUNT(DISTINCT course.course_id, semester.semester) FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'department0' AND course.number BETWEEN 400 AND 400 + 100 AND semester.semester IN ('SP', 'SS', 'SU') AND semester.semester_id = course_offering.se...
advising
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 ...
在17年10月30日到18年12月8日期间,列出金宏茂患者所有检验结果指标记录中用的什么检测方法?
SELECT jyjgzbb.JCFF FROM person_info JOIN hz_info JOIN mzjzjlb JOIN zyjybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB AND zyjybgb.YLJG...
css
CREATE TABLE table_10133 ( "Rank" real, "Airline" text, "Country" text, "Passengers Carried" real, "Remarks" text, "Alliance" text )
What is the average rank of gol on airlines?
SELECT AVG("Rank") FROM table_10133 WHERE "Airline" = 'gol'
wikisql
CREATE TABLE table_67583 ( "Model" text, "Specification" text, "Build date" text, "Total produced" real, "Wheel arrangement" text, "Prime mover" text, "Power output" text )
What is the build date of the locomotives with a total produced less than 45 and a fb-2 model?
SELECT "Build date" FROM table_67583 WHERE "Total produced" < '45' AND "Model" = 'fb-2'
wikisql
CREATE TABLE table_name_38 ( score VARCHAR, arena VARCHAR )
What was the score of the game at the Broadmoor Arena?
SELECT score FROM table_name_38 WHERE arena = "broadmoor arena"
sql_create_context
CREATE TABLE table_69334 ( "Ship" text, "Builder" text, "Namesake" text, "Renamed" text, "Laid down" text, "Launched" text, "Commissioned or completed(*)" text )
What date was the ship 'Wyandotte' launched?
SELECT "Launched" FROM table_69334 WHERE "Ship" = 'wyandotte'
wikisql
CREATE TABLE table_39755 ( "Office" text, "Democratic ticket" text, "Republican ticket" text, "Socialist ticket" text, "Workers ticket" text )
What is the name on the Republican ticket when the Workers ticket is edward lindgren?
SELECT "Republican ticket" FROM table_39755 WHERE "Workers ticket" = 'edward lindgren'
wikisql
CREATE TABLE table_name_57 ( season VARCHAR, name VARCHAR )
What is Season, when Name is Tony Boy Espinosa?
SELECT season FROM table_name_57 WHERE name = "tony boy espinosa"
sql_create_context
CREATE TABLE table_name_41 ( previous_experience VARCHAR, weight VARCHAR, player VARCHAR )
Weight larger than 180, and a Player of charles b. carter is what previous experience?
SELECT previous_experience FROM table_name_41 WHERE weight > 180 AND player = "charles b. carter"
sql_create_context
CREATE TABLE table_name_59 ( year INTEGER, team VARCHAR )
What is the highest Year when the team was seve ballesteros & manuel pi ero?
SELECT MAX(year) FROM table_name_59 WHERE team = "seve ballesteros & manuel piñero"
sql_create_context
CREATE TABLE table_name_78 ( subj_pres VARCHAR, sing_pres VARCHAR, plur_pret VARCHAR, sing_pret VARCHAR )
What is the subjunctive present that is associated with a plural preterite of u, a singular preterite of ou, and a singular present of ?
SELECT subj_pres FROM table_name_78 WHERE plur_pret = "u" AND sing_pret = "ou" AND sing_pres = "û"
sql_create_context
CREATE TABLE table_21603 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
Who had the high points on April 8?
SELECT "High points" FROM table_21603 WHERE "Date" = 'April 8'
wikisql
CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CRE...
How many comments have you made on someone else's posts?. Other user defaults to Jon Skeet.
SELECT p.OwnerUserId AS "user_link", c.PostId AS "post_link", p.Score, p.CreationDate AS "posted", c.CreationDate AS "commented", c.Score, c.Id AS "comment_link" FROM Posts AS p LEFT OUTER JOIN Comments AS c ON c.PostId = p.Id WHERE c.UserId = '##UserID##' AND p.OwnerUserId = '##OtherUserID:int?22656##'
sede
CREATE TABLE table_26687 ( "Episode number Production number" text, "Title" text, "Original airdate" text, "Time of airing" text, "Total viewers on Hallmark" real, "Total viewers on Hallmark+1" real, "Total viewers" real, "Rank on channel" text )
Name the rank on channel mooning and crooning
SELECT "Rank on channel" FROM table_26687 WHERE "Title" = 'Mooning and Crooning'
wikisql
CREATE TABLE t_kc24 ( MED_SAFE_PAY_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, REF_SLT_FLG number, CLINIC_SLT_DATE time, COMP_ID text, PERSON_ID text, FLX_MED_ORG_ID text, INSU_TYPE text, MED_AMOUT number, PER_ACC_PAY number, OVE_PAY numb...
535这个科室在二零零三年九月二十五日到二零一一年四月三十日内有多少药品058117792的开药记录
SELECT COUNT(*) FROM t_kc22 WHERE MED_ORG_DEPT_CD = '535' AND STA_DATE BETWEEN '2003-09-25' AND '2011-04-30' AND SOC_SRT_DIRE_CD = '058117792'
css
CREATE TABLE table_39944 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
What is the lowest number of bronze medals for Great Britain with more than 2 medals total?
SELECT MIN("Bronze") FROM table_39944 WHERE "Nation" = 'great britain' AND "Total" > '2'
wikisql
CREATE TABLE customer ( customerid number, firstname text, lastname text, company text, address text, city text, state text, country text, postalcode text, phone text, fax text, email text, supportrepid number ) CREATE TABLE invoiceline ( invoicelineid number, ...
Find the names of artists that do not have any albums.
SELECT name FROM artist EXCEPT SELECT T2.name FROM album AS T1 JOIN artist AS T2 ON T1.artistid = T2.artistid
spider
CREATE TABLE table_11278 ( "Entrant" text, "Constructor" text, "Chassis" text, "Engine" text, "Tyre" text, "Driver" text, "Rounds" text )
What company was the entrant for the race with Jack Fairman as the driver with a chassis of t45?
SELECT "Entrant" FROM table_11278 WHERE "Driver" = 'jack fairman' AND "Chassis" = 't45'
wikisql
CREATE TABLE table_68924 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" real )
What are the average points after 1992?
SELECT AVG("Points") FROM table_68924 WHERE "Year" > '1992'
wikisql
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE cost ( c...
in 2105 has patient 013-29301 had any procedure?
SELECT COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-29301')) AND STRFTIME('%y', treatment.treatmenttime) = '2105'
eicu
CREATE TABLE table_name_84 ( result VARCHAR, week__number VARCHAR )
What was the result after the week # top 11?
SELECT result FROM table_name_84 WHERE week__number = "top 11"
sql_create_context
CREATE TABLE table_60919 ( "Ranking" text, "Nationality" text, "Name" text, "Years" text, "Goals" real )
What country is the player who scored 27 goals from?
SELECT "Nationality" FROM table_60919 WHERE "Goals" = '27'
wikisql
CREATE TABLE table_1373768_1 ( trim VARCHAR, engine VARCHAR )
what's the trim with engine being 3.5l lz4 v6
SELECT trim FROM table_1373768_1 WHERE engine = "3.5L LZ4 V6"
sql_create_context
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE i...
did patient 027-32001 come into an er since 2105?
SELECT COUNT(*) > 0 FROM patient WHERE patient.uniquepid = '027-32001' AND patient.hospitaladmitsource = 'emergency department' AND STRFTIME('%y', patient.unitadmittime) >= '2105'
eicu
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...
what is age and gender of subject name gus marques?
SELECT demographic.age, demographic.gender FROM demographic WHERE demographic.name = "Gus Marques"
mimicsql_data
CREATE TABLE table_55951 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
Where was South Melbourne played?
SELECT "Venue" FROM table_55951 WHERE "Home team" = 'south melbourne'
wikisql
CREATE TABLE table_22319599_1 ( njcaa_championships INTEGER )
What is the minimum possible for the NJCAA championships?
SELECT MIN(njcaa_championships) FROM table_22319599_1
sql_create_context
CREATE TABLE table_25271777_1 ( murder VARCHAR, forcible_rape VARCHAR )
What was the number of murders the year forcible rapes were at 166?
SELECT murder FROM table_25271777_1 WHERE forcible_rape = 166
sql_create_context
CREATE TABLE table_61589 ( "Province, Community" text, "Contestant" text, "Height" text, "Hometown" text, "Geographical Regions" text )
What is niurbi encarnaci n ynoa's height?
SELECT "Height" FROM table_61589 WHERE "Contestant" = 'niurbi encarnación ynoa'
wikisql
CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE flight_stop ( flight_id int, stop_n...
i need information on a flight from WASHINGTON to FORT WORTH
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 = 'FOR...
atis
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...
which patients less than 61 years have drug code foli1?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "61" AND prescriptions.formulary_drug_cd = "FOLI1"
mimicsql_data
CREATE TABLE qtb ( CLINIC_ID text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, INSU_TYPE text, IN...
医院4300893所有的记录里,依照科室的不同和入院时诊断病名的区别显示出患者年纪平均值,保留其中小于17岁的记录
SELECT qtb.MED_ORG_DEPT_NM, qtb.IN_DIAG_DIS_NM, AVG(qtb.PERSON_AGE) FROM qtb WHERE qtb.MED_SER_ORG_NO = '4300893' GROUP BY qtb.MED_ORG_DEPT_NM, qtb.IN_DIAG_DIS_NM HAVING AVG(qtb.PERSON_AGE) < 17 UNION SELECT gyb.MED_ORG_DEPT_NM, gyb.IN_DIAG_DIS_NM, AVG(gyb.PERSON_AGE) FROM gyb WHERE gyb.MED_SER_ORG_NO = '4300893' GROUP...
css
CREATE TABLE table_name_70 ( event VARCHAR, round VARCHAR, record VARCHAR )
Which Event has a Round of 1, and a Record of 2 0?
SELECT event FROM table_name_70 WHERE round = "1" AND record = "2–0"
sql_create_context
CREATE TABLE block ( blockfloor number, blockcode number ) CREATE TABLE appointment ( appointmentid number, patient number, prepnurse number, physician number, start time, end time, examinationroom text ) CREATE TABLE room ( roomnumber number, roomtype text, blockfloor ...
Which physicians are trained in procedures that are more expensive than 5000?
SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T3.cost > 5000
spider
CREATE TABLE table_name_79 ( home_team VARCHAR, date VARCHAR )
Which home team played on January 5, 2008?
SELECT home_team FROM table_name_79 WHERE date = "january 5, 2008"
sql_create_context
CREATE TABLE t_kc21 ( MED_CLINIC_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, COMP_ID text, PERSON_ID text, PERSON_NM text, IDENTITY_CARD text, SOC_SRT_CARD text, PERSON_SEX number, PERSON_AGE number, IN_HOSP_DATE time, OUT_HOSP_DATE time, DIFF_PLACE_FLG numb...
号码是0864899的医院的入院诊断疾病结果与出院诊断疾病结果之间在2006年9月23到2013年12月6日里出现了多些不同的结果?
SELECT (SELECT COUNT(*) FROM t_kc21 WHERE MED_SER_ORG_NO = '0864899' AND IN_HOSP_DATE BETWEEN '2006-09-23' AND '2013-12-06') - (SELECT COUNT(*) FROM t_kc21 WHERE MED_SER_ORG_NO = '0864899' AND IN_HOSP_DATE BETWEEN '2006-09-23' AND '2013-12-06' AND IN_DIAG_DIS_CD = OUT_DIAG_DIS_CD)
css
CREATE TABLE table_79462 ( "Rank" real, "Player" text, "County" text, "Tally" text, "Total" real, "Opposition" text )
Which County has a Rank larger than 8, and a Player of joe mckenna?
SELECT "County" FROM table_79462 WHERE "Rank" > '8' AND "Player" = 'joe mckenna'
wikisql
CREATE TABLE table_20464 ( "Rank by average" real, "Place" text, "Couple" text, "Perfect 40s" real, "Total" real, "Number of dances" real, "Season" real, "Average" text )
What is the maximum total in which the average is 28.5?
SELECT MAX("Total") FROM table_20464 WHERE "Average" = '28.5'
wikisql
CREATE TABLE all_documents ( document_id number, date_stored time, document_type_code text, document_name text, document_description text, other_details text ) CREATE TABLE employees ( employee_id number, role_code text, employee_name text, gender_mfu text, date_of_birth tim...
Show the location name for document 'Robin CV'.
SELECT T3.location_name FROM all_documents AS T1 JOIN document_locations AS T2 ON T1.document_id = T2.document_id JOIN ref_locations AS T3 ON T2.location_code = T3.location_code WHERE T1.document_name = "Robin CV"
spider
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number,...
how many prescriptions were ordered for the drug catapres until 2104?
SELECT COUNT(*) FROM medication WHERE medication.drugname = 'catapres' AND STRFTIME('%y', medication.drugstarttime) <= '2104'
eicu
CREATE TABLE table_name_99 ( races VARCHAR, points VARCHAR )
How many races had 10.5 points?
SELECT races FROM table_name_99 WHERE points = "10.5"
sql_create_context
CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text, ZYLBDM text, ZYMC text ) CREATE TABLE jyjgzbb ( BGDH text, BGRQ tim...
看一下在医疗就诊47040795195中给患者任施诗做检验报告的审核人员有哪些?查一下他们的工号
SELECT jybgb.SHRGH, jybgb.SHRXM FROM jybgb WHERE jybgb.JZLSH = '47040795195'
css
CREATE TABLE table_21331 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location/Attendance" text, "Record" text )
On which date was the location/attendance UIC Pavilion 3,829 respectively?
SELECT "Date" FROM table_21331 WHERE "Location/Attendance" = 'UIC Pavilion 3,829'
wikisql
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, ...
能否在编号是0297464的那个医院的医疗记录中按照不相同的科室编码和出院诊断疾病名称把患者年龄的平均数弄出来?
SELECT t_kc21.MED_ORG_DEPT_CD, t_kc21.OUT_DIAG_DIS_NM, AVG(t_kc21.PERSON_AGE) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '0297464' GROUP BY t_kc21.MED_ORG_DEPT_CD, t_kc21.OUT_DIAG_DIS_NM
css
CREATE TABLE table_name_33 ( gpu_model VARCHAR, sspec_number VARCHAR )
What's the GPU model that has sSpec number SR16Z(c0)?
SELECT gpu_model FROM table_name_33 WHERE sspec_number = "sr16z(c0)"
sql_create_context
CREATE TABLE table_22705586_1 ( nationality VARCHAR, name VARCHAR )
Name the nationality for francesco guglielmi
SELECT nationality FROM table_22705586_1 WHERE name = "Francesco Guglielmi"
sql_create_context
CREATE TABLE table_7128 ( "Television service" text, "Country" text, "Language" text, "Content" text, "HDTV" text, "Package/Option" text )
What is the name of the country when the television service is italia 1?
SELECT "Country" FROM table_7128 WHERE "Television service" = 'italia 1'
wikisql
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL )
For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of name and the average of revenue , and group by attribute name, sort by the y axis in desc.
SELECT T1.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T2.Revenue DESC
nvbench
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 procedure icd9 code is 309?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.icd9_code = "309"
mimicsql_data
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE transfers ( row_id number...
what's the first heart rate of patient 2004 on the first intensive care unit visit?
SELECT chartevents.valuenum 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 = 2004) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime LIMIT 1) AND chartevents.itemid IN (SE...
mimic_iii
CREATE TABLE writes ( paperid int, authorid int ) CREATE TABLE venue ( venueid int, venuename varchar ) CREATE TABLE author ( authorid int, authorname varchar ) CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TABLE paperkeyphrase ( paperid int, keyphr...
syntactic parsing papers not written by chris dyer
SELECT DISTINCT author.authorname, paper.paperid FROM author, keyphrase, paper, paperkeyphrase, writes WHERE author.authorname <> 'chris dyer' AND keyphrase.keyphrasename = 'syntactic parsing' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND writes.authorid = author....
scholar
CREATE TABLE table_71182 ( "Name" text, "Years" text, "Gender" text, "Area" text, "Authority" text, "Decile" text, "Roll" real )
Tell me the name with decile of 6 and roll of 93
SELECT "Name" FROM table_71182 WHERE "Decile" = '6' AND "Roll" = '93'
wikisql
CREATE TABLE table_name_30 ( catalog_number VARCHAR, a_side VARCHAR )
What is the catalog number of Venus Demilo's A-side?
SELECT catalog_number FROM table_name_30 WHERE a_side = "venus demilo"
sql_create_context
CREATE TABLE table_name_19 ( japanese_title VARCHAR, tv_station VARCHAR )
Which Japanese Title has a TV Station of ntv?
SELECT japanese_title FROM table_name_19 WHERE tv_station = "ntv"
sql_create_context
CREATE TABLE college ( cname text, state text, enr number ) CREATE TABLE tryout ( pid number, cname text, ppos text, decision text ) CREATE TABLE player ( pid number, pname text, ycard text, hs number )
Find the names of states that have some college students playing in goalie and mid positions.
SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cname = T2.cname WHERE T2.ppos = 'goalie' INTERSECT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cname = T2.cname WHERE T2.ppos = 'mid'
spider
CREATE TABLE table_name_58 ( losses INTEGER, club VARCHAR, wins VARCHAR )
what is the average losses when the club is warrnambool and wins is less than 12?
SELECT AVG(losses) FROM table_name_58 WHERE club = "warrnambool" AND wins < 12
sql_create_context
CREATE TABLE table_name_16 ( assets__us INTEGER, company VARCHAR, revenues__us$_billion_ VARCHAR )
What are the smallest assets with a Company of piraeus bank, and a Revenue (US$ billion) smaller than 3.9?
SELECT MIN(assets__us) AS $_billion_ FROM table_name_16 WHERE company = "piraeus bank" AND revenues__us$_billion_ < 3.9
sql_create_context
CREATE TABLE table_224616_1 ( winners_score VARCHAR, year VARCHAR )
List all winning scores from 1982.
SELECT winners_score FROM table_224616_1 WHERE year = 1982
sql_create_context
CREATE TABLE table_72207 ( "Acquisition" text, "knowledge" text, "penance" text, "permanence of the body" text, "constancy" text, "purity" text )
what's the permanence of the body where constancy is interestedness
SELECT "permanence of the body" FROM table_72207 WHERE "constancy" = 'interestedness'
wikisql
CREATE TABLE table_name_16 ( venue VARCHAR, date VARCHAR )
What was the Venue in 2003?
SELECT venue FROM table_name_16 WHERE date = "2003"
sql_create_context
CREATE TABLE table_25417 ( "Outcome" text, "Year" real, "Championship" text, "Surface" text, "Opponent in the final" text, "Score in the final" text )
Who is the opponent in the final when frankfurt is championship and the year is less than 1993.0?
SELECT "Opponent in the final" FROM table_25417 WHERE "Championship" = 'Frankfurt' AND "Year" < '1993.0'
wikisql
CREATE TABLE table_72101 ( "Season" text, "Competition" text, "Round" text, "Opponents" text, "1st leg" text, "2nd leg" text, "Aggregate" text )
what is the total number of 2nd leg where aggregate is 7-2
SELECT COUNT("2nd leg") FROM table_72101 WHERE "Aggregate" = '7-2'
wikisql
CREATE TABLE table_37079 ( "Date" text, "Tournament" text, "Winning score" text, "Margin of victory" text, "Runner(s) up" text )
What is the margin of victory for Nick Price as a runner-up?
SELECT "Margin of victory" FROM table_37079 WHERE "Runner(s) up" = 'nick price'
wikisql
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE cost ( costid number, uniquepi...
how many patients during this year were prescribed with ondansetron 4mg/2ml inj within 2 months after having undergone antihyperlipidemic agent - hmg-coa reductase inhibitor?
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'antihyperlipidemic agent - hmg-coa reductase inhibitor' AND DATETIME(treatment.treatmenttime, 'start of year...
eicu
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE transfers ( row_id number,...
what was the yearly minimum amount of drain out #1 jp medial given to patient 24220?
SELECT MIN(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 = 24220)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'dra...
mimic_iii
CREATE TABLE table_name_93 ( semifinalists VARCHAR, tournament VARCHAR )
What is Semifinalists, when Tournament is Rome
SELECT semifinalists FROM table_name_93 WHERE tournament = "rome"
sql_create_context
CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, Creati...
What are the most popular programming languages over time.
SELECT Tags FROM Posts WHERE NOT Tags IS NULL
sede
CREATE TABLE table_15277629_1 ( original_title VARCHAR, director VARCHAR, year__ceremony_ VARCHAR )
What was the original title of the Bruno Barreto film in 1989
SELECT original_title FROM table_15277629_1 WHERE director = "Bruno Barreto" AND year__ceremony_ = 1989
sql_create_context
CREATE TABLE table_1805191_2 ( party VARCHAR, incumbent VARCHAR )
What is the party affiliation of the incumbent Robert Cramer?
SELECT party FROM table_1805191_2 WHERE incumbent = "Robert Cramer"
sql_create_context