instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
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,...
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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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...
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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many fatalities were there in the crash described as ditched 300 m sh...
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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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...
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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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, ...
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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 (...
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...
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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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), ...
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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the visiting team where the decision was Biron on October ...
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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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...
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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) ...
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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided ...
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 ...
(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 ) -- Using valid SQLite, answer the following questio...
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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the cyrillic...
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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the...
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 ...
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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the tax source system cod...
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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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,...
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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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...
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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the publication date of the photos of Sean Preston Federline that cost $...
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...
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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) ...
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 ) ...
SELECT procedures.long_title FROM procedures WHERE procedures.subject_id = "2560"
mimicsql_data
CREATE TABLE table_name_2 ( october INTEGER, record VARCHAR, game VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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...
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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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...
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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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, ...
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...
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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Can you tell me the highest Total votes that has t...
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,...
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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ...
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...
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 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,...
SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_NM = '窦绍钧' AND t_kc21.MED_SER_ORG_NO = '7282757' AND t_kc21.IN_DIAG_DIS_NM LIKE '%脑血管病%'
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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 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_CLINIC_ID text, MED_DIRE_CD tex...
SELECT COUNT(*) FROM (SELECT t_kc21.MED_ORG_DEPT_CD FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '2837438' GROUP BY t_kc21.MED_ORG_DEPT_CD HAVING MAX(t_kc21.IN_HOSP_DAYS) < 25) AS T
css
CREATE TABLE table_name_81 ( long INTEGER, name VARCHAR, avg_g VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the...
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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Wins of 0, and a Rank larger than 6, and a Manufacturer of kawasaki, and a Rider of massimo brocco...
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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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...
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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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,...
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, ...
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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest number of laps with a 21 start?
SELECT MAX("Laps") FROM table_69502 WHERE "Start" = '21'
wikisql
CREATE TABLE product ( product VARCHAR, max_page_size VARCHAR, pages_per_minute_color VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find products with max page size as 'A4' and pages per minute color smaller than 5.
SELECT product FROM product WHERE max_page_size = "A4" AND pages_per_minute_color < 5
sql_create_context
CREATE TABLE table_56111 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the horsepower for VIN code of h and...
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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 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...
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
CREATE TABLE table_23998 ( "Name" text, "Completions" real, "Attempts" real, "Completion %" text, "Yards" real, "Touchdowns" real, "Interceptions" real, "QB Rating" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many attempts did Cha...
SELECT COUNT("Attempts") FROM table_23998 WHERE "Name" = 'Charley Johnson'
wikisql
CREATE TABLE table_18123 ( "District" text, "Incumbent" text, "Party" text, "First elected" text, "Results" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many party were listed for district oklahoma 5?
SELECT COUNT("Party") FROM table_18123 WHERE "District" = 'Oklahoma 5'
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...
SELECT MED_SER_ORG_NO FROM t_kc21 WHERE PERSON_ID = '61592932' AND IN_HOSP_DATE BETWEEN '2009-05-21' AND '2015-10-12' GROUP BY MED_SER_ORG_NO ORDER BY COUNT(*) DESC LIMIT 1
css