instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_19149550_9 ( total_asian_population INTEGER, chinese_population VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many Asians live in the borough with 8109 Chinese population?
SELECT MIN(total_asian_population) FROM table_19149550_9 WHERE chinese_population = 8109
sql_create_context
CREATE TABLE table_name_48 ( total INTEGER, country VARCHAR, to_par VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the Total of australia and a To par smaller than 7?
SELECT MIN(total) FROM table_name_48 WHERE country = "australia" AND to_par < 7
sql_create_context
CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, ...
SELECT question.Id AS "post_link", question.Title AS "question_title", answer.Id AS "answer_link", question.Score AS "question_score", answer.Body, question.Tags FROM Posts AS question INNER JOIN Posts AS answer ON question.Id = answer.ParentId AND question.AcceptedAnswerId = answer.Id AND question.Tags LIKE '%##TagNam...
sede
CREATE TABLE table_1805191_6 ( first_elected VARCHAR, incumbent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many people were first elected with an incument of diane watson?
SELECT COUNT(first_elected) FROM table_1805191_6 WHERE incumbent = "Diane Watson"
sql_create_context
CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_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 ti...
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures ...
mimic_iii
CREATE TABLE table_204_836 ( id number, "#" number, "date" text, "opponent" text, "score" text, "result" text, "competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which team did this person play against after portugal in 1989 ?
SELECT "opponent" FROM table_204_836 WHERE "#" = (SELECT "#" FROM table_204_836 WHERE "opponent" = 'portugal' AND "date" = 1989) + 1
squall
CREATE TABLE table_14249 ( "Elector" text, "Place of birth" text, "Cardinalatial title" text, "Elevated" text, "Elevator" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is listed for the Elevator that has the Elector of Gerardo?
SELECT "Elevator" FROM table_14249 WHERE "Elector" = 'gerardo'
wikisql
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title ...
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 table_204_585 ( id number, "year" text, "player" text, "high school" text, "college" text, "nba/aba draft" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who won an award before ed schienbein in 1940 ?
SELECT "player" FROM table_204_585 WHERE "year" < 1940
squall
CREATE TABLE table_77709 ( "Name" text, "Bodyweight" real, "Snatch" real, "Clean & jerk" real, "Total (kg)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the total number of snatches for clean and jerk more than 132.5 when the total kg was ...
SELECT COUNT("Snatch") FROM table_77709 WHERE "Clean & jerk" > '132.5' AND "Total (kg)" = '315' AND "Bodyweight" = '68.63'
wikisql
CREATE TABLE table_name_90 ( position VARCHAR, birthdate VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Position player was born June 30, 1981?
SELECT position FROM table_name_90 WHERE birthdate = "june 30, 1981"
sql_create_context
CREATE TABLE table_23399481_2 ( directed_by VARCHAR, us_viewers__in_millions_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If the amount of U.S. viewers is 2.14 million, who was the episode directed by?
SELECT directed_by FROM table_23399481_2 WHERE us_viewers__in_millions_ = "2.14"
sql_create_context
CREATE TABLE table_44935 ( "Game" real, "Date" text, "Team" text, "Score" 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 Score, when Game is '1...
SELECT "Score" FROM table_44935 WHERE "Game" = '19'
wikisql
CREATE TABLE table_204_314 ( id number, "pos" number, "team" text, "played" number, "won" number, "draw" number, "lost" number, "goals for" number, "goals against" number, "goal difference" number, "points" number, "notes" text ) -- Using valid SQLite, answer the follow...
SELECT MAX("won") - MAX("lost") FROM table_204_314
squall
CREATE TABLE table_50323 ( "Season" text, "North" text, "South" text, "East" text, "West" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the east with ev landsberg as the west?
SELECT "East" FROM table_50323 WHERE "West" = 'ev landsberg'
wikisql
CREATE TABLE table_23680576_2 ( oct_2008 VARCHAR, aug_2008 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many polling percentages were there in October 2008 when is was 30.8% in Aug 2008?
SELECT COUNT(oct_2008) FROM table_23680576_2 WHERE aug_2008 = "30.8%"
sql_create_context
CREATE TABLE table_25092 ( "Year" real, "Network" text, "Race caller" text, "s Host" text, "s Analyst" text, "Reporters" text, "Trophy presentation" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the total number for race caller for bob...
SELECT COUNT("Race caller") FROM table_25092 WHERE "Trophy presentation" = 'Bob Costas and Charlsie Cantey'
wikisql
CREATE TABLE customer ( acc_bal INTEGER, state VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find the total account balance of each customer from Utah or Texas.
SELECT SUM(acc_bal) FROM customer WHERE state = 'Utah' OR state = 'Texas'
sql_create_context
CREATE TABLE t_kc21 ( MED_CLINIC_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, COMP_ID text, PERSON_ID text, PERSON_NM text, IDENTITY_CARD text, SOC_SRT_CARD text, PERSON_SEX number, PERSON_AGE number, IN_HOSP_DATE time, OUT_HOSP_DATE time, DIFF_PLACE_FLG numb...
SELECT t_kc21.MED_ORG_DEPT_NM, AVG(t_kc24.OVE_PAY / t_kc24.MED_AMOUT) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '0109582' GROUP BY t_kc21.MED_ORG_DEPT_NM
css
CREATE TABLE table_203_219 ( id number, "no" number, "name" text, "date of birth" text, "height" text, "weight" text, "spike" text, "block" text, "2008 club" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- oliveira walewska has the sa...
SELECT COUNT("name") FROM table_203_219 WHERE "name" <> 'oliveira walewska' AND "block" = (SELECT "block" FROM table_203_219 WHERE "name" = 'oliveira walewska')
squall
CREATE TABLE table_57692 ( "Team" text, "Constructor" text, "Chassis" text, "Engine \u2020" text, "Tyre" text, "Driver" text, "Rounds" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Jean Alesi, drives the Acer 01A engine for which team?
SELECT "Team" FROM table_57692 WHERE "Driver" = 'jean alesi' AND "Engine \u2020" = 'acer 01a'
wikisql
CREATE TABLE table_27755603_11 ( team VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What team did they play on april 6?
SELECT team FROM table_27755603_11 WHERE date = "April 6"
sql_create_context
CREATE TABLE film ( Film_ID int, Title text, Studio text, Director text, Gross_in_dollar int ) CREATE TABLE film_market_estimation ( Estimation_ID int, Low_Estimate real, High_Estimate real, Film_ID int, Type text, Market_ID int, Year int ) CREATE TABLE market ( Mar...
SELECT Low_Estimate, High_Estimate FROM film_market_estimation
nvbench
CREATE TABLE table_203_592 ( id number, "institution" text, "location" text, "athletic nickname" text, "undergraduate enrollment" number, "graduate enrollment" number, "total enrollment" number, "2013 endowment\n(and us rank)" text, "academic staff" number, "motto" text ) -- Us...
SELECT "graduate enrollment" FROM table_203_592 WHERE "institution" = 'yale university'
squall
CREATE TABLE table_name_38 ( loss VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who lost the game on May 28?
SELECT loss FROM table_name_38 WHERE date = "may 28"
sql_create_context
CREATE TABLE guests ( guest_id number, gender_code text, guest_first_name text, guest_last_name text, date_of_birth time ) CREATE TABLE apartment_facilities ( apt_id number, facility_code text ) CREATE TABLE apartments ( apt_id number, building_id number, apt_type_code text, ...
SELECT booking_status_code, COUNT(*) FROM apartment_bookings GROUP BY booking_status_code
spider
CREATE TABLE table_27455867_1 ( callback_audition_date VARCHAR, episode_air_date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was the callback audition date for the audition city from the episode aired on February 2, 2011?
SELECT callback_audition_date FROM table_27455867_1 WHERE episode_air_date = "February 2, 2011"
sql_create_context
CREATE TABLE table_43597 ( "Name" text, "Hanzi" text, "Hanyu Pinyin" text, "Population (2004 est.)" text, "Area (km\u00b2)" text, "Density (/km\u00b2)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 2004 population for ?
SELECT "Population (2004 est.)" FROM table_43597 WHERE "Hanzi" = '山海关区'
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 wdmzjzjlb.KH, wdmzjzjlb.KLX FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '67510438967' UNION SELECT bdmzjzjlb.KH, bdmzjzjlb.KLX FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '67510438967'
css
CREATE TABLE table_name_98 ( gold INTEGER, total VARCHAR, silver VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the lowest gold with a total over 15 and less than 16 silver?
SELECT MIN(gold) FROM table_name_98 WHERE total > 15 AND silver < 16
sql_create_context
CREATE TABLE table_68375 ( "2005" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who attended the school in 2006, that Jasmine Wilson attended in 2005?
SELECT "2006" FROM table_68375 WHERE "2005" = 'jasmine wilson'
wikisql
CREATE TABLE table_1952065_4 ( afc_titles INTEGER, super_bowl_wins VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many afc titles were there when there were 2 super bowl wins?
SELECT MAX(afc_titles) FROM table_1952065_4 WHERE super_bowl_wins = 2
sql_create_context
CREATE TABLE table_name_22 ( game VARCHAR, home_team VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Game has a Home Team of san francisco, and a Date of april 22?
SELECT game FROM table_name_22 WHERE home_team = "san francisco" AND date = "april 22"
sql_create_context
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE d_labitems ( row_id number...
SELECT COUNT(*) > 0 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8569) AND STRFTIME('%y', procedures_icd.charttime) >= '2105'
mimic_iii
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 t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_NM = '蒋蕴藉' AND t_kc22.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT > 8634.98)
css
CREATE TABLE PROFESSOR ( EMP_NUM int, DEPT_CODE varchar(10), PROF_OFFICE varchar(50), PROF_EXTENSION varchar(4), PROF_HIGH_DEGREE varchar(5) ) CREATE TABLE DEPARTMENT ( DEPT_CODE varchar(10), DEPT_NAME varchar(30), SCHOOL_CODE varchar(8), EMP_NUM int, DEPT_ADDRESS varchar(20), ...
SELECT EMP_FNAME, COUNT(EMP_FNAME) FROM CLASS AS T1 JOIN EMPLOYEE AS T2 ON T1.PROF_NUM = T2.EMP_NUM JOIN COURSE AS T3 ON T1.CRS_CODE = T3.CRS_CODE JOIN PROFESSOR AS T4 ON T2.EMP_NUM = T4.EMP_NUM GROUP BY CRS_DESCRIPTION, EMP_FNAME
nvbench
CREATE TABLE table_19751479_4 ( rnd INTEGER, fastest_lap VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the first round that had #67 the racer's group with the fastest lap?
SELECT MIN(rnd) FROM table_19751479_4 WHERE fastest_lap = "#67 The Racer's Group"
sql_create_context
CREATE TABLE table_3403 ( "County" text, "Town/City" text, "Milepost" text, "Station" text, "Connections" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many counties are at milepost 69.5?
SELECT COUNT("County") FROM table_3403 WHERE "Milepost" = '69.5'
wikisql
CREATE TABLE table_14812 ( "Office" text, "Representative" text, "Party" text, "Residence" text, "First Elected" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Party has a Representative of brian bosma?
SELECT "Party" FROM table_14812 WHERE "Representative" = 'brian bosma'
wikisql
CREATE TABLE table_46717 ( "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. -- Who ha...
SELECT "High rebounds" FROM table_46717 WHERE "High assists" = 'jason kidd (8)' AND "Score" = 'w 105–95 (ot)'
wikisql
CREATE TABLE table_11759 ( "Code" real, "Type" text, "Name" text, "Regional County Municipality" text, "Region" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name for the regional county municipality of d'autray and a code less than 520...
SELECT "Name" FROM table_11759 WHERE "Regional County Municipality" = 'd''autray' AND "Code" < '52017'
wikisql
CREATE TABLE table_62907 ( "Rank" real, "Actor" text, "Character" text, "Soap Opera" text, "Years" text, "Duration" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the years for Eileen Derbyshire with a duration of 52 years?
SELECT "Years" FROM table_62907 WHERE "Duration" = '52 years' AND "Actor" = 'eileen derbyshire'
wikisql
CREATE TABLE table_51270 ( "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. -- How many people attended when the away team was ...
SELECT SUM("Crowd") FROM table_51270 WHERE "Away team" = 'richmond'
wikisql
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) -- Using valid SQLite, answer the following questions for the...
SELECT T2.Headquarter, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Headquarter
nvbench
CREATE TABLE table_3498 ( "Institution" text, "Location" text, "Founded" real, "Type" text, "Enrollment" text, "Nickname" text, "Joined" text, "Left" text, "Football Conference" text, "Primary Conference" text ) -- Using valid SQLite, answer the following questions for the tabl...
SELECT "Football Conference" FROM table_3498 WHERE "Location" = 'Henniker, New Hampshire'
wikisql
CREATE TABLE table_52605 ( "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. -- When was p...
SELECT "Date" FROM table_52605 WHERE "Winning driver" = 'pedro rodríguez'
wikisql
CREATE TABLE table_21716139_1 ( category VARCHAR, train_no VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the category for trains numbered 16609/16610?
SELECT category FROM table_21716139_1 WHERE train_no = "16609/16610"
sql_create_context
CREATE TABLE player ( Player_ID int, name text, Position text, Club_ID int, Apps real, Tries real, Goals text, Points real ) CREATE TABLE competition ( Competition_ID int, Year real, Competition_type text, Country text ) CREATE TABLE club ( Club_ID int, name tex...
SELECT Position, COUNT(*) FROM player WHERE Points < 30 GROUP BY Position
nvbench
CREATE TABLE zyjzjlb_jybgb ( YLJGDM_ZYJZJLB text, BGDH number, YLJGDM 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 n...
SELECT COUNT(*) FROM zyjzjlb WHERE zyjzjlb.YLJGDM = '6403042' AND zyjzjlb.RYDJSJ BETWEEN '2012-03-10' AND '2019-08-21' AND DATEDIFF(zyjzjlb.CYSJ, zyjzjlb.RYSJ) > 20
css
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 demographic.insurance, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "9271"
mimicsql_data
CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, maximum_stay int, application text, no_discounts text ) CREATE TABLE aircraft ( aircraft_code varchar, aircraft_description varchar, manufac...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'INDIANAPOLIS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'M...
atis
CREATE TABLE table_27303975_2 ( studio VARCHAR, catalog_number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the studio for catalog number 81063
SELECT studio FROM table_27303975_2 WHERE catalog_number = "81063"
sql_create_context
CREATE TABLE table_34484 ( "Round" real, "Player" text, "Position" text, "Nationality" text, "College/Junior/Club Team (League)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Nationality has a Position of left wing?
SELECT "Nationality" FROM table_34484 WHERE "Position" = 'left wing'
wikisql
CREATE TABLE table_30121082_1 ( area__acres__ VARCHAR, townland VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the areas (in acres) of the Kilnahera East townland?
SELECT area__acres__ FROM table_30121082_1 WHERE townland = "Kilnahera East"
sql_create_context
CREATE TABLE table_65224 ( "Model number" text, "sSpec number" text, "Cores" text, "Frequency" text, "Turbo" text, "L2 cache" text, "L3 cache" text, "GPU model" text, "GPU frequency" text, "Socket" text, "I/O bus" text, "Release date" text, "Part number(s)" text, ...
SELECT "L3 cache" FROM table_65224 WHERE "I/O bus" = 'standard power'
wikisql
CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId nu...
SELECT Id, PostTypeId, CreationDate FROM Posts WHERE CreationDate >= '2015-04-26' AND CreationDate <= '2015-05-02' AND OwnerUserId = 7586 AND PostTypeId = 2
sede
CREATE TABLE table_42859 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "Location Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the High rebounds of a ...
SELECT "High rebounds" FROM table_42859 WHERE "Game" = '56'
wikisql
CREATE TABLE table_name_28 ( venue VARCHAR, away_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where was the game when Geelong was the away team?
SELECT venue FROM table_name_28 WHERE away_team = "geelong"
sql_create_context
CREATE TABLE table_3578 ( "Title and source" text, "Developer" text, "Publisher" text, "First released" text, "Japan" text, "Europe" text, "North America" text, "Exclusive" text, "Move-only" text ) -- Using valid SQLite, answer the following questions for the tables provided above....
SELECT "Move-only" FROM table_3578 WHERE "Developer" = 'AiLive'
wikisql
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE procedures_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...
SELECT patients.gender FROM patients WHERE patients.subject_id = 12917
mimic_iii
CREATE TABLE table_1140099_6 ( circuit VARCHAR, race_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What circuit has a race called ii cape south easter trophy.
SELECT circuit FROM table_1140099_6 WHERE race_name = "II Cape South Easter Trophy"
sql_create_context
CREATE TABLE table_204_686 ( id number, "date" text, "pos." text, "name" text, "from" text, "fee" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- aaron hughes and steven davis both transferred from what team ?
SELECT "from" FROM table_204_686 WHERE "name" = 'aaron hughes'
squall
CREATE TABLE table_name_63 ( year VARCHAR, crew VARCHAR, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which year's crew is varsity 8+ when the record is 7-3?
SELECT year FROM table_name_63 WHERE crew = "varsity 8+" AND record = "7-3"
sql_create_context
CREATE TABLE table_36723 ( "Tournament" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 2012 that has tournament played as the tourname...
SELECT "2012" FROM table_36723 WHERE "Tournament" = 'tournament played'
wikisql
CREATE TABLE table_72098 ( "Year" real, "Division" text, "League" text, "Regular Season" text, "Playoffs" text, "U.S. Open Cup" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which round is u.s. open cup division semifinals
SELECT "U.S. Open Cup" FROM table_72098 WHERE "Playoffs" = 'Division Semifinals'
wikisql
CREATE TABLE table_28654 ( "Year (Ceremony)" text, "Film title" text, "Main Language(s)" text, "Director" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In the year (ceremony) 2009 (82nd), who are all the directors?
SELECT "Director" FROM table_28654 WHERE "Year (Ceremony)" = '2009 (82nd)'
wikisql
CREATE TABLE table_204_700 ( id number, "name" text, "developer" text, "release" text, "type" text, "game flow" text, "setting" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who was the developer of castle of heroes ?
SELECT "developer" FROM table_204_700 WHERE "name" = 'castle of heroes'
squall
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 WHERE demographic.diagnosis = "S/P FALL" AND demographic.dod_year <= "2115.0"
mimicsql_data
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 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 = '58152656' AND NOT mzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ <= '2017-04-13')
css
CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) ...
SELECT Id AS "post_link", AnswerCount AS "number_of_answers", Score AS Tags FROM Posts ORDER BY AnswerCount DESC LIMIT 100
sede
CREATE TABLE table_6284 ( "Rank" text, "Institution" text, "Gold" real, "Silver" real, "Bronze" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the fewest number of silvers for teams with more than 21 gold and more than 4 bronze?
SELECT MIN("Silver") FROM table_6284 WHERE "Bronze" > '4' AND "Gold" > '21'
wikisql
CREATE TABLE table_name_15 ( language VARCHAR, draw VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which language has 3 draws?
SELECT language FROM table_name_15 WHERE draw = 3
sql_create_context
CREATE TABLE table_name_85 ( money___ INTEGER, to_par VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the average payout of toney penna with a +2 par?
SELECT AVG(money___) AS $__ FROM table_name_85 WHERE to_par = "+2" AND player = "toney penna"
sql_create_context
CREATE TABLE table_name_96 ( year VARCHAR, college VARCHAR, pick VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Year has a College of nebraska, and a Pick of 2?
SELECT year FROM table_name_96 WHERE college = "nebraska" AND pick = "2"
sql_create_context
CREATE TABLE table_name_73 ( number_of_households VARCHAR, median_family_income VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Number of households have a Median family income of $58,491?
SELECT number_of_households FROM table_name_73 WHERE median_family_income = "$58,491"
sql_create_context
CREATE TABLE climber ( Name VARCHAR, Country VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- List the names of climbers whose country is not Switzerland.
SELECT Name FROM climber WHERE Country <> "Switzerland"
sql_create_context
CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text ) CREATE TABLE university ( Scho...
SELECT All_Home, Team_ID FROM basketball_match GROUP BY ACC_Road, All_Home ORDER BY Team_ID DESC
nvbench
CREATE TABLE room ( roomnumber number, roomtype text, blockfloor number, blockcode number, unavailable boolean ) CREATE TABLE procedures ( code number, name text, cost number ) CREATE TABLE block ( blockfloor number, blockcode number ) CREATE TABLE trained_in ( physician n...
SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.employeeid = T2.physician JOIN department AS T3 ON T2.department = T3.departmentid WHERE T3.name = 'Surgery' OR T3.name = 'Psychiatry'
spider
CREATE TABLE table_49185 ( "Date" text, "Number" text, "Type" text, "Captain" text, "Casualties" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average number of casualties for the convoy with a number of U-844?
SELECT AVG("Casualties") FROM table_49185 WHERE "Number" = 'u-844'
wikisql
CREATE TABLE table_1940144_1 ( county VARCHAR, population_2011 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what counties is the 2011 population 17908?
SELECT county FROM table_1940144_1 WHERE population_2011 = 17908
sql_create_context
CREATE TABLE table_4110 ( "Player" text, "County" text, "Balls" real, "Wickets" real, "Average" text, "Economy" text, "BBI" text, "4wi" real, "5wi" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- if the bbi is 4/39 what is the average...
SELECT "Average" FROM table_4110 WHERE "BBI" = '4/39'
wikisql
CREATE TABLE acceptance ( submission_id number, workshop_id number, result text ) CREATE TABLE workshop ( workshop_id number, date text, venue text, name text ) CREATE TABLE submission ( submission_id number, scores number, author text, college text ) -- Using valid SQLit...
SELECT college FROM submission WHERE scores > 90 INTERSECT SELECT college FROM submission WHERE scores < 80
spider
CREATE TABLE table_203_221 ( id number, "name" text, "nationality" text, "matches played" number, "goals scored" number, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- total amount of goals scored by chris tadrosse ?
SELECT "goals scored" FROM table_203_221 WHERE "name" = 'chris tadrosse'
squall
CREATE TABLE table_17390 ( "Series #" real, "Season #" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the number of titles written by adam i. lapidus
SELECT COUNT("Title") FROM table_17390 WHERE "Written by" = 'Adam I. Lapidus'
wikisql
CREATE TABLE table_name_23 ( d_40_√ VARCHAR, d_43_√ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the D 40 when D 43 is d 14?
SELECT d_40_√ FROM table_name_23 WHERE d_43_√ = "d 14"
sql_create_context
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 * FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.RYBH = '14234507' AND hz_info.YLJGDM = '6215327' AND NOT zyjzjlb.CYKSMC LIKE '%心血管%'
css
CREATE TABLE table_66993 ( "Date" text, "Home captain" text, "Away captain" text, "Venue" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which home captian has aus by 295 runs as the result?
SELECT "Home captain" FROM table_66993 WHERE "Result" = 'aus by 295 runs'
wikisql
CREATE TABLE member ( member_id number, name text, membership_card text, age number, time_of_purchase number, level_of_membership number, address text ) CREATE TABLE happy_hour ( hh_id number, shop_id number, month text, num_of_shaff_in_charge number ) CREATE TABLE happy_ho...
SELECT address FROM shop ORDER BY open_year
spider
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Preterm NEC 1250-1499g" AND lab."CATEGORY" = "Hematology"
mimicsql_data
CREATE TABLE Flight ( flno VARCHAR, distance VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show the flight number of flights with three lowest distances.
SELECT flno FROM Flight ORDER BY distance LIMIT 3
sql_create_context
CREATE TABLE table_name_2 ( county VARCHAR, chinese VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which County has a Chinese of ?
SELECT county FROM table_name_2 WHERE chinese = "新竹"
sql_create_context
CREATE TABLE table_58288 ( "NGC number" real, "Object type" text, "Constellation" text, "Right ascension ( J2000 )" text, "Declination ( J2000 )" text, "Apparent magnitude" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which object has an Appar...
SELECT "Object type" FROM table_58288 WHERE "Apparent magnitude" > '9.6' AND "Right ascension ( J2000 )" = '17h59m02.0s'
wikisql
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE chartevents ( row_id number, subject_id number, h...
SELECT MAX(outputevents.value) FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 2514)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'drai...
mimic_iii
CREATE TABLE table_35415 ( "Week" real, "Date" text, "Opponent" text, "Time ( ET )" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Week is on sunday november 28?
SELECT MIN("Week") FROM table_35415 WHERE "Date" = 'sunday november 28'
wikisql
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsysto...
SELECT SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t2.diagnosistime) > 2 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOI...
eicu
CREATE TABLE table_name_7 ( pick INTEGER, player VARCHAR, round VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many picks on average did Jay Bruchak have before round 6?
SELECT AVG(pick) FROM table_name_7 WHERE player = "jay bruchak" AND round < 6
sql_create_context
CREATE TABLE table_204_855 ( id number, "year" number, "date" text, "winner" text, "result" text, "loser" text, "attendance" number, "location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which team won the last game in 1989 ?
SELECT "winner" FROM table_204_855 WHERE "year" = 1989 ORDER BY "date" DESC LIMIT 1
squall
CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, ...
SELECT p.Id AS "post_link" FROM Posts AS p WHERE p.PostTypeId = 1 AND p.OwnerUserId IS NULL AND NOT p.AcceptedAnswerId IS NULL AND (SELECT p2.OwnerUserId FROM Posts AS p2 WHERE p2.Id = p.AcceptedAnswerId) IS NULL LIMIT 100
sede
CREATE TABLE table_20181270_3 ( landesliga_mitte VARCHAR, landesliga_süd VARCHAR, landesliga_nord VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the landesliga mitte for fc gundelfingen and vfl frohnlach
SELECT landesliga_mitte FROM table_20181270_3 WHERE landesliga_süd = "FC Gundelfingen" AND landesliga_nord = "VfL Frohnlach"
sql_create_context
CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), SALARY decimal(8,2), COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0), DEPARTMENT_ID decimal(...
SELECT HIRE_DATE, DEPARTMENT_ID FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%'
nvbench