instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_name_9 ( visitor VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Date of december 29 has what visitor?
SELECT visitor FROM table_name_9 WHERE date = "december 29"
sql_create_context
CREATE TABLE table_name_59 ( away_team VARCHAR, venue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many points did the away team score at Arden Street Oval?
SELECT away_team AS score FROM table_name_59 WHERE venue = "arden street oval"
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 prescriptions...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "HYPERGLYCEMIA" AND demographic.dod_year <= "2164.0"
mimicsql_data
CREATE TABLE table_7034 ( "Year" real, "Production" text, "Composer" text, "Conductor" text, "Director" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was Director John Ramster's Composer?
SELECT "Composer" FROM table_7034 WHERE "Director" = 'john ramster'
wikisql
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
SELECT COUNT(*) FROM zyjzjlb JOIN hz_info_zyjzjlb JOIN hz_info ON hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.zyjzjlb_id = zyjzjlb.zyjzjlb_id AND hz_info_zyjzjlb.YLJGDM = hz_info.YLJGDM WHERE hz_info.YLJGDM = '96...
css
CREATE TABLE table_name_19 ( snatch INTEGER, total__kg_ VARCHAR, bodyweight VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHTA IS THE SNATCH WITH A TOTAL OF LARGER THAN 318 KG AND BODY WEIGHT OF 84.15?
SELECT AVG(snatch) FROM table_name_19 WHERE total__kg_ > 318 AND bodyweight = 84.15
sql_create_context
CREATE TABLE table_name_35 ( partial_failures INTEGER, failures VARCHAR, successes VARCHAR, launches VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Successes smaller than 6, and Launches larger than 1, and a Failures of 2 is what sum of the partial f...
SELECT SUM(partial_failures) FROM table_name_35 WHERE successes < 6 AND launches > 1 AND failures = 2
sql_create_context
CREATE TABLE table_76528 ( "Poll Source" text, "Sample Size" real, "Margin of Error" real, "Date" text, "Democrat" text, "Republican" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Democrat was selected in the poll with a sample size small...
SELECT "Democrat" FROM table_76528 WHERE "Sample Size" < '516' AND "Republican" = 'ron paul'
wikisql
CREATE TABLE table_name_92 ( finish VARCHAR, year_s__won VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where did the player who won in 1965 finish?
SELECT finish FROM table_name_92 WHERE year_s__won = "1965"
sql_create_context
CREATE TABLE t_kc21 ( CLINIC_ID text, CLINIC_TYPE text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_ID = '82923898' AND t_kc21.MED_SER_ORG_NO = '7620449' AND NOT t_kc21.IN_DIAG_DIS_NM LIKE '%震颤麻痹%'
css
CREATE TABLE table_name_73 ( score VARCHAR, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score of the game when the record was 50-85?
SELECT score FROM table_name_73 WHERE record = "50-85"
sql_create_context
CREATE TABLE table_name_76 ( name VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Name for 1997 99?
SELECT name FROM table_name_76 WHERE year = "1997–99"
sql_create_context
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, ...
SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 25733) AND DATETIME(prescriptions.startdate, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT prescriptions.drug FROM prescriptions WHERE...
mimic_iii
CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, O...
SELECT Id, url = 'site://q/' + CAST(Id AS TEXT), CreationDate, DeletionDate, Score, Tags FROM Posts WHERE (PostTypeId = 1) AND (Tags LIKE '%<##Tagname##>%' OR Title LIKE '%<##Title##>%') AND (NOT DeletionDate IS NULL) ORDER BY DeletionDate DESC LIMIT 100
sede
CREATE TABLE table_name_85 ( grid VARCHAR, driver VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Grid has a Driver of johnny dumfries?
SELECT grid FROM table_name_85 WHERE driver = "johnny dumfries"
sql_create_context
CREATE TABLE table_204_246 ( id number, "department" text, "total deputies" number, "uninominal deputies" number, "plurinominal deputies" number, "special indigenous\nor campesino deputies" number, "senators" number ) -- Using valid SQLite, answer the following questions for the tables pro...
SELECT "department" FROM table_204_246 WHERE "total deputies" = 5
squall
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...
SELECT SUM(QTY), SUM(AMOUNT) FROM t_kc22 WHERE SOC_SRT_DIRE_NM = '氢氯噻嗪片' AND STA_DATE BETWEEN '2000-01-04' AND '2013-04-01'
css
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 mzjzjlb.JLSJ FROM mzjzjlb WHERE mzjzjlb.JZLSH = '61436514102'
css
CREATE TABLE table_58525 ( "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 date was the venue at VFL park?
SELECT "Date" FROM table_58525 WHERE "Venue" = 'vfl park'
wikisql
CREATE TABLE table_204_550 ( id number, "event" text, "record" text, "athlete" text, "date" text, "meet" text, "place" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the first athlete in teh 100m event ?
SELECT "athlete" FROM table_204_550 WHERE "event" = '100 m' ORDER BY "date" LIMIT 1
squall
CREATE TABLE Staff ( staff_id INTEGER, staff_name VARCHAR(255), gender VARCHAR(1), other_staff_details VARCHAR(255) ) CREATE TABLE Part_Faults ( part_fault_id INTEGER, part_id INTEGER, fault_short_name VARCHAR(20), fault_description VARCHAR(255), other_fault_details VARCHAR(255) ) ...
SELECT staff_name, COUNT(*) FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id = T2.contact_staff_id GROUP BY T1.staff_name ORDER BY COUNT(*) DESC
nvbench
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 event ( ID int, Name text, Stadium_ID int, Year text ) CREATE...
SELECT name, meter_100 FROM swimmer ORDER BY meter_100
nvbench
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND procedures.long_title = "Thoracentesis"
mimicsql_data
CREATE TABLE table_name_31 ( round VARCHAR, against VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the round when nueza silva played against greece?
SELECT round FROM table_name_31 WHERE against = "greece"
sql_create_context
CREATE TABLE jyjgzbb ( JYZBLSH text, YLJGDM text, BGDH text, BGRQ time, JYRQ time, JCRGH text, JCRXM text, SHRGH text, SHRXM text, JCXMMC text, JCZBDM text, JCFF text, JCZBMC text, JCZBJGDX text, JCZBJGDL number, JCZBJGDW text, SBBM text, YQBH text...
SELECT mzjzjlb.JZLSH 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 = '85281827' AND hz_info.YLJGDM = '5565030' AND NOT mzjzjlb.JZKSMC LIKE '%ICU%'
css
CREATE TABLE table_name_56 ( hanja VARCHAR, mccune_reischauer VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Hanja for McCune-Reischauer of ch n?
SELECT hanja FROM table_name_56 WHERE mccune_reischauer = "chŏn"
sql_create_context
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dod_year <= "2165.0" AND prescriptions.drug = "Levofloxacin"
mimicsql_data
CREATE TABLE table_name_95 ( high_points VARCHAR, team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the High points with a Team with boston?
SELECT high_points FROM table_name_95 WHERE team = "boston"
sql_create_context
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...
SELECT DATEADD(week, DATEDIFF(day, '20000109', CreationDate) / 7, '20000109') AS "week", COUNT(DISTINCT Posts.Id) AS Posts, SUM(Posts.AnswerCount) AS Answers, SUM(Posts.CommentCount) AS Comments FROM Posts INNER JOIN PostTags ON PostTags.PostId = Posts.Id INNER JOIN Tags ON PostTags.TagId = Tags.Id WHERE Tags.TagName L...
sede
CREATE TABLE table_28785738_1 ( director VARCHAR, no_in_season VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who directed episode 11 of the season?
SELECT director FROM table_28785738_1 WHERE no_in_season = 11
sql_create_context
CREATE TABLE table_1342013_34 ( result VARCHAR, incumbent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's the result with incumbent being william h. ayres
SELECT result FROM table_1342013_34 WHERE incumbent = "William H. Ayres"
sql_create_context
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE microlab ( microl...
SELECT COUNT(*) FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '032-3281' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospi...
eicu
CREATE TABLE table_name_98 ( label VARCHAR, date VARCHAR, catalog VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the label from 1973 that has a catalog number of l 35023?
SELECT label FROM table_name_98 WHERE date = "1973" AND catalog = "l 35023"
sql_create_context
CREATE TABLE table_name_11 ( winner VARCHAR, event VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the winner of the European Poker Tour Grand Final?
SELECT winner FROM table_name_11 WHERE event = "european poker tour grand final"
sql_create_context
CREATE TABLE table_name_10 ( visiting_team VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the visiting team on october 23?
SELECT visiting_team FROM table_name_10 WHERE date = "october 23"
sql_create_context
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE...
SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE NOT FIRST_NAME LIKE '%M%' ORDER BY AVG(SALARY)
nvbench
CREATE TABLE table_204_343 ( id number, "nation" text, "model" text, "length" text, "barrel length" text, "weight" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which country had the least number of models ?
SELECT "nation" FROM table_204_343 GROUP BY "nation" ORDER BY COUNT("model") LIMIT 1
squall
CREATE TABLE table_21337 ( "Department" text, "Projects" real, "Municipalities" real, "Farmers" real, "Irrigated Ha" real, "BID/PRONAR Investment (US$)" text, "Local Investment (US$)" text, "Total" text ) -- Using valid SQLite, answer the following questions for the tables provided abo...
SELECT "Department" FROM table_21337 WHERE "Local Investment (US$)" = '626,798'
wikisql
CREATE TABLE table_74004 ( "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. -- Name the first elected for hosea moffitt (f) 57.9% josiah masters (dr) 4...
SELECT "First elected" FROM table_74004 WHERE "Candidates" = 'Hosea Moffitt (F) 57.9% Josiah Masters (DR) 42.1%'
wikisql
CREATE TABLE table_19930660_3 ( winner VARCHAR, rufus_guest VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the resulting score for the episodes where Rufus's guest is Sean Lock?
SELECT winner FROM table_19930660_3 WHERE rufus_guest = "Sean Lock"
sql_create_context
CREATE TABLE Participants ( Participant_ID INTEGER, Participant_Type_Code CHAR(15), Participant_Details VARCHAR(255) ) CREATE TABLE Events ( Event_ID INTEGER, Service_ID INTEGER, Event_Details VARCHAR(255) ) CREATE TABLE Services ( Service_ID INTEGER, Service_Type_Code CHAR(15) ) CREA...
SELECT Event_Details, COUNT(Event_Details) FROM Events GROUP BY Event_Details ORDER BY Event_Details DESC
nvbench
CREATE TABLE table_72681 ( "Player" text, "G" real, "Tackles" real, "Solo" real, "Assts" real, "Sacks" text, "Int" real, "Int yards" real, "Int avg." text, "Int TD" real, "Fum. rec" real, "Fum. rec TD" real ) -- Using valid SQLite, answer the following questions for the...
SELECT MIN("Int yards") FROM table_72681
wikisql
CREATE TABLE table_name_49 ( year INTEGER, quantity VARCHAR, gwr_numbers VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average Year that has a Quantity of 10, and a GWR Numbers of 409, 290, 315, 317 321, 324, 333?
SELECT AVG(year) FROM table_name_49 WHERE quantity = 10 AND gwr_numbers = "409, 290, 315, 317–321, 324, 333"
sql_create_context
CREATE TABLE table_204_401 ( id number, "rank" number, "lane" number, "name" text, "nationality" text, "react" number, "time" number, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- the difference between yelizaveta bryzhina 's ti...
SELECT ABS((SELECT "time" FROM table_204_401 WHERE "name" = 'yelizaveta bryzhina') - (SELECT "time" FROM table_204_401 WHERE "name" = 'ksenija balta'))
squall
CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDispl...
SELECT LOG(10, CAST((JULIANDAY(CreationDate) - JULIANDAY(q.CreationDate)) * 1440.0 AS INT)) AS "Log Time (m)", LOG(10, COUNT(*)) FROM Posts AS q INNER JOIN Posts AS a ON a.ParentId = q.Id LEFT OUTER JOIN Posts AS a2 ON a.ParentId = a2.ParentId AND a.CreationDate > a2.CreationDate WHERE a2.Id IS NULL AND a.CreationDate ...
sede
CREATE TABLE table_5223 ( "Team" text, "Copa Libertadores 1992" text, "Supercopa Sudamericana 1992" text, "Copa CONMEBOL 1992" text, "Recopa Sudamericana 1992" text, "Intercontinental Cup 1992" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Whic...
SELECT "Copa Libertadores 1992" FROM table_5223 WHERE "Supercopa Sudamericana 1992" = 'round of 16' AND "Team" = 'grêmio'
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 program_requirement.additional_req, program_requirement.category, program_requirement.min_credit, program.name FROM program, program_requirement WHERE program.name LIKE '%CS-LSA%' AND program.program_id = program_requirement.program_id
advising
CREATE TABLE table_75047 ( "Stage" text, "Time" text, "Name" text, "Length" text, "Winner" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Name of the stage with S. Loeb as the Winner with a Length of 13.04km and a Stage of SS12?
SELECT "Name" FROM table_75047 WHERE "Winner" = 's. loeb' AND "Length" = '13.04km' AND "Stage" = 'ss12'
wikisql
CREATE TABLE table_14078 ( "School" text, "Location" text, "Mascot" text, "Enrollment" real, "IHSAA Class" text, "# / County" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where is the school located that has mustangs as a mascot?
SELECT "Location" FROM table_14078 WHERE "Mascot" = 'mustangs'
wikisql
CREATE TABLE table_42818 ( "Date" text, "Home captain" text, "Away captain" text, "Venue" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the Away captain that played on 11,12,13 Aug 1902?
SELECT "Away captain" FROM table_42818 WHERE "Date" = '11,12,13 aug 1902'
wikisql
CREATE TABLE mission ( Mission_ID int, Ship_ID int, Code text, Launched_Year int, Location text, Speed_knots int, Fate text ) CREATE TABLE ship ( Ship_ID int, Name text, Type text, Nationality text, Tonnage int ) -- Using valid SQLite, answer the following questions fo...
SELECT Type, AVG(Tonnage) FROM ship GROUP BY Type ORDER BY AVG(Tonnage)
nvbench
CREATE TABLE table_55249 ( "Year" text, "President" text, "Vice President" text, "Gen.-Secretary" text, "Treasurer" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Vice President has a President of daniel masny, and a Treasurer of rebecca t. al...
SELECT "Vice President" FROM table_55249 WHERE "President" = 'daniel masny' AND "Treasurer" = 'rebecca t. altmann'
wikisql
CREATE TABLE table_11019212_1 ( thursday VARCHAR, location VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's the thursday time with location being hawthorne
SELECT thursday FROM table_11019212_1 WHERE location = "Hawthorne"
sql_create_context
CREATE TABLE supplier_addresses ( supplier_id number, address_id number, date_from time, date_to time ) CREATE TABLE department_store_chain ( dept_store_chain_id number, dept_store_chain_name text ) CREATE TABLE products ( product_id number, product_type_code text, product_name tex...
SELECT product_name, product_id FROM products WHERE product_price BETWEEN 600 AND 700
spider
CREATE TABLE table_50547 ( "Team" text, "Chassis" text, "Engine" text, "Tire" text, "Sponsor" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Chassis of the Honda Engine with a Motorola sponsor?
SELECT "Chassis" FROM table_50547 WHERE "Engine" = 'honda' AND "Sponsor" = 'motorola'
wikisql
CREATE TABLE table_1510519_1 ( number_of_seasons_in_top_division VARCHAR, position_in_2012_13 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many seasons in the top division for the team that finished 005 5th in 2012-2013
SELECT COUNT(number_of_seasons_in_top_division) FROM table_1510519_1 WHERE position_in_2012_13 = "005 5th"
sql_create_context
CREATE TABLE table_67986 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- A ferrari flat-12 engine with more than 1 point has what kind of chassis?
SELECT "Chassis" FROM table_67986 WHERE "Engine" = 'ferrari flat-12' AND "Points" > '1'
wikisql
CREATE TABLE table_name_15 ( lost INTEGER, team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the most number of losses for Quetta Zorawar?
SELECT MAX(lost) FROM table_name_15 WHERE team = "quetta zorawar"
sql_create_context
CREATE TABLE table_name_67 ( description VARCHAR, year_of_issue VARCHAR, weight VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Description has a Year of Issue of 1983, and a Weight of 3.50grams?
SELECT description FROM table_name_67 WHERE year_of_issue = 1983 AND weight = "3.50grams"
sql_create_context
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE charte...
SELECT patients.gender FROM patients WHERE patients.subject_id = 1862
mimic_iii
CREATE TABLE table_1708014_1 ( top_5 INTEGER, top_10 VARCHAR, team_s_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- For team #40 chip ganassi racing which top 5 is the highest where top 10 is 5?
SELECT MAX(top_5) FROM table_1708014_1 WHERE top_10 = 5 AND team_s_ = "#40 Chip Ganassi Racing"
sql_create_context
CREATE TABLE table_75627 ( "County" text, "Per capita income" text, "Median household income" text, "Median family income" text, "Population" real, "Number of households" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What County has a Median ho...
SELECT "County" FROM table_75627 WHERE "Median household income" = '$46,872'
wikisql
CREATE TABLE ROLES ( role_description VARCHAR, role_code VARCHAR ) CREATE TABLE Employees ( role_code VARCHAR, employee_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the role of the employee named Koby?
SELECT T1.role_description FROM ROLES AS T1 JOIN Employees AS T2 ON T1.role_code = T2.role_code WHERE T2.employee_name = "Koby"
sql_create_context
CREATE TABLE Documents_with_expenses ( document_id VARCHAR, budget_type_code VARCHAR ) CREATE TABLE Ref_budget_codes ( budget_type_code VARCHAR, budget_type_description VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show the budget type code and des...
SELECT T2.budget_type_code, T2.budget_type_description, T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_budget_codes AS T2 ON T1.budget_type_code = T2.budget_type_code
sql_create_context
CREATE TABLE table_60743 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Opponent" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What date was the Izmir Cup in which lhan played against Somdev Devvarman?
SELECT "Date" FROM table_60743 WHERE "Tournament" = 'izmir cup' AND "Opponent" = 'somdev devvarman'
wikisql
CREATE TABLE table_204_724 ( id number, "outcome" text, "no." number, "date" text, "tournament" text, "surface" text, "partner" text, "opponents in the final" text, "score in the final" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- ...
SELECT COUNT(*) FROM table_204_724 WHERE "outcome" = 'winner'
squall
CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE SuggestedEdits ( Id number, PostId numb...
SELECT COUNT(Id), PostTypeId FROM Posts WHERE OwnerUserId = @UserId AND CreationDate >= '##year##0101' AND CreationDate <= '##year##1231' GROUP BY PostTypeId
sede
CREATE TABLE table_54954 ( "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 score for the home team who plays t...
SELECT "Home team score" FROM table_54954 WHERE "Venue" = 'mcg'
wikisql
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE patient ( ...
SELECT patient.admissionheight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-67523' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1) AND NOT patient.admissionheight IS NULL ORDER...
eicu
CREATE TABLE table_36299 ( "Game" real, "March" real, "Opponent" text, "Score" text, "Record" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which opponent has 63 points?
SELECT "Opponent" FROM table_36299 WHERE "Points" = '63'
wikisql
CREATE TABLE table_name_33 ( visitor VARCHAR, home VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the visiting team when Winnipeg was the home team?
SELECT visitor FROM table_name_33 WHERE home = "winnipeg"
sql_create_context
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE cost ( costid num...
SELECT intakeoutput.celllabel FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-21071')) AND intakeoutput.cellpath LIKE '%output%' AND D...
eicu
CREATE TABLE Allergy_Type ( Allergy VARCHAR(20), AllergyType VARCHAR(20) ) CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE TABLE Has_Allergy ( StuID INTEGE...
SELECT Major, COUNT(*) FROM Student GROUP BY Major
nvbench
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions...
SELECT demographic.marital_status, demographic.dob FROM demographic WHERE demographic.subject_id = "2560"
mimicsql_data
CREATE TABLE music_festival ( ID int, Music_Festival text, Date_of_ceremony text, Category text, Volume int, Result text ) CREATE TABLE artist ( Artist_ID int, Artist text, Age int, Famous_Title text, Famous_Release_date text ) CREATE TABLE volume ( Volume_ID int, V...
SELECT Category, COUNT(Category) FROM music_festival WHERE Result = "Awarded" GROUP BY Category
nvbench
CREATE TABLE table_29228 ( "Pick #" real, "CFL Team" text, "Player" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What position was pick # 54?
SELECT "Position" FROM table_29228 WHERE "Pick #" = '54'
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 jybgb_jyjgzbb ( JYZBLSH number, ...
SELECT * FROM jyjgzbb WHERE jyjgzbb.JCZBMC = (SELECT jyjgzbb.JCZBMC FROM jyjgzbb WHERE jyjgzbb.JYZBLSH = '13374209977') AND jyjgzbb.JCZBJGDW = (SELECT jyjgzbb.JCZBJGDW FROM jyjgzbb WHERE jyjgzbb.JYZBLSH = '13374209977') AND jyjgzbb.JCZBJGDL >= (SELECT jyjgzbb.JCZBJGDL FROM jyjgzbb WHERE jyjgzbb.JYZBLSH = '13374209977')
css
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
SELECT t_kc21.MED_ORG_DEPT_CD, t_kc21.OUT_DIAG_DIS_CD, AVG(t_kc21.PERSON_AGE) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '7430610' GROUP BY t_kc21.MED_ORG_DEPT_CD, t_kc21.OUT_DIAG_DIS_CD
css
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 ) -- Using valid SQLite, answer the following questions for the...
SELECT T2.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name
nvbench
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, ACC_Percent FROM basketball_match
nvbench
CREATE TABLE table_1342359_15 ( candidates VARCHAR, district VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who are the candidates with district being kansas 4
SELECT candidates FROM table_1342359_15 WHERE district = "Kansas 4"
sql_create_context
CREATE TABLE table_65353 ( "Draw" real, "Language" text, "Artist" text, "Place" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the average draw when the place is 5 and points more than 15?
SELECT AVG("Draw") FROM table_65353 WHERE "Place" = '5' AND "Points" > '15'
wikisql
CREATE TABLE table_name_72 ( score VARCHAR, event VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total score for the 36 arrow finals event?
SELECT COUNT(score) FROM table_name_72 WHERE event = "36 arrow finals"
sql_create_context
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TA...
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'laxatives - enema' AND DATETIME(treatment.treatmenttime) >= DATETIME(CURRENT_TIME(), '-4 year')) AS t1 JOIN ...
eicu
CREATE TABLE table_name_30 ( royal_house VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Royal house has a name of ding?
SELECT royal_house FROM table_name_30 WHERE name = "ding"
sql_create_context
CREATE TABLE table_204_570 ( id number, "rank" number, "mountain" text, "height (m)" number, "height (ft)" number, "range" text, "coordinates" text, "prominence (m)" number, "parent mountain" text, "first ascent" number, "ascents (failed attempts) bef.2004" text ) -- Using ...
SELECT (SELECT "height (m)" FROM table_204_570 WHERE "mountain" = 'k2') > (SELECT "height (m)" FROM table_204_570 WHERE "mountain" = 'kangchenjunga')
squall
CREATE TABLE table_name_4 ( glyph INTEGER, hexadecimal VARCHAR, binary VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of the glyph with a 38 hexadecimal and a binary less than 111000?
SELECT SUM(glyph) FROM table_name_4 WHERE hexadecimal = 38 AND binary < 111000
sql_create_context
CREATE TABLE table_13170 ( "Opposing Teams" text, "Against" real, "Date" text, "Venue" text, "Status" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHat status had an against larger than 6 and a date of 01/02/1975?
SELECT "Status" FROM table_13170 WHERE "Against" > '6' AND "Date" = '01/02/1975'
wikisql
CREATE TABLE table_75061 ( "Team" text, "Week 1" text, "Week 2" text, "Week 3" text, "Week 4" text, "Week 5" text, "Week 6" text, "Week 7" text, "Week 8 Final" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the team for week 1 o...
SELECT "Team" FROM table_75061 WHERE "Week 1" = '28'
wikisql
CREATE TABLE county_public_safety ( County_ID int, Name text, Population int, Police_officers int, Residents_per_officer int, Case_burden int, Crime_rate real, Police_force text, Location text ) CREATE TABLE city ( City_ID int, County_ID int, Name text, White real, ...
SELECT T2.Name, COUNT(T2.Name) FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID GROUP BY T2.Name ORDER BY T2.Name
nvbench
CREATE TABLE table_name_89 ( loser VARCHAR, date VARCHAR, location VARCHAR, winner VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who lost at schaefer stadium when the Winner was new england patriots, and a Date of october 18?
SELECT loser FROM table_name_89 WHERE location = "schaefer stadium" AND winner = "new england patriots" AND date = "october 18"
sql_create_context
CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE comment_instructor ( instructor_id int, ...
SELECT DISTINCT advisory_requirement FROM course WHERE department = 'GTBOOKS' AND number = 331
advising
CREATE TABLE table_31230 ( "Seed" real, "Rank" real, "Player" text, "Points" real, "Points defending" real, "Points won" real, "New points" real, "Status" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is listed in new points when s...
SELECT MIN("New points") FROM table_31230 WHERE "Status" = 'Second round lost to Xavier Malisse'
wikisql
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
SELECT procedures.long_title FROM procedures WHERE procedures.subject_id = "14755"
mimicsql_data
CREATE TABLE table_5969 ( "Round" real, "Club" text, "Home" text, "Away" text, "Aggregate" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is NK Rijeka's away score?
SELECT "Away" FROM table_5969 WHERE "Club" = 'nk rijeka'
wikisql
CREATE TABLE gwyjzb ( 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(*) FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '1301404' AND gwyjzb.IN_HOSP_DATE BETWEEN '2010-11-10' AND '2017-09-26' AND gwyjzb.INSURED_STS = '未就业' AND gwyjzb.MED_AMOUT >= 5083.93 UNION SELECT COUNT(*) FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '1301404' AND fgwyjzb.IN_HOSP_DATE BETWEEN '2010-11-10' AND '...
css
CREATE TABLE table_75977 ( "Club" text, "Played" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Points difference" text, "Tries For" text, "Tries Against" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Wh...
SELECT "Points for" FROM table_75977 WHERE "Points against" = '272'
wikisql
CREATE TABLE table_name_19 ( time VARCHAR, name VARCHAR, lane VARCHAR, heat VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the time for a lane less than 6, and a heat less than 4 for Joanne Malar?
SELECT time FROM table_name_19 WHERE lane < 6 AND heat < 4 AND name = "joanne malar"
sql_create_context
CREATE TABLE zyjzjlb_jybgb ( YLJGDM_ZYJZJLB text, BGDH number, YLJGDM number ) 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, ...
SELECT zyjzjlb.MZZYZDZZBM FROM zyjzjlb WHERE zyjzjlb.JZLSH = '35335335358'
css
CREATE TABLE table_15617 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which record has an Attendance larger than 12,552, and a Score of 7-0?
SELECT "Record" FROM table_15617 WHERE "Attendance" > '12,552' AND "Score" = '7-0'
wikisql