context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_name_40 ( class VARCHAR, sport VARCHAR, year VARCHAR )
What class is volleyball in 2000?
SELECT class FROM table_name_40 WHERE sport = "volleyball" AND year = 2000
sql_create_context
CREATE TABLE constructorResults ( constructorResultsId INTEGER, raceId INTEGER, constructorId INTEGER, points REAL, status TEXT ) CREATE TABLE status ( statusId INTEGER, status TEXT ) CREATE TABLE seasons ( year INTEGER, url TEXT ) CREATE TABLE constructors ( constructorId INT...
How many races that had any driver whose forename is Lewis? Show me a line chart, sort in ascending by the x-axis.
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" GROUP BY year ORDER BY year
nvbench
CREATE TABLE table_26355 ( "Team" text, "Location" text, "Home Ground" text, "First year in Qld Cup" real, "Last year in Qld Cup" real, "Qld Cup Premierships" text )
What is every value for first year in QLD Cup if home ground is Corbett Park, Crosby Park, Lang Park, ANZ Stadium?
SELECT "First year in Qld Cup" FROM table_26355 WHERE "Home Ground" = 'Corbett Park, Crosby Park, Lang Park, ANZ Stadium'
wikisql
CREATE TABLE entrepreneur ( Entrepreneur_ID int, People_ID int, Company text, Money_Requested real, Investor text ) CREATE TABLE people ( People_ID int, Name text, Height real, Weight real, Date_of_Birth text )
How many entrepreneurs correspond to each investor.
SELECT Investor, COUNT(*) FROM entrepreneur GROUP BY Investor
nvbench
CREATE TABLE table_name_87 ( pick__number VARCHAR, position VARCHAR, round VARCHAR )
What was the pick # for a center picked before round 6?
SELECT COUNT(pick__number) FROM table_name_87 WHERE position = "center" AND round < 6
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 ...
门诊就诊45476480212的就诊科室编码是什么?名称是什么?
SELECT mzjzjlb.JZKSBM, mzjzjlb.JZKSMC FROM mzjzjlb WHERE mzjzjlb.JZLSH = '45476480212'
css
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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,...
孙文敏病患从07年9月1日到2018年9月21日之间所有检测结果指标记录的检测员为编码02458651的检验指标流水号是多少?
SELECT jyjgzbb.JYZBLSH 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.Y...
css
CREATE TABLE table_name_80 ( points INTEGER, premiers VARCHAR )
What's the total sum of points scored by the Brisbane Broncos?
SELECT SUM(points) FROM table_name_80 WHERE premiers = "brisbane broncos"
sql_create_context
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 ReviewTasks ( Id number, ReviewTaskTypeId number, Cr...
Questions with multiple bounties by any users.
SELECT questions.Id AS "post_link", 'site://posts/' + CAST(questions.Id AS TEXT) + '/timeline|timeline' AS "Timeline link", COUNT(*) AS "Number of bounties", SUM(Votes.BountyAmount) AS "Total bounty amount" FROM Posts AS questions LEFT JOIN Votes AS votes ON Votes.PostId = questions.Id WHERE Votes.VoteTypeId = 8 GROUP ...
sede
CREATE TABLE table_25617 ( "date (dd.mm.yyyy)" text, "Tail number" text, "Location" text, "Fatalities" text, "Brief description" text )
How many fatalities were there in the crash described as ditched 300 m short of runway?
SELECT "Fatalities" FROM table_25617 WHERE "Brief description" = 'Ditched 300 m short of runway'
wikisql
CREATE TABLE table_34465 ( "Round" real, "Pick #" real, "Overall" real, "Name" text, "Position" text, "College" text )
Which cornerback has the highest round?
SELECT MAX("Round") FROM table_34465 WHERE "Position" = 'cornerback'
wikisql
CREATE TABLE table_name_3 ( incumbent VARCHAR, district VARCHAR )
Who is the Incumbent that has a District of ohio 13 in Democratic Party?
SELECT incumbent FROM table_name_3 WHERE district = "ohio 13"
sql_create_context
CREATE TABLE table_60410 ( "Date" real, "Name" text, "Venue" text, "Winner" text, "Runner-up" text, "Score" text )
What is Name, when Venue is 'Motherwell'?
SELECT "Name" FROM table_60410 WHERE "Venue" = 'motherwell'
wikisql
CREATE TABLE table_204_839 ( id number, "et" text, "days available" text, "program" text, "host(s)" text, "description" text )
how many days is fbn live available each week ?
SELECT "days available" - "days available" + 1 FROM table_204_839 WHERE "program" = 'fbn live'
squall
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime...
what were the new prescriptions of patient 016-38131 today compared to the prescription they received yesterday?
SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.uniquepid = '016-38131') AND DATETIME(medication.drugstarttime, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT medication.drugname FROM medica...
eicu
CREATE TABLE table_name_89 ( year INTEGER, position VARCHAR )
What is the total year with a Position of 12th?
SELECT SUM(year) FROM table_name_89 WHERE position = "12th"
sql_create_context
CREATE TABLE table_57963 ( "Region" text, "Date" text, "Label" text, "Format" text, "Catalogue" text )
What region is the catalogue number 9362486152 that was from September 3, 2004 from?
SELECT "Region" FROM table_57963 WHERE "Catalogue" = '9362486152' AND "Date" = 'september 3, 2004'
wikisql
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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, ...
病员03874754的检测游离甲状腺素项目在2007年9月8日到16年8月20日期间是哪位医务人员做的员工号及姓名分别是什么?
SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGD...
css
CREATE TABLE table_51661 ( "Edition" text, "Round" text, "Date" text, "Surface" text, "Opponent" text, "Result" text )
What surface was the April 24, 2003 match played on?
SELECT "Surface" FROM table_51661 WHERE "Date" = 'april 24, 2003'
wikisql
CREATE TABLE table_name_27 ( gpu_frequency VARCHAR, release_date VARCHAR, sspec_number VARCHAR )
What is the GPU frequency for the processor released in June 2013, with a sSpec number of sr17l(c0)?
SELECT gpu_frequency FROM table_name_27 WHERE release_date = "june 2013" AND sspec_number = "sr17l(c0)"
sql_create_context
CREATE TABLE table_29012710_1 ( province VARCHAR, number_of_dairy_farms VARCHAR )
what is the location where there are over 200 cattle businesses
SELECT province FROM table_29012710_1 WHERE number_of_dairy_farms = 200
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 (...
count the number of patients whose insurance is medicare and diagnoses icd9 code is 41021?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.insurance = "Medicare" AND diagnoses.icd9_code = "41021"
mimicsql_data
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE prescriptions ( row_id number, s...
how much did patient 57169 pay in hospital in total during their stay?
SELECT SUM(cost.cost) FROM cost WHERE cost.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 57169)
mimic_iii
CREATE TABLE table_1211545_2 ( name VARCHAR, heavy_vehicle__2_axles_ VARCHAR )
What is the name of the plaza where the told for heavy vehicles with 2 axles is r20.50?
SELECT name FROM table_1211545_2 WHERE heavy_vehicle__2_axles_ = "R20.50"
sql_create_context
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_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), ...
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, give me the comparison about the sum of manager_id over the hire_date bin hire_date by time by a bar chart, and list Y-axis from high to low order.
SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY SUM(MANAGER_ID) DESC
nvbench
CREATE TABLE table_10116 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Decision" text, "Attendance" real, "Record" text )
Who was the visiting team where the decision was Biron on October 4?
SELECT "Visitor" FROM table_10116 WHERE "Decision" = 'biron' AND "Date" = 'october 4'
wikisql
CREATE TABLE table_59351 ( "Player" text, "Round" real, "Pick" real, "Position" text, "NFL Club" text )
What is the NFL club with pick # 153?
SELECT "NFL Club" FROM table_59351 WHERE "Pick" = '153'
wikisql
CREATE TABLE table_75860 ( "Date" text, "Time" text, "Home" text, "Away" text, "Score" text, "Ground" text )
What is the Time with a Ground that is humber college north?
SELECT "Time" FROM table_75860 WHERE "Ground" = 'humber college north'
wikisql
CREATE TABLE table_63635 ( "Year" real, "Category" text, "Nominee(s)" text, "Episode" text, "Result" text )
What is the latest year when Neal Baer was a nominee, and the result was nominated?
SELECT MAX("Year") FROM table_63635 WHERE "Result" = 'nominated' AND "Nominee(s)" = 'neal baer'
wikisql
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE patient ( uniquepid tex...
in a year before, what are the top four most frequent lab tests ordered for patients within 2 months after being diagnosed with acute renal failure - due to sepsis?
SELECT t3.labname FROM (SELECT t2.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'acute renal failure - due to sepsis' AND DATETIME(di...
eicu
CREATE TABLE table_name_38 ( nba_draft VARCHAR, college VARCHAR )
What is the NBA Draft status of the person who went to college at LSU?
SELECT nba_draft FROM table_name_38 WHERE college = "lsu"
sql_create_context
CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text, meter_300 text, meter_400 text, meter_500 text, meter_600 text, meter_700 text, Time text ) CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) ...
Give me the comparison about meter_100 over the meter_300 , and could you order by the bar from high to low?
SELECT meter_300, meter_100 FROM swimmer ORDER BY meter_300 DESC
nvbench
CREATE TABLE table_70647 ( "Player" text, "Date" text, "Original Team" text, "Offer Team" text, "Result" text )
What was David Backes' Offer Team?
SELECT "Offer Team" FROM table_70647 WHERE "Player" = 'david backes'
wikisql
CREATE TABLE table_203_465 ( id number, "name" text, "population (2002 census)" number, "population (2007 estimation)" number, "population (2011 census)" number, "area (km2)" number, "density (pop/km2)" number )
which locality has the least amount of area according to this chart ?
SELECT "name" FROM table_203_465 ORDER BY "area (km2)" LIMIT 1
squall
CREATE TABLE jybgb ( YLJGDM text, YLJGDM_MZJZJLB text, YLJGDM_ZYJZJLB text, BGDH text, BGRQ time, JYLX number, JZLSH text, JZLSH_MZJZJLB text, JZLSH_ZYJZJLB text, JZLX number, KSBM text, KSMC text, SQRGH text, SQRXM text, BGRGH text, BGRXM text, SHRGH ...
能知道患者16019866之前看病的医院吗
(SELECT mzjzjlb.YLJGDM FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.RYBH = '16019866') UNION (SELECT zyjzjlb.YLJGDM FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.K...
css
CREATE TABLE table_204_43 ( id number, "name" text, "rural\nmunicipality (rm)" text, "population\n(2011)" number, "population\n(2006)" number, "change\n(%)" number, "land\narea\n(km2)" number, "population\ndensity\n(per km2)" number )
what is the total population for aberdeen in 2011 ?
SELECT "population\n(2011)" FROM table_204_43 WHERE "name" = 'aberdeen'
squall
CREATE TABLE table_3336 ( "Settlement" text, "Cyrillic Name Other Names" text, "Type" text, "Population (2011)" real, "Largest ethnic group (2002)" text, "Dominant religion (2002)" text )
Name the cyrillic name for lazarevo
SELECT "Cyrillic Name Other Names" FROM table_3336 WHERE "Settlement" = 'Lazarevo'
wikisql
CREATE TABLE table_name_92 ( name VARCHAR, maglia_rosa VARCHAR, young_rider VARCHAR, country VARCHAR, giro_wins VARCHAR )
Who is from italy has 0 giro wins, 0 young rider and less than 3 maglia rosa?
SELECT name FROM table_name_92 WHERE country = "italy" AND giro_wins = 0 AND young_rider = 0 AND maglia_rosa < 3
sql_create_context
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER )
What is the number of names for each product in the store?, and sort by the Name in descending.
SELECT Name, COUNT(Name) FROM Products GROUP BY Name ORDER BY Name DESC
nvbench
CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, inspirational int, long_lectures int, extra_credit int, few_tests int, good_feedback int, tough_tests int, heavy_papers int, cares_for_students int, heavy_assignments ...
Who are the upper-level class teachers ?
SELECT DISTINCT instructor.name FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN program_...
advising
CREATE TABLE Benefits_Overpayments ( council_tax_id VARCHAR, cmi_cross_ref_id VARCHAR ) CREATE TABLE CMI_Cross_References ( source_system_code VARCHAR, cmi_cross_ref_id VARCHAR )
What is the tax source system code related to the benefits and overpayments? List the code and the benifit id, order by benifit id.
SELECT T1.source_system_code, T2.council_tax_id FROM CMI_Cross_References AS T1 JOIN Benefits_Overpayments AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id ORDER BY T2.council_tax_id
sql_create_context
CREATE TABLE table_name_9 ( silver VARCHAR, rank VARCHAR, gold VARCHAR )
What kind of Silver has a Rank of 3, and a Gold smaller than 2?
SELECT COUNT(silver) FROM table_name_9 WHERE rank = "3" AND gold < 2
sql_create_context
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,...
自二零零四年九月二十日开始,截止到二零二一年三月十八日,患者19598745的病历最主要是哪家医院的
SELECT t_kc21.MED_SER_ORG_NO FROM t_kc21 WHERE t_kc21.PERSON_ID = '19598745' AND t_kc21.IN_HOSP_DATE BETWEEN '2004-09-20' AND '2021-03-18' GROUP BY t_kc21.MED_SER_ORG_NO ORDER BY COUNT(*) DESC LIMIT 1
css
CREATE TABLE table_8894 ( "Position" real, "Name" text, "Played" real, "Drawn" real, "Lost" real, "Points" real )
What is the largest number played with 16 points in a position over 4?
SELECT MAX("Played") FROM table_8894 WHERE "Points" = '16' AND "Position" > '4'
wikisql
CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE course ( c...
Next semester , what classes are offered at 300 -level ?
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number BETWEEN 300 AND 300 + 100 AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester...
advising
CREATE TABLE table_name_47 ( place VARCHAR, player VARCHAR )
What place is David Graham in?
SELECT place FROM table_name_47 WHERE player = "david graham"
sql_create_context
CREATE TABLE table_26986076_1 ( sat_21_aug VARCHAR, thurs_26_aug VARCHAR )
How many times was the time 20' 05.19 112.703mph on Thurs Aug 26th?
SELECT COUNT(sat_21_aug) FROM table_26986076_1 WHERE thurs_26_aug = "20' 05.19 112.703mph"
sql_create_context
CREATE TABLE table_80032 ( "Type" text, "Person(s)" text, "Publisher(s)" text, "Publication date" text, "Reported price" text )
What was the publication date of the photos of Sean Preston Federline that cost $500,000 and were published by People?
SELECT "Publication date" FROM table_80032 WHERE "Reported price" = '$500,000' AND "Publisher(s)" = 'people' AND "Person(s)" = 'sean preston federline'
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...
从02年6月25日至21年1月22日期间,病患鲁嘉歆被开出的所有检验报告单的检验报告单号都有哪些?
SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb 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 = jybgb.JZLSH_MZJZJLB AND mzjzjl...
css
CREATE TABLE table_18184 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text )
what's the result with district being washington 7
SELECT "Result" FROM table_18184 WHERE "District" = 'Washington 7'
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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
Get me the number of white russian patients born before year 2103.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "WHITE - RUSSIAN" AND demographic.dob_year < "2103"
mimicsql_data
CREATE TABLE procedures ( 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 ) ...
what is procedure long title of subject id 2560?
SELECT procedures.long_title FROM procedures WHERE procedures.subject_id = "2560"
mimicsql_data
CREATE TABLE table_name_2 ( october INTEGER, record VARCHAR, game VARCHAR )
Which October has a Record of 5 1 0, and a Game larger than 6?
SELECT AVG(october) FROM table_name_2 WHERE record = "5–1–0" AND game > 6
sql_create_context
CREATE TABLE table_11622562_1 ( winner VARCHAR, tournament VARCHAR )
What's the winner of the Painewebber Invitational tournament?
SELECT winner FROM table_11622562_1 WHERE tournament = "PaineWebber Invitational"
sql_create_context
CREATE TABLE table ( platform VARCHAR, weight VARCHAR )
What is the platform if the weight is 131.5g?
SELECT platform FROM table WHERE weight = "131.5g"
sql_create_context
CREATE TABLE table_4885 ( "Year" text, "Player" text, "Nationality" text, "Position" text, "Club" text )
What player played for the Balmain Tigers?
SELECT "Player" FROM table_4885 WHERE "Club" = 'balmain tigers'
wikisql
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...
患者64014857的身高和体重分别是多少?
SELECT wdmzjzjlb.SG, wdmzjzjlb.TZ 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 = '64014857' UNION SELECT bdmzjzjlb.SG, bdmzjzjlb.TZ FROM hz_info JOIN bdmzjzjlb ON hz_info.YLJGDM = bdmzjzjlb.YLJGDM AND hz_info.KH = bdmzj...
css
CREATE TABLE table_22464685_1 ( author VARCHAR, english_name VARCHAR )
Who is the auther when the english name was histories and eulogies of the sovereigns?
SELECT author FROM table_22464685_1 WHERE english_name = "Histories and Eulogies of the Sovereigns"
sql_create_context
CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text ) CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Per...
Visualize a bar chart about the distribution of ACC_Regular_Season and Team_ID , show by the y axis in asc.
SELECT ACC_Regular_Season, Team_ID FROM basketball_match ORDER BY Team_ID
nvbench
CREATE TABLE table_6034 ( "Year" real, "Group" text, "Award" text, "Film/Series" text, "Result" text )
Which group nominated Kim in years before 2010 for Thirst?
SELECT "Group" FROM table_6034 WHERE "Year" < '2010' AND "Film/Series" = 'thirst'
wikisql
CREATE TABLE table_9571 ( "Year" real, "Character" text, "Title" text, "Author" text, "Artist" text, "Imprint" text )
what is the title when the imprint is dengeki bunko and the artist is kiyotaka haimura?
SELECT "Title" FROM table_9571 WHERE "Imprint" = 'dengeki bunko' AND "Artist" = 'kiyotaka haimura'
wikisql
CREATE TABLE table_66230 ( "!Event" real, "Round" text, "Surface" text, "Winner" text, "Opponent" text, "Result" text )
Who is iv n navarro's opponent?
SELECT "Opponent" FROM table_66230 WHERE "Result" = 'iván navarro'
wikisql
CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE aircraft ( aircraft_code varchar, aircraft_description varchar, manufacturer varchar, basic_type varchar, engines int, propulsion varchar, wide_body varchar, wing_span int, ...
what is the cheapest fare for a one way flight from BOSTON to ATLANTA
SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_...
atis
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
what is maximum age of patients whose insurance is private and discharge location is home health care?
SELECT MAX(demographic.age) FROM demographic WHERE demographic.insurance = "Private" AND demographic.discharge_location = "HOME HEALTH CARE"
mimicsql_data
CREATE TABLE table_78544 ( "Tujunga" text, "La Crescenta- Montrose" text, "Glendale" text, "La Ca\u00f1ada Flintridge" text, "Pasadena" text )
When Pasadena is at 10%, what is La Crescenta-Montrose?
SELECT "La Crescenta- Montrose" FROM table_78544 WHERE "Pasadena" = '10%'
wikisql
CREATE TABLE table_12387 ( "Year" real, "Gold" text, "Silver" text, "Bronze" text, "Notes" text )
What is Notes, when Bronze is 'Pasi Ikonen'?
SELECT "Notes" FROM table_12387 WHERE "Bronze" = 'pasi ikonen'
wikisql
CREATE TABLE table_73389 ( "District" text, "Vacator" text, "Reason for change" text, "Successor" text, "Date successor seated" text )
How many vacators were in the Pennsylvania 33rd district?
SELECT COUNT("Vacator") FROM table_73389 WHERE "District" = 'Pennsylvania 33rd'
wikisql
CREATE TABLE table_15608800_2 ( wheel_arrangement VARCHAR, class VARCHAR )
Name the number of wheel arrangement when class is d14
SELECT COUNT(wheel_arrangement) FROM table_15608800_2 WHERE class = "D14"
sql_create_context
CREATE TABLE table_74105 ( "Status" text, "2001 number (,000)" real, "2001 %" text, "2011 number (,000)" real, "2011 %" text )
What si the 2011 number (,000) when 2001 % is 28.1?
SELECT MAX("2011 number (,000)") FROM table_74105 WHERE "2001 %" = '28.1'
wikisql
CREATE TABLE table_45694 ( "Election" real, "Candidates fielded" real, "# of seats won" real, "Total votes" real, "% of popular vote" text, "Place" text )
Can you tell me the highest Total votes that has the % of popular vote of 0.86%, and the # of seats won larger than 0?
SELECT MAX("Total votes") FROM table_45694 WHERE "% of popular vote" = '0.86%' AND "# of seats won" > '0'
wikisql
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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,...
23816634375的就诊状态代码以及名称在门诊就诊里都是什么?
SELECT wdmzjzjlb.JZZTDM, wdmzjzjlb.JZZTMC FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '23816634375' UNION SELECT bdmzjzjlb.JZZTDM, bdmzjzjlb.JZZTMC FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '23816634375'
css
CREATE TABLE table_62618 ( "Opposing Teams" text, "Against" real, "Date" text, "Venue" text, "Status" text )
What is Venue, when Date is '14/12/1996'?
SELECT "Venue" FROM table_62618 WHERE "Date" = '14/12/1996'
wikisql
CREATE TABLE table_714 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text )
What is the number of results for james shannon?
SELECT COUNT("Result") FROM table_714 WHERE "Incumbent" = 'James Shannon'
wikisql
CREATE TABLE table_name_4 ( played INTEGER, points VARCHAR, lost VARCHAR, team VARCHAR )
Which Played has a Lost larger than 4, and a Team of am rica, and Points smaller than 5?
SELECT SUM(played) FROM table_name_4 WHERE lost > 4 AND team = "américa" AND points < 5
sql_create_context
CREATE TABLE table_25561560_2 ( yacht VARCHAR )
What is the yacht type of Icap Leopard?
SELECT yacht AS type FROM table_25561560_2 WHERE yacht = "ICAP Leopard"
sql_create_context
CREATE TABLE hz_info_zyjzjlb ( JZLSH number, YLJGDM number, zyjzjlb_id number ) 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 ...
从二00四年十月五日到二00八年十一月八日这段时间,患者苗宏壮检测指标938237找的哪些医务人员做的,这些医务人员的工号和姓名报一下
SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM 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 jy...
css
CREATE TABLE zzmzjzjlb ( 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, MZZYZDZ...
患者邹嘉禧在09年10月29日到11年7月16日,是找的哪些工号及姓名的医务人员检测指标704270的
SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM person_info JOIN hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZ...
css
CREATE TABLE table_42319 ( "Date" text, "Score" text, "Set 1" text, "Set 2" text, "Set 3" text, "Set 4" text, "Set 5" text, "Total" text )
What is the Set 5 with a Date that is jun 29?
SELECT "Set 5" FROM table_42319 WHERE "Date" = 'jun 29'
wikisql
CREATE TABLE table_name_81 ( long INTEGER, name VARCHAR, avg_g VARCHAR )
What is the lowest Long, when Name is Kass, Rob, and when Avg/g is less than -0.30000000000000004?
SELECT MIN(long) FROM table_name_81 WHERE name = "kass, rob" AND avg_g < -0.30000000000000004
sql_create_context
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER )
For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and manufacturer , and group by attribute founder, and could you sort by the bar in asc?
SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name ORDER BY T1.Name
nvbench
CREATE TABLE table_name_41 ( Id VARCHAR )
What is the value in 1988 when it is 2R in 1997 and SF in 1993?
SELECT 1988 FROM table_name_41 WHERE 1997 = "2r" AND 1993 = "sf"
sql_create_context
CREATE TABLE table_1261 ( "Name" text, "Position" text, "Number" real, "School/Club Team" text, "Season" text, "Acquisition via" text )
Namethe school team for season 2008
SELECT "School/Club Team" FROM table_1261 WHERE "Season" = '2008'
wikisql
CREATE TABLE table_name_18 ( points INTEGER, rider VARCHAR, manufacturer VARCHAR, wins VARCHAR, rank VARCHAR )
Wins of 0, and a Rank larger than 6, and a Manufacturer of kawasaki, and a Rider of massimo broccoli involved what highest points?
SELECT MAX(points) FROM table_name_18 WHERE wins = 0 AND rank > 6 AND manufacturer = "kawasaki" AND rider = "massimo broccoli"
sql_create_context
CREATE TABLE table_16376436_1 ( player VARCHAR, pick__number VARCHAR )
Which player was pick number 150?
SELECT player FROM table_16376436_1 WHERE pick__number = 150
sql_create_context
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
what is the number of patients whose days of hospital stay is greater than 20 and procedure icd9 code is 9907?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "20" AND procedures.icd9_code = "9907"
mimicsql_data
CREATE TABLE table_20785990_2 ( position VARCHAR, home_town VARCHAR )
What position is the player from Chapel Hill, NC?
SELECT position FROM table_20785990_2 WHERE home_town = "Chapel Hill, NC"
sql_create_context
CREATE TABLE table_name_43 ( driver VARCHAR, constructor VARCHAR, time_retired VARCHAR )
who is the driver for the car constructed by ferrari with a time/retired of +1:06.683?
SELECT driver FROM table_name_43 WHERE constructor = "ferrari" AND time_retired = "+1:06.683"
sql_create_context
CREATE TABLE table_1342013_12 ( result VARCHAR, incumbent VARCHAR )
What was the result when Leo E. Allen was elected?
SELECT result FROM table_1342013_12 WHERE incumbent = "Leo E. Allen"
sql_create_context
CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE Comments ( Id number, PostId number, Score number,...
Top 10 Questions by view.
SELECT Id, Body, Title, OwnerDisplayName, ViewCount FROM Posts ORDER BY ViewCount DESC LIMIT 10
sede
CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, ...
flights from DENVER to PITTSBURGH on thursday
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTSBURGH' AND date_day.day_number = 24 AND date_day.month_number = 5 AN...
atis
CREATE TABLE table_name_25 ( class VARCHAR, laps VARCHAR, year VARCHAR, team VARCHAR )
Which Class Pos has a Year larger than 1997, a Team of corvette racing, a Class of gt1, and 327 laps?
SELECT class AS pos FROM table_name_25 WHERE year > 1997 AND team = "corvette racing" AND class = "gt1" AND laps = 327
sql_create_context
CREATE TABLE table_69502 ( "Year" text, "Start" text, "Qual" text, "Rank" text, "Finish" text, "Laps" real )
What is the highest number of laps with a 21 start?
SELECT MAX("Laps") FROM table_69502 WHERE "Start" = '21'
wikisql
CREATE TABLE table_56111 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What was the away team's score in Junction Oval?
SELECT "Away team score" FROM table_56111 WHERE "Venue" = 'junction oval'
wikisql
CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, Di...
SELECT * FROM posts WHERE Id < 100000 and AnswerCount > 0 and Tags NOT NULL.
SELECT * FROM Posts WHERE Id < 100000 AND AnswerCount > 0 AND NOT Tags IS NULL
sede
CREATE TABLE table_4338 ( "Engine" text, "Horsepower" text, "Torque" text, "Carburetor" text, "Compression Ratio" text, "Bore & Stroke" text, "VIN Code" text )
Name the horsepower for VIN code of h and engine for 351-2v cleveland v8
SELECT "Horsepower" FROM table_4338 WHERE "VIN Code" = 'h' AND "Engine" = '351-2v cleveland v8'
wikisql
CREATE TABLE table_26460435_7 ( status VARCHAR, monarch VARCHAR )
What is the status for the monarch Mingyinyo?
SELECT status FROM table_26460435_7 WHERE monarch = "Mingyinyo"
sql_create_context
CREATE TABLE table_name_25 ( power VARCHAR, name VARCHAR )
Which Power has a Name of 9 ad?
SELECT power FROM table_name_25 WHERE name = "9 ad"
sql_create_context
CREATE TABLE table_name_48 ( hangul VARCHAR, kana VARCHAR )
What is the Hangul of the Province with a Kana of ?
SELECT hangul FROM table_name_48 WHERE kana = "へいあんなんどう"
sql_create_context
CREATE TABLE table_name_33 ( party VARCHAR, president VARCHAR )
What is the party affiliation for President Stefano Baccelli?
SELECT party FROM table_name_33 WHERE president = "stefano baccelli"
sql_create_context
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id numb...
until 2104, how many patients with patent ductus arteriosus were diagnosed within 2 months after being diagnosed with lack of coordination?
SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'patent ductus arte...
mimic_iii