instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_name_65 ( crowd INTEGER, venue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the biggest crowd at punt road oval?
SELECT MAX(crowd) FROM table_name_65 WHERE venue = "punt road oval"
sql_create_context
CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text, meter_300 text, meter_40...
SELECT meter_200, SUM(meter_100) FROM swimmer GROUP BY meter_200 ORDER BY SUM(meter_100)
nvbench
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE vitalperiodic ( ...
SELECT patient.uniquepid FROM patient WHERE patient.patientunitstayid IN (SELECT diagnosis.patientunitstayid FROM diagnosis WHERE diagnosis.diagnosisname = 'metastatic squamous cell ca - unknown primary' AND DATETIME(diagnosis.diagnosistime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year'))
eicu
CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE Tags ( Id number, TagName text, Cou...
SELECT Id AS "post_link", Body, Score FROM Posts WHERE NOT Title IS NULL AND LENGTH(Body) BETWEEN 1 AND 25
sede
CREATE TABLE table_33631 ( "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. -- Who was the home team that scored 8.7 (55)?
SELECT "Home team" FROM table_33631 WHERE "Home team score" = '8.7 (55)'
wikisql
CREATE TABLE table_22188 ( "State" text, "City" text, "Population" real, "Violent Crime" text, "Murder and Non-Negligent Manslaughter" text, "Forcible Rape" text, "Robbery" text, "Aggravated Assault" text, "Property Crime" text, "Burglary" text, "Larceny-Theft" text, "Mot...
SELECT MAX("Population") FROM table_22188 WHERE "City" = 'Minneapolis'
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 gwyjzb.MED_ORG_DEPT_CD FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '5403493' GROUP BY gwyjzb.MED_ORG_DEPT_CD HAVING MAX(gwyjzb.IN_HOSP_DAYS) < 18 UNION SELECT fgwyjzb.MED_ORG_DEPT_CD FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '5403493' GROUP BY fgwyjzb.MED_ORG_DEPT_CD HAVING MAX(fgwyjzb.IN_H...
css
CREATE TABLE wdmzjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH number, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZD...
SELECT COUNT(*) FROM wdmzjzjlb WHERE wdmzjzjlb.YLJGDM = '6088792' AND wdmzjzjlb.JZKSMC = '头颈肿瘤科' AND wdmzjzjlb.RYDJSJ BETWEEN '2017-09-06' AND '2021-12-14' UNION SELECT COUNT(*) FROM bdmzjzjlb WHERE bdmzjzjlb.YLJGDM = '6088792' AND bdmzjzjlb.JZKSMC = '头颈肿瘤科' AND bdmzjzjlb.RYDJSJ BETWEEN '2017-09-06' AND '2021-12-14'
css
CREATE TABLE table_name_59 ( founded VARCHAR, location VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was the team that plays at Athelstone founded?
SELECT founded FROM table_name_59 WHERE location = "athelstone"
sql_create_context
CREATE TABLE table_67371 ( "Language" text, "Number" text, "percentage (%)" text, "males" text, "females" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which language do 87.5% of males speak?
SELECT "males" FROM table_67371 WHERE "percentage (%)" = '87.5'
wikisql
CREATE TABLE table_name_46 ( crowd INTEGER, home_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many people were in the crowd at collingwood's home game?
SELECT SUM(crowd) FROM table_name_46 WHERE home_team = "collingwood"
sql_create_context
CREATE TABLE table_11972 ( "CERCLIS ID" text, "Name" text, "County" text, "Partially deleted" text, "Deleted" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the CERCLIS ID of the site in Polk County, with the date 08/04/2009?
SELECT "CERCLIS ID" FROM table_11972 WHERE "County" = 'polk' AND "Deleted" = '08/04/2009'
wikisql
CREATE TABLE table_68752 ( "Date" text, "Visiting Team" text, "Final Score" text, "Host Team" text, "Stadium" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the host team for the game on December 27?
SELECT "Host Team" FROM table_68752 WHERE "Date" = 'december 27'
wikisql
CREATE TABLE t_kc22 ( MED_EXP_DET_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, MED_EXP_BILL_ID text, SOC_SRT_DIRE_CD text, SOC_SRT_DIRE_NM text, DIRE_TYPE number, CHA_ITEM_LEV number, MED_INV_ITEM_TYPE text, MED_DIRE_CD text, MED_DIRE_NM text,...
SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '俞虹影' AND t_kc22.STA_DATE BETWEEN '2014-05-05' AND '2019-01-16' AND t_kc22.MED_INV_ITEM_TYPE = '检查费'
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_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_ID = '80675111' AND t_kc22.MED_INV_ITEM_TYPE = '治疗费' UNION SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc22.MED...
css
CREATE TABLE table_3884 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is...
SELECT "Team" FROM table_3884 WHERE "High points" = 'Wesley Johnson (20)'
wikisql
CREATE TABLE table_name_13 ( operator VARCHAR, width VARCHAR, type_designation VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Operator has a Width of 2.65 m, and a Type designation of m5000?
SELECT operator FROM table_name_13 WHERE width = "2.65 m" AND type_designation = "m5000"
sql_create_context
CREATE TABLE table_63839 ( "Year" real, "Competition" text, "Venue" text, "Position" text, "Notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average year in which the finish position was 13th?
SELECT AVG("Year") FROM table_63839 WHERE "Position" = '13th'
wikisql
CREATE TABLE table_18649 ( "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. -- How many districts for ren l. derouen?
SELECT COUNT("District") FROM table_18649 WHERE "Incumbent" = 'René L. DeRouen'
wikisql
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtim...
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'social work consult') AS t1 JOIN (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN pati...
eicu
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE microbiologyevents ( row_id number, subject_id number...
SELECT outputevents.charttime FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 1902)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'cath ...
mimic_iii
CREATE TABLE table_name_64 ( money___ INTEGER, place VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the largest money for a t4 place, for Tiger Woods?
SELECT MAX(money___) AS $__ FROM table_name_64 WHERE place = "t4" AND player = "tiger woods"
sql_create_context
CREATE TABLE table_14627 ( "Name" text, "Country" text, "Type" text, "Moving from" text, "Transfer window" text, "Ends" real, "Transfer fee" text, "Source" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the country th...
SELECT "Country" FROM table_14627 WHERE "Transfer window" = 'winter' AND "Ends" > '2009' AND "Moving from" = 'bolton wanderers'
wikisql
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 COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "T5 FRACTURE" AND demographic.dod_year <= "2115.0"
mimicsql_data
CREATE TABLE table_66585 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the result when the opponent is at dallas cowboys?
SELECT "Result" FROM table_66585 WHERE "Opponent" = 'at dallas cowboys'
wikisql
CREATE TABLE genre ( genreid number, name text ) CREATE TABLE album ( albumid number, title text, artistid number ) CREATE TABLE playlisttrack ( playlistid number, trackid number ) CREATE TABLE employee ( employeeid number, lastname text, firstname text, title text, re...
SELECT name FROM track WHERE name LIKE '%you%'
spider
CREATE TABLE table_name_78 ( player VARCHAR, year_s__won VARCHAR, country VARCHAR, total VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What player in the United States had a total of 286 and won in 2003?
SELECT player FROM table_name_78 WHERE country = "united states" AND total = 286 AND year_s__won = "2003"
sql_create_context
CREATE TABLE table_23984 ( "Model Type" text, "Model Designation" text, "Engine" text, "Wheelbase (mm/inch)" text, "GVW (kg/ton)" text, "Axle Ratio" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the GVW for model 97H00?
SELECT "GVW (kg/ton)" FROM table_23984 WHERE "Model Designation" = '97H00'
wikisql
CREATE TABLE table_21422977_1 ( ministries INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the most amount of ministries?
SELECT MAX(ministries) FROM table_21422977_1
sql_create_context
CREATE TABLE table_name_33 ( film_title_used_in_nomination VARCHAR, country VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What title did the film from Colombia use in its nomination?
SELECT film_title_used_in_nomination FROM table_name_33 WHERE country = "colombia"
sql_create_context
CREATE TABLE table_name_88 ( city VARCHAR, home_team_s VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What city has the home team of the brisbane broncos?
SELECT city FROM table_name_88 WHERE home_team_s = "brisbane broncos"
sql_create_context
CREATE TABLE table_7773 ( "Date" text, "Opponent" text, "Score" text, "Leading Scorer" text, "Attendance" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Leading scorer during the game of 68-79?
SELECT "Leading Scorer" FROM table_7773 WHERE "Score" = '68-79'
wikisql
CREATE TABLE table_name_52 ( time VARCHAR, laps VARCHAR, grid VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the time for 18 laps and 5 grids?
SELECT time FROM table_name_52 WHERE laps = 18 AND grid = 5
sql_create_context
CREATE TABLE city ( city_id number, city text, hanzi text, hanyu_pinyin text, regional_population number, gdp number ) CREATE TABLE match ( match_id number, date text, venue text, score text, result text, competition text ) CREATE TABLE hosting_city ( year number, ...
SELECT gdp FROM city ORDER BY regional_population DESC LIMIT 1
spider
CREATE TABLE table_75112 ( "Flat" text, "Threaded" text, "User-selectable themes" text, "Calendar" text, "Image attachment" text, "Unread message tracking" text, "WYSIWYG Editor" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Calendar ...
SELECT "Calendar" FROM table_75112 WHERE "WYSIWYG Editor" = 'no' AND "Unread message tracking" = 'session' AND "Image attachment" = 'no'
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 lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "89" AND lab.flag = "abnormal"
mimicsql_data
CREATE TABLE table_60576 ( "Name" text, "Years" text, "MLS Cup" real, "U.S. Open Cup" real, "CONCACAF" real, "Other" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many Totals have a CONCACAF of 0, and an MLS Cup smaller th...
SELECT COUNT("Total") FROM table_60576 WHERE "CONCACAF" = '0' AND "MLS Cup" < '6'
wikisql
CREATE TABLE table_77084 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the Player who has a Country of united states, and a To par of 5?
SELECT "Player" FROM table_77084 WHERE "Country" = 'united states' AND "To par" = '–5'
wikisql
CREATE TABLE table_42043 ( "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 Opponent has a Score that is 1-6, 3-6?
SELECT "Opponent" FROM table_42043 WHERE "Score" = '1-6, 3-6'
wikisql
CREATE TABLE table_49134 ( "Event" text, "Date" text, "Round" text, "Name" text, "Nationality" text, "Time" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the date in which the time was 2:16.08?
SELECT "Date" FROM table_49134 WHERE "Time" = '2:16.08'
wikisql
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "64" AND procedures.short_title = "Temporary tracheostomy"
mimicsql_data
CREATE TABLE table_56188 ( "Book title" text, "Author" text, "Edition/Publisher" text, "Page count" text, "Page size" text, "Language" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who published in Italian with a page size of 8 inches (20cm) x ...
SELECT "Edition/Publisher" FROM table_56188 WHERE "Language" = 'italian' AND "Page size" = '8 inches (20cm) x 5.4 inches (14cm)'
wikisql
CREATE TABLE device ( Device_ID int, Device text, Carrier text, Package_Version text, Applications text, Software_Platform text ) CREATE TABLE shop ( Shop_ID int, Shop_Name text, Location text, Open_Date text, Open_Year int ) CREATE TABLE stock ( Shop_ID int, Device...
SELECT Shop_Name, COUNT(Shop_Name) FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID GROUP BY Shop_Name ORDER BY Shop_Name DESC
nvbench
CREATE TABLE table_name_1 ( legs_lost VARCHAR, played VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of 3-dart average when legs lost is larger than 41, and played is larger than 7?
SELECT COUNT(3 AS _dart_average) FROM table_name_1 WHERE legs_lost > 41 AND played > 7
sql_create_context
CREATE TABLE table_name_87 ( position VARCHAR, round VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What position was Jafus White who was picked after round 1?
SELECT position FROM table_name_87 WHERE round > 1 AND player = "jafus white"
sql_create_context
CREATE TABLE table_22865 ( "Pair I.D." real, "Survive?" real, "Industry" text, "Current ratio" real, "Quick ratio" real, "Net worth to fixed assets" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If the net worth of fixed assets is 621, what is ...
SELECT "Current ratio" FROM table_22865 WHERE "Net worth to fixed assets" = '621'
wikisql
CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime ...
SELECT (SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 12944) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime DESC LIMIT 1) AND chartevents...
mimic_iii
CREATE TABLE Rooms ( RoomId TEXT, roomName TEXT, beds INTEGER, bedType TEXT, maxOccupancy INTEGER, basePrice INTEGER, decor TEXT ) CREATE TABLE Reservations ( Code INTEGER, Room TEXT, CheckIn TEXT, CheckOut TEXT, Rate REAL, LastName TEXT, FirstName TEXT, Adul...
SELECT roomName, COUNT(roomName) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE FirstName LIKE '%ROY%' GROUP BY roomName ORDER BY COUNT(roomName) DESC
nvbench
CREATE TABLE table_name_46 ( german_gewehr_98 VARCHAR, danish_krag_jørgensen_1889 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the German Gewehr 98 when the Danish Krag-J rgensen 1889 is 4.28kg?
SELECT german_gewehr_98 FROM table_name_46 WHERE danish_krag_jørgensen_1889 = "4.28kg"
sql_create_context
CREATE TABLE table_name_59 ( team VARCHAR, home_city VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What team is from terni?
SELECT team FROM table_name_59 WHERE home_city = "terni"
sql_create_context
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 * FROM hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz_i...
css
CREATE TABLE Subjects ( subject_id INTEGER, subject_name VARCHAR(120) ) CREATE TABLE Student_Tests_Taken ( registration_id INTEGER, date_test_taken DATETIME, test_result VARCHAR(255) ) CREATE TABLE Course_Authors_and_Tutors ( author_id INTEGER, author_tutor_ATB VARCHAR(3), login_name V...
SELECT date_test_taken, COUNT(date_test_taken) FROM Student_Tests_Taken WHERE test_result = "Pass" ORDER BY date_test_taken DESC
nvbench
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM hz_info JOIN mzjzjlb JOIN zyjybgb JOIN jyjgzbb ON 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.YLJGDM = jyjgzbb.YLJGDM AND zyjybgb.BGDH ...
css
CREATE TABLE table_name_73 ( grid VARCHAR, driver VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the grid total for jean-pierre beltoise?
SELECT COUNT(grid) FROM table_name_73 WHERE driver = "jean-pierre beltoise"
sql_create_context
CREATE TABLE table_44610 ( "Outcome" text, "Date" text, "Championship" text, "Surface" text, "Opponent" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Date, when Score is 6-3, 4-6, 0-6?
SELECT "Date" FROM table_44610 WHERE "Score" = '6-3, 4-6, 0-6'
wikisql
CREATE TABLE table_49467 ( "Game" text, "Date" text, "Home team" text, "Result" text, "Road team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Date has a Road team of portland, and a Game of game 5?
SELECT "Date" FROM table_49467 WHERE "Road team" = 'portland' AND "Game" = 'game 5'
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.discharge_location = "HOME" AND demographic.days_stay > "10"
mimicsql_data
CREATE TABLE table_24126518_2 ( record VARCHAR, week VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the number of record for week 11
SELECT COUNT(record) FROM table_24126518_2 WHERE week = 11
sql_create_context
CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TABLE paperkeyphrase ( paperid int, keyphraseid int ) CREATE TABLE dataset ( datasetid int, datasetname varchar ) CREATE TABLE field ( fieldid int ) CREATE TABLE paperdataset ( paperid int, datasetid int ) ...
SELECT DISTINCT dataset.datasetid FROM dataset, paper, paperdataset, venue WHERE paperdataset.datasetid = dataset.datasetid AND paper.paperid = paperdataset.paperid AND venue.venueid = paper.venueid AND venue.venuename = 'icml'
scholar
CREATE TABLE table_56478 ( "Race" text, "Circuit" text, "Date" text, "Pole position" text, "Fastest lap" text, "Winning driver" text, "Constructor" text, "Tyre" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is th...
SELECT "Report" FROM table_56478 WHERE "Constructor" = 'ferrari' AND "Circuit" = 'monza'
wikisql
CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, C...
SELECT COUNT(*) * 1.0 / (SELECT COUNT(*) FROM Posts WHERE PostTypeId = 1 OR PostTypeId = 2) AS "votes", COUNT(CASE VoteTypeId WHEN 2 THEN 1 END) * 1.0 / (SELECT COUNT(*) FROM Posts WHERE PostTypeId = 1 OR PostTypeId = 2) AS "upvotes", COUNT(CASE VoteTypeId WHEN 3 THEN 1 END) * 1.0 / (SELECT COUNT(*) FROM Posts WHERE Po...
sede
CREATE TABLE table_66772 ( "Episode" text, "First aired" text, "Entrepreneur(s)" text, "Company or product name" text, "Money requested (\u00a3)" text, "Investing Dragon(s)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Investing Dragon h...
SELECT "Investing Dragon(s)" FROM table_66772 WHERE "Money requested (\u00a3)" = '100,000' AND "Entrepreneur(s)" = 'kay russell'
wikisql
CREATE TABLE table_name_12 ( series VARCHAR, release_date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What series has 1935-07-13 as the release date?
SELECT series FROM table_name_12 WHERE release_date = "1935-07-13"
sql_create_context
CREATE TABLE table_203_715 ( id number, "year" number, "competition" text, "venue" text, "position" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the number of world championships ?
SELECT COUNT(*) FROM table_203_715 WHERE "competition" = 'world championships'
squall
CREATE TABLE table_train_8 ( "id" int, "white_blood_cell_count_wbc" int, "systolic_blood_pressure_sbp" int, "active_infection" bool, "intention_to_arterial_catheter" bool, "temperature" float, "intention_to_central_venous_catheter" bool, "sepsis" bool, "heart_rate" int, "paco2" f...
SELECT * FROM table_train_8 WHERE intention_to_arterial_catheter = 1
criteria2sql
CREATE TABLE hz_info ( KH text, KLX number, YLJGDM text, RYBH text ) 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, ...
SELECT COUNT(*) FROM zyjzjlb WHERE YLJGDM = '2057773' AND RYDJSJ > '2007-03-15'
css
CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedA...
SELECT * FROM Posts AS p WHERE p.Tags LIKE '%docker%' AND (NOT p.ClosedDate IS NULL) AND p.PostTypeId = 2
sede
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 WHERE demographic.admission_type = "URGENT" AND demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE"
mimicsql_data
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE job_history ( EMPLO...
SELECT HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY SUM(EMPLOYEE_ID)
nvbench
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 ...
SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN person_info_hz_info ON person_info.RYBH = person_info_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 ...
css
CREATE TABLE office_locations ( building_id number, company_id number, move_in_year number ) CREATE TABLE buildings ( id number, name text, city text, height number, stories number, status text ) CREATE TABLE companies ( id number, name text, headquarters text, indu...
SELECT industry FROM companies GROUP BY industry ORDER BY COUNT(*) DESC
spider
CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE ...
SELECT patients.gender FROM patients WHERE patients.subject_id = 15760
mimic_iii
CREATE TABLE Students_in_Detention ( student_id INTEGER, detention_id INTEGER, incident_id INTEGER ) CREATE TABLE Assessment_Notes ( notes_id INTEGER, student_id INTEGER, teacher_id INTEGER, date_of_notes DATETIME, text_of_notes VARCHAR(255), other_details VARCHAR(255) ) CREATE TAB...
SELECT date_address_to, COUNT(date_address_to) FROM Student_Addresses GROUP BY other_details, date_address_to ORDER BY monthly_rental DESC
nvbench
CREATE TABLE table_18927 ( "Date" text, "Winning Team" text, "Score" text, "Winning Pitcher" text, "Losing Pitcher" text, "Attendance" real, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the wenning witcher when ezequiel ...
SELECT "Winning Pitcher" FROM table_18927 WHERE "Losing Pitcher" = 'Ezequiel Astacio'
wikisql
CREATE TABLE table_1217448_1 ( estimated_value VARCHAR, cover_date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's the estimated value where cover date is august 1962
SELECT estimated_value FROM table_1217448_1 WHERE cover_date = "August 1962"
sql_create_context
CREATE TABLE table_38366 ( "State" text, "Revenue (millions)" text, "Population" real, "Revenue per capita" text, "Spending (millions)" text, "Spending per capita" text, "Net contribution per capita" text ) -- Using valid SQLite, answer the following questions for the tables provided above...
SELECT "Revenue per capita" FROM table_38366 WHERE "State" = 'vermont'
wikisql
CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25...
SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY SUM(MANAGER_ID) DESC
nvbench
CREATE TABLE table_33744 ( "Name" text, "Round" text, "Overall Pick" text, "Year" real, "Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What year was Jordan Hill picked overall number 8?
SELECT MIN("Year") FROM table_33744 WHERE "Overall Pick" = '8' AND "Name" = 'jordan hill'
wikisql
CREATE TABLE table_58823 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( $ )" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What score has 3 as the place?
SELECT "Score" FROM table_58823 WHERE "Place" = '3'
wikisql
CREATE TABLE table_name_98 ( pick__number INTEGER, college VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest Pick #, when College is 'Jackson State'?
SELECT MIN(pick__number) FROM table_name_98 WHERE college = "jackson state"
sql_create_context
CREATE TABLE resultsdata15 ( sample_pk number, commod text, commtype text, lab text, pestcode text, testclass text, concen number, lod number, conunit text, confmethod text, confmethod2 text, annotate text, quantitate text, mean text, extract text, determi...
SELECT lab FROM resultsdata15 GROUP BY lab ORDER BY COUNT(*) DESC LIMIT 1
pesticide
CREATE TABLE table_name_12 ( chassis VARCHAR, engine VARCHAR, finish VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the chassis for offy engine and 25th finish?
SELECT chassis FROM table_name_12 WHERE engine = "offy" AND finish = "25th"
sql_create_context
CREATE TABLE tracklists ( albumid number, position number, songid number ) CREATE TABLE band ( id number, firstname text, lastname text ) CREATE TABLE albums ( aid number, title text, year number, label text, type text ) CREATE TABLE performance ( songid number, ba...
SELECT T4.instrument FROM performance AS T1 JOIN band AS T2 ON T1.bandmate = T2.id JOIN songs AS T3 ON T3.songid = T1.songid JOIN instruments AS T4 ON T4.songid = T3.songid AND T4.bandmateid = T2.id WHERE T2.lastname = "Heilo" AND T3.title = "Badlands"
spider
CREATE TABLE table_15780049_6 ( score VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the games score on January 11?
SELECT score FROM table_15780049_6 WHERE date = "January 11"
sql_create_context
CREATE TABLE table_77802 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the high lap total for pedro diniz?
SELECT MAX("Laps") FROM table_77802 WHERE "Driver" = 'pedro diniz'
wikisql
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 OUT_DIAG_DIS_CD, OUT_DIAG_DIS_NM FROM t_kc21 WHERE PERSON_ID = '46318635' AND MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc24 WHERE MED_AMOUT > 2893.35)
css
CREATE TABLE table_68871 ( "BR/SR No." text, "SR Name" text, "LSWR No." real, "Builder" text, "Built" real, "To IoW" real, "Withdrawn" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the number of the year withdrawn for a LSWR number ...
SELECT COUNT("Withdrawn") FROM table_68871 WHERE "LSWR No." > '210' AND "To IoW" = '1923'
wikisql
CREATE TABLE table_28005160_2 ( city VARCHAR, country VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What cities are in sweden on this list?
SELECT city FROM table_28005160_2 WHERE country = "Sweden"
sql_create_context
CREATE TABLE table_37080 ( "Date" text, "Tournament" text, "Winning score" text, "Margin of victory" text, "Runner(s) up" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the margin of victory for PGA Championship?
SELECT "Margin of victory" FROM table_37080 WHERE "Tournament" = 'pga championship'
wikisql
CREATE TABLE results ( resultId INTEGER, raceId INTEGER, driverId INTEGER, constructorId INTEGER, number INTEGER, grid INTEGER, position TEXT, positionText TEXT, positionOrder INTEGER, points REAL, laps TEXT, time TEXT, milliseconds TEXT, fastestLap TEXT, rank...
SELECT location, circuitId FROM circuits WHERE country = "France" OR country = "Belgium" ORDER BY location
nvbench
CREATE TABLE table_34613 ( "Title" text, "Season" text, "Winner" text, "Score" text, "Runner-up" text, "Venue" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the winner in the game that had Teikyo as the runner-up?...
SELECT "Winner" FROM table_34613 WHERE "Runner-up" = 'teikyo'
wikisql
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, war...
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age B...
mimic_iii
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_Road, AVG(School_ID) FROM basketball_match GROUP BY ACC_Road ORDER BY ACC_Road DESC
nvbench
CREATE TABLE table_46746 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Place of the Player with a To par of +2 and a Score of 70-72-73=215?
SELECT "Place" FROM table_46746 WHERE "To par" = '+2' AND "Score" = '70-72-73=215'
wikisql
CREATE TABLE table_name_94 ( decile INTEGER, roll VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the most decile for roll of 428
SELECT MAX(decile) FROM table_name_94 WHERE roll = 428
sql_create_context
CREATE TABLE table_68147 ( "Championship" text, "Champion(s)" text, "Previous champion(s)" text, "Date Won" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When did Bonecrusher win the championship at Bayam n, Puerto Rico?
SELECT "Date Won" FROM table_68147 WHERE "Location" = 'bayamón, puerto rico' AND "Champion(s)" = 'bonecrusher'
wikisql
CREATE TABLE table_727 ( "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. -- How many districts does Ed Jones represent?
SELECT COUNT("District") FROM table_727 WHERE "Incumbent" = 'Ed Jones'
wikisql
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM hz_info JOIN wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGD...
css
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 All_Games, Team_ID FROM basketball_match
nvbench
CREATE TABLE table_15759 ( "Date" text, "Opponent" text, "Venue" text, "Result" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Date has a Result of 0 0?
SELECT "Date" FROM table_15759 WHERE "Result" = '0–0'
wikisql