instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_204_598 ( id number, "name" text, "state of residence" text, "took office" text, "left office" text, "president served under" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which senior advisor is after pete rouse ?
SELECT "name" FROM table_204_598 WHERE "took office" > (SELECT "took office" FROM table_204_598 WHERE "name" = 'pete rouse') ORDER BY "took office" LIMIT 1
squall
CREATE TABLE manufacturers ( name VARCHAR, revenue INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find the name of companies whose revenue is between 100 and 150.
SELECT name FROM manufacturers WHERE revenue BETWEEN 100 AND 150
sql_create_context
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, ...
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, 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 = admissi...
mimic_iii
CREATE TABLE table_76591 ( "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 i...
SELECT AVG("Game") FROM table_76591 WHERE "Date" = 'december 23'
wikisql
CREATE TABLE table_25852 ( "Mother Tongue" text, "Population (2006)" real, "Percentage (2006)" text, "Population (2011)" real, "Percentage (2011)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the minimum population in 2011?
SELECT MIN("Population (2011)") FROM table_25852
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 mzjzjlb.JZLSH FROM hz_info JOIN mzjzjlb JOIN hz_info_mzjzjlb ON hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzj...
css
CREATE TABLE table_14423 ( "Date" text, "Opponent" text, "City" text, "Result" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What team was the opponent when the score was 25-0?
SELECT "Opponent" FROM table_14423 WHERE "Score" = '25-0'
wikisql
CREATE TABLE table_204_529 ( id number, "year" number, "personnel" text, "album" text, "label" text, "peak positions\nnor" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how long was there between tarpan seasons and antologie ?
SELECT ABS((SELECT "year" FROM table_204_529 WHERE "album" = 'tarpan seasons') - (SELECT "year" FROM table_204_529 WHERE "album" = 'antologie'))
squall
CREATE TABLE table_1847 ( "No." text, "Summoned" text, "Elected" text, "Assembled" text, "Dissolved" text, "1st member" text, "2nd member" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When 1462/63 was the elected what was the no.?
SELECT "No." FROM table_1847 WHERE "Elected" = '1462/63'
wikisql
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.OUT_DIAG_DIS_CD, AVG(t_kc21.PERSON_AGE) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '4983304' GROUP BY t_kc21.OUT_DIAG_DIS_CD
css
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 d_icd_diagnoses ( row_id number, icd9_code text, ...
SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 73155 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) AND prescriptions.drug = 'insulin' ORDER BY prescriptions.startdate DESC LIMIT ...
mimic_iii
CREATE TABLE bdmzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH number, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZ...
SELECT jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE wdmzjzjlb.JZZDSM = '结膜炎' AND jyjgzbb.JCZBMC = '尿素' UNION SELECT jyjgzbb.CKZFWXX, jyjgz...
css
CREATE TABLE hz_info ( KH text, KLX number, YLJGDM text, RYBH text ) CREATE TABLE mzjzjlb ( YLJGDM text, JZLSH text, KH text, KLX number, MJZH text, HZXM text, NLS number, NLY number, ZSEBZ number, JZZTDM number, JZZTMC text, JZJSSJ time, TXBZ number,...
SELECT (SELECT COUNT(*) FROM person_info JOIN hz_info JOIN mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE person_info.XM = '魏冠宇' AND mzjzjlb.JZKSRQ BETWEEN '2009-09-02' AND '2018-12-28') + (SELECT COUNT(*) FROM person_info J...
css
CREATE TABLE table_7346 ( "Name" text, "Years" text, "League a" text, "FA Cup" text, "League Cup" text, "Other b" text, "Total" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the League Cup for 1947 1958?
SELECT "League Cup" FROM table_7346 WHERE "Years" = '1947–1958'
wikisql
CREATE TABLE table_48661 ( "Province" text, "Region" text, "Capital" text, "Districts" real, "UBIGEO" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What province in Tumbes has less than 11 districts and a UBIGEO of 2401?
SELECT "Province" FROM table_48661 WHERE "Districts" < '11' AND "Region" = 'tumbes' AND "UBIGEO" = '2401'
wikisql
CREATE TABLE table_14739 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What score has won as the result on the date of December 14, 2004?
SELECT "Score" FROM table_14739 WHERE "Result" = 'won' AND "Date" = 'december 14, 2004'
wikisql
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) 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...
SELECT EMPLOYEE_ID, COMMISSION_PCT FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history)
nvbench
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time...
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', treatment.treatmenttime)) FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '017-88691...
eicu
CREATE TABLE table_name_63 ( rank INTEGER, director VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest Rank, when Director is 'Henry Hathaway'?
SELECT MAX(rank) FROM table_name_63 WHERE director = "henry hathaway"
sql_create_context
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 text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "ABDOMINAL PAIN" AND demographic.age < "68"
mimicsql_data
CREATE TABLE table_10684 ( "Date" text, "Tournament" text, "Surface" text, "Opponent" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the opponent when the score was 6 4, 6 7 (2 7) , 7 5?
SELECT "Opponent" FROM table_10684 WHERE "Score" = '6–4, 6–7 (2–7) , 7–5'
wikisql
CREATE TABLE table_name_5 ( erp_w INTEGER, call_sign VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of the erp w of the k222al call sign?
SELECT SUM(erp_w) FROM table_name_5 WHERE call_sign = "k222al"
sql_create_context
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 VoteTypes ( Id number, Name text ) CREATE TABLE Po...
SELECT p.Id AS "post_link", 'site://posts/' + CAST(p.Id AS TEXT) + '/edit|' + 'Edit' AS "edit_link", p.OwnerUserId AS "user_link", p.CreationDate FROM Posts AS p, PostHistory AS ph WHERE ph.PostId = p.Id AND ph.PostHistoryTypeId IN (2, 5, 8) AND NOT EXISTS(SELECT * FROM PostHistory AS phtwo WHERE phtwo.PostId = p.Id AN...
sede
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 INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE procedures.long_title = "Intraoperative cardiac pacemaker" AND lab."CATEGORY" = "Chemistry"
mimicsql_data
CREATE TABLE table_204_681 ( id number, "2011 rank" number, "2010 rank" number, "2009 rank" number, "2008 rank" number, "2007 rank" number, "company (country)" text, "2011 arms sales (us$ m.)" number, "2010 arms sales (us$ m.)" number, "2009 arms sales (us$ m.)" number, "2008...
SELECT "company (country)" FROM table_204_681 WHERE "arms sales as share of company's total sales (%)," < 10
squall
CREATE TABLE table_14735 ( "Position" real, "Club" text, "Played" real, "Points" text, "Wins" real, "Draws" real, "Losses" real, "Goals for" real, "Goals against" real, "Goal Difference" real ) -- Using valid SQLite, answer the following questions for the tables provided above....
SELECT MAX("Goal Difference") FROM table_14735 WHERE "Points" = '33-5' AND "Wins" < '12'
wikisql
CREATE TABLE table_21991074_3 ( lost INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the least lost
SELECT MIN(lost) FROM table_21991074_3
sql_create_context
CREATE TABLE table_name_91 ( goals INTEGER, minutes VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the highest number of goals when 2428 minutes were played?
SELECT MAX(goals) FROM table_name_91 WHERE minutes = 2428
sql_create_context
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.insurance = "Self Pay" AND lab.label = "C-Reactive Protein"
mimicsql_data
CREATE TABLE Elimination ( Elimination_ID text, Wrestler_ID text, Team text, Eliminated_By text, Elimination_Move text, Time text ) CREATE TABLE wrestler ( Wrestler_ID int, Name text, Reign text, Days_held text, Location text, Event text ) -- Using valid SQLite, answer...
SELECT Team, COUNT(Team) FROM Elimination GROUP BY Team
nvbench
CREATE TABLE table_21792 ( "Rank" real, "Country" text, "Miss United Continent" real, "Virreina" real, "1st RU" real, "2nd RU" real, "3rd RU" real, "4th RU" real, "Semifinalists" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided ...
SELECT MIN("Miss United Continent") FROM table_21792
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 chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, v...
SELECT admissions.insurance FROM admissions WHERE admissions.subject_id = 18726 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1
mimic_iii
CREATE TABLE table_70053 ( "County" text, "Live births 2006" real, "GFR 2006" real, "TFR 2006" real, "Whites as % of Pop." text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest total GFR that has 95.80% of the population as Whites, and a...
SELECT MIN("GFR 2006") FROM table_70053 WHERE "Whites as % of Pop." = '95.80%' AND "TFR 2006" > '2.14'
wikisql
CREATE TABLE table_20233 ( "Date" text, "Cover model" text, "Centerfold model" text, "Interview subject" text, "20 Questions" text, "Pictorials" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was asked 20 questions in the issue where the cov...
SELECT "20 Questions" FROM table_20233 WHERE "Cover model" = 'Linda Brava'
wikisql
CREATE TABLE table_name_34 ( record VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the record for october 11
SELECT record FROM table_name_34 WHERE date = "october 11"
sql_create_context
CREATE TABLE table_train_256 ( "id" int, "mini_mental_state_examination_mmse" int, "language" string, "mild_cognitive_impairment" bool, "moca_score" int, "dementia" bool, "body_mass_index_bmi" float, "age" float, "NOUSE" float ) -- Using valid SQLite, answer the following questions...
SELECT * FROM table_train_256 WHERE language = 'english' OR language = 'spanish'
criteria2sql
CREATE TABLE table_name_98 ( visitor VARCHAR, decision VARCHAR, home VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the visiting team at the game where Edmonton was the home team and the decision was Osgood?
SELECT visitor FROM table_name_98 WHERE decision = "osgood" AND home = "edmonton"
sql_create_context
CREATE TABLE table_25030512_4 ( first_elected VARCHAR, district VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the first elected for alabama 3
SELECT COUNT(first_elected) FROM table_25030512_4 WHERE district = "Alabama 3"
sql_create_context
CREATE TABLE table_name_24 ( matches VARCHAR, runs VARCHAR, inns VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Runs smaller than 6106, and Inns smaller than 146 has what total number of matches?
SELECT COUNT(matches) FROM table_name_24 WHERE runs < 6106 AND inns < 146
sql_create_context
CREATE TABLE table_53520 ( "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. -- On which date was the game where the home teams ...
SELECT "Date" FROM table_53520 WHERE "Home team score" = '22.15 (147)' AND "Away team score" = '9.8 (62)'
wikisql
CREATE TABLE table_21480 ( "Year" real, "West Manila" text, "East Manila" text, "Consumer Price Index (2005=100)" text, "West Manila as a share of 1996 real tariff" text, "East Manila as a share of 1996 real tariff" text ) -- Using valid SQLite, answer the following questions for the tables pr...
SELECT "Year" FROM table_21480 WHERE "West Manila" = '6.5'
wikisql
CREATE TABLE table_43964 ( "Bank type" text, "Number of branches" real, "On-site ATMs" real, "Off-site ATMs" real, "Total ATMs" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the mean on-site ATMS that have off-site ATMs of 1567, and the tot...
SELECT AVG("On-site ATMs") FROM table_43964 WHERE "Off-site ATMs" = '1567' AND "Total ATMs" < '4772'
wikisql
CREATE TABLE table_43536 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What date is aston villa away?
SELECT "Date" FROM table_43536 WHERE "Away team" = 'aston villa'
wikisql
CREATE TABLE table_name_39 ( conv VARCHAR, pens VARCHAR, tries VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many conversions had 0 pens and 0 tries?
SELECT conv FROM table_name_39 WHERE pens = "0" AND tries = "0"
sql_create_context
CREATE TABLE match_season ( Season real, Player text, Position text, Country int, Team int, Draft_Pick_Number int, Draft_Class text, College text ) CREATE TABLE player ( Player_ID int, Player text, Years_Played text, Total_WL text, Singles_WL text, Doubles_WL tex...
SELECT Position, COUNT(*) FROM match_season GROUP BY Position
nvbench
CREATE TABLE table_name_21 ( score_in_final VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the Final Score on February 24, 2002?
SELECT score_in_final FROM table_name_21 WHERE date = "february 24, 2002"
sql_create_context
CREATE TABLE table_name_53 ( format VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the format of the date February 14, 2002?
SELECT format FROM table_name_53 WHERE date = "february 14, 2002"
sql_create_context
CREATE TABLE procedures ( 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 prescription...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Severe sepsis" AND prescriptions.route = "PB"
mimicsql_data
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_care...
SELECT admissions.insurance FROM admissions WHERE admissions.subject_id = 138 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1
mimic_iii
CREATE TABLE table_61449 ( "Tournament" 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 2009 value with lq in 2012, 2r in 2011, and lq in 2008?
SELECT "2009" FROM table_61449 WHERE "2012" = 'lq' AND "2011" = '2r' AND "2008" = 'lq'
wikisql
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, U...
SELECT DISTINCT * FROM Posts AS q INNER JOIN Posts AS a ON a.ParentId = q.Id WHERE q.PostTypeId = 1 AND a.PostTypeId = 2 AND a.DeletionDate IS NULL AND q.ClosedDate IS NULL AND q.AnswerCount >= '##numOfAnswers?1##'
sede
CREATE TABLE table_name_39 ( date VARCHAR, attendance VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the date of the game attended by 45,122?
SELECT date FROM table_name_39 WHERE attendance = "45,122"
sql_create_context
CREATE TABLE table_204_56 ( id number, "year" number, "song" text, "us r&b" number, "us rap" number, "album" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was the only single released in 1993 ?
SELECT "song" FROM table_204_56 WHERE "year" = 1993
squall
CREATE TABLE table_name_14 ( rank VARCHAR, points VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest 2nd in (m) that has a Rank more than 2 and Points more than 249.3
SELECT MAX(2 AS nd__m_) FROM table_name_14 WHERE rank > 2 AND points > 249.3
sql_create_context
CREATE TABLE table_13067 ( "Position" real, "Club" text, "Games played" real, "Wins" real, "Draws" real, "Loses" real, "Goals scored" real, "Goals conceded" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many games...
SELECT "Games played" FROM table_13067 WHERE "Wins" = '13' AND "Goals conceded" = '45'
wikisql
CREATE TABLE table_34084 ( "Week" real, "Date" text, "Opponent" text, "Time / Time Zone" text, "Game Site" text, "Final Score" text, "Record" text, "Match Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where is the game site for ...
SELECT "Game Site" FROM table_34084 WHERE "Record" = '2-3'
wikisql
CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE date_day ( month_number int, day_number int, year int, day_name var...
SELECT DISTINCT flight.flight_id FROM airport_service, city, flight WHERE (city.city_code = airport_service.city_code AND city.city_name = 'ATLANTA' AND flight.departure_time BETWEEN 0 AND 1200 AND flight.to_airport = airport_service.airport_code) AND flight.airline_code = 'DL'
atis
CREATE TABLE table_47178 ( "Place" text, "Player" text, "Country" text, "Score" real, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the place of the player who scored less than 70?
SELECT "Place" FROM table_47178 WHERE "Score" < '70'
wikisql
CREATE TABLE table_name_71 ( location VARCHAR, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the location of the game with a 6-11-8 record?
SELECT location FROM table_name_71 WHERE record = "6-11-8"
sql_create_context
CREATE TABLE table_name_74 ( dvd_release_date VARCHAR, season VARCHAR, episodes VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On what date was the DVD released for the season with fewer than 13 episodes that aired before season 8?
SELECT dvd_release_date FROM table_name_74 WHERE season < 8 AND episodes < 13
sql_create_context
CREATE TABLE table_1111 ( "Rank" real, "Country" text, "UNWTO Region" text, "International tourist arrivals (2012)" text, "International tourist arrivals (2011)" text, "Change (2011 to 2012)" text, "Change (2010 to 2011)" text ) -- Using valid SQLite, answer the following questions for the...
SELECT "Country" FROM table_1111 WHERE "Rank" = '5'
wikisql
CREATE TABLE table_name_7 ( opponent VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the opponent with a score of 109 108?
SELECT opponent FROM table_name_7 WHERE score = "109–108"
sql_create_context
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, Creation...
SELECT TIME_TO_STR(CreationDate, '%j'), CAST(SUM(CASE WHEN AnswerCount > 0 THEN 1 ELSE 0 END) AS FLOAT) / COUNT(Posts.Id) AS Ratio FROM Posts WHERE (PostTypeId = 1 AND CreationDate >= '##Date1##' AND CreationDate <= '##Date2##') GROUP BY TIME_TO_STR(CreationDate, '%j') ORDER BY TIME_TO_STR(CreationDate, '%j')
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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
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 = "Other alter consciousnes" AND lab.fluid = "Ascites"
mimicsql_data
CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varchar, friday varchar, saturday varchar, sunday varchar, has_final_proje...
SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%MDE%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_cou...
advising
CREATE TABLE table_18018214_4 ( games_played VARCHAR, points VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many games had 22 points?
SELECT COUNT(games_played) FROM table_18018214_4 WHERE points = 22
sql_create_context
CREATE TABLE table_name_79 ( circuit VARCHAR, date VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the circuit for 10 may for targa florio
SELECT circuit FROM table_name_79 WHERE date = "10 may" AND name = "targa florio"
sql_create_context
CREATE TABLE customers ( customer_id number, customer_type_code text, address_line_1 text, address_line_2 text, town_city text, state text, email_address text, phone_number text ) CREATE TABLE products ( product_id number, parent_product_id number, product_category_code text...
SELECT t1.product_name, COUNT(*) FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_name
spider
CREATE TABLE table_68754 ( "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 visiting team who played at the hubert h. humphrey metrodome stadium?
SELECT "Visiting Team" FROM table_68754 WHERE "Stadium" = 'hubert h. humphrey metrodome'
wikisql
CREATE TABLE table_name_86 ( attendance VARCHAR, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the attendance that has a record of 43-28?
SELECT attendance FROM table_name_86 WHERE record = "43-28"
sql_create_context
CREATE TABLE table_25887826_17 ( pos INTEGER, avg VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many POS when the average is 1.8529?
SELECT MAX(pos) FROM table_25887826_17 WHERE avg = "1.8529"
sql_create_context
CREATE TABLE table_name_41 ( away_team VARCHAR, venue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who is the away team when played at junction oval?
SELECT away_team FROM table_name_41 WHERE venue = "junction oval"
sql_create_context
CREATE TABLE table_73331 ( "Year" real, "Division" real, "League" text, "Reg. Season" text, "Playoffs" text, "National Open" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What league was involved in 2008?
SELECT "League" FROM table_73331 WHERE "Year" = '2008'
wikisql
CREATE TABLE table_78597 ( "Place" text, "Player" text, "Country" text, "Score" real, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Place of the Player with a Score of 67?
SELECT "Place" FROM table_78597 WHERE "Score" = '67'
wikisql
CREATE TABLE table_name_42 ( color_commentator_s_ VARCHAR, sideline_reporter_s_ VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the color commentator for Eric Dickerson and Melissa Stark in 2001?
SELECT color_commentator_s_ FROM table_name_42 WHERE sideline_reporter_s_ = "eric dickerson and melissa stark" AND year = 2001
sql_create_context
CREATE TABLE table_name_73 ( school VARCHAR, location VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which school is located in trafalgar?
SELECT school FROM table_name_73 WHERE location = "trafalgar"
sql_create_context
CREATE TABLE table_name_40 ( lost INTEGER, points_1 VARCHAR, drawn VARCHAR, goals_against VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest lost entry that has a drawn entry less than 6, goals against less than 44, and a points 1 ent...
SELECT MAX(lost) FROM table_name_40 WHERE drawn < 6 AND goals_against < 44 AND points_1 = "27"
sql_create_context
CREATE TABLE table_39710 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the result on October 4, 1993?
SELECT "Result" FROM table_39710 WHERE "Date" = 'october 4, 1993'
wikisql
CREATE TABLE table_name_20 ( laps INTEGER, driver VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of laps for Derek Warwick?
SELECT SUM(laps) FROM table_name_20 WHERE driver = "derek warwick"
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text, person_info_CSD text, person_info_CSRQ time, person_info_GJDM text, person_info_GJMC text, person_info_JGDM text, person_info_JGMC text, person_info_MZDM text, person_info_MZMC text, person_info_XBDM ...
SELECT jyjgzbb.YQBH, jyjgzbb.YQMC FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BG...
css
CREATE TABLE table_39003 ( "Round" real, "Pick #" real, "Overall" real, "Name" text, "Position" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest round with a guard position and an overall greater than 71?
SELECT MAX("Round") FROM table_39003 WHERE "Position" = 'guard' AND "Overall" > '71'
wikisql
CREATE TABLE table_name_85 ( home_team VARCHAR, venue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Windy hill is the home to what team?
SELECT home_team FROM table_name_85 WHERE venue = "windy hill"
sql_create_context
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
SELECT demographic.diagnosis, procedures.short_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "2560"
mimicsql_data
CREATE TABLE table_203_42 ( id number, "model" text, "class" text, "length" text, "fuel" text, "starting price" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the price of bot the via and tour models combined ?
SELECT SUM("starting price") FROM table_203_42 WHERE "model" IN ('via', 'tour')
squall
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 AVG(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_AGE > 13 UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_AGE > 13 UNION SELECT zyb.MED_CLINIC_ID FROM zyb WHERE zyb.PERSON_AGE > 13 UNION SELECT mzb.MED_CLINIC_ID FROM mzb WHERE mzb.PERSON...
css
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_CD, t_kc21.IN_DIAG_DIS_CD, MIN(t_kc24.ILL_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 = '1518558' GROUP BY t_kc21.MED_ORG_DEPT_CD, t_kc21.IN_DIAG_DIS_CD
css
CREATE TABLE table_1329532_2 ( date_of_election VARCHAR, elected_successor VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the election date for Arthur Hodges?
SELECT date_of_election FROM table_1329532_2 WHERE elected_successor = "Arthur Hodges"
sql_create_context
CREATE TABLE table_6207 ( "Date" text, "Episode" real, "Performer 1" text, "Performer 2" text, "Performer 3" text, "Performer 4" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was performer 3 with karen maruyama as performer 2?
SELECT "Performer 3" FROM table_6207 WHERE "Performer 2" = 'karen maruyama'
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 jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN hz_info_mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB ...
css
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 procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime t...
SELECT SUM(prescriptions.dose_val_rx) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 30267 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) AND prescriptions.drug = 'ns (syringe)'
mimic_iii
CREATE TABLE table_name_15 ( date VARCHAR, result VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the date of the game with a result of won 4-2?
SELECT date FROM table_name_15 WHERE result = "won 4-2"
sql_create_context
CREATE TABLE table_73999 ( "District" text, "Incumbent" text, "Party" text, "First elected" text, "Result" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the result for willis alston
SELECT "Result" FROM table_73999 WHERE "Incumbent" = 'Willis Alston'
wikisql
CREATE TABLE documents_with_expenses ( document_id number, budget_type_code text, document_details text ) CREATE TABLE projects ( project_id number, project_details text ) CREATE TABLE statements ( statement_id number, statement_details text ) CREATE TABLE ref_budget_codes ( budget_ty...
SELECT statement_id, COUNT(*) FROM accounts GROUP BY statement_id
spider
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 procedures.short_title FROM procedures WHERE procedures.subject_id = "8323"
mimicsql_data
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 jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM mzjzjlb JOIN jybgb JOIN jyjgzbb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE mzjzjlb.JZZDSM = '2型糖尿病' AND jyjgzbb.JCZBMC = '低密度脂蛋白胆固醇'
css
CREATE TABLE t_kc21_t_kc24 ( MED_CLINIC_ID text, MED_SAFE_PAY_ID number ) 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...
SELECT SUM(t_kc24.MED_AMOUT) FROM t_kc21 JOIN t_kc24 JOIN t_kc21_t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc24.MED_CLINIC_ID AND t_kc21_t_kc24.MED_SAFE_PAY_ID = t_kc24.MED_SAFE_PAY_ID WHERE t_kc21.MED_SER_ORG_NO = '7756841' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2009-06-17' AND '2018-12-02'
css
CREATE TABLE table_1646960_3 ( debut_album VARCHAR, winner VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many debut albums did mike mohede have?
SELECT COUNT(debut_album) FROM table_1646960_3 WHERE winner = "Mike Mohede"
sql_create_context
CREATE TABLE table_29566 ( "A\u00f1o" real, "Trabajo nominado" text, "Premio" text, "Categor\u00eda" text, "Country" text, "Resultado" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When the a o was 2012, who was the county?
SELECT "Country" FROM table_29566 WHERE "A\u00f1o" = '2012'
wikisql
CREATE TABLE table_77175 ( "Season" real, "League" text, "Finish" text, "Wins" real, "Losses" real, "Ties" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What league had a finish of 2nd and 3 losses?
SELECT "League" FROM table_77175 WHERE "Finish" = '2nd' AND "Losses" = '3'
wikisql
CREATE TABLE table_41555 ( "City of license" text, "Identifier" text, "Frequency" text, "Power" text, "Class" text, "RECNet" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the city of license that has lp as the class?
SELECT "City of license" FROM table_41555 WHERE "Class" = 'lp'
wikisql