instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_54195 ( "Season" text, "Competition" text, "Round" text, "Opponent" text, "Result" text, "Venue" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which season has a Result of 6 9?
SELECT "Season" FROM table_54195 WHERE "Result" = '6–9'
wikisql
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE medication ( medi...
SELECT COUNT(DISTINCT patient.patientunitstayid) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '003-17096') AND DATETIME(patient.unitadmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year')
eicu
CREATE TABLE candidate ( name VARCHAR, people_id VARCHAR ) CREATE TABLE people ( name VARCHAR, people_id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what are the names of people who did not participate in the candidate election.
SELECT name FROM people WHERE NOT people_id IN (SELECT people_id FROM candidate)
sql_create_context
CREATE TABLE trip ( id INTEGER, duration INTEGER, start_date TEXT, start_station_name TEXT, start_station_id INTEGER, end_date TEXT, end_station_name TEXT, end_station_id INTEGER, bike_id INTEGER, subscription_type TEXT, zip_code INTEGER ) CREATE TABLE status ( station_i...
SELECT date, COUNT(date) FROM weather WHERE max_temperature_f > 85 ORDER BY COUNT(date)
nvbench
CREATE TABLE t_kc21 ( MED_CLINIC_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, COMP_ID text, PERSON_ID text, PERSON_NM text, IDENTITY_CARD text, SOC_SRT_CARD text, PERSON_SEX number, PERSON_AGE number, IN_HOSP_DATE time, OUT_HOSP_DATE time, DIFF_PLACE_FLG numb...
SELECT SUM(t_kc22.AMOUNT) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '韩文惠' AND t_kc21.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2010-12-07' AND '2019-08-07' AND t_kc22.MED_INV_ITEM_TYPE = '西药费'
css
CREATE TABLE table_35501 ( "Date" text, "Home Team" text, "Score" text, "Away Team" text, "Venue" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where was the game on September 11, 2004?
SELECT "Venue" FROM table_35501 WHERE "Date" = 'september 11, 2004'
wikisql
CREATE TABLE table_45952 ( "Region (year)" text, "No. 1" text, "No. 2" text, "No. 3" text, "No. 4" text, "No. 5" text, "No. 6" text, "No. 7" text, "No. 8" text, "No. 9" text, "No. 10" text ) -- Using valid SQLite, answer the following questions for the tables provided above...
SELECT "No. 5" FROM table_45952 WHERE "No. 2" = 'olivia' AND "No. 4" = 'ava' AND "No. 6" = 'abigail'
wikisql
CREATE TABLE table_35748 ( "Team" text, "Date" text, "Opponent" text, "Pitcher" text, "Inn." text, "Venue" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the pitcher on June 8, 1961?
SELECT "Pitcher" FROM table_35748 WHERE "Date" = 'june 8, 1961'
wikisql
CREATE TABLE table_33331 ( "Player" text, "Nationality" text, "Position" text, "From" text, "School/Country" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the player from the year 2000?
SELECT "Player" FROM table_33331 WHERE "From" = '2000'
wikisql
CREATE TABLE table_9909 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High assists" text, "Location Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Can you tell me the Location Atte...
SELECT "Location Attendance" FROM table_9909 WHERE "High assists" = 'luke ridnour (10)' AND "Date" = 'december 3'
wikisql
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TAB...
SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age >= 60) AND DATETIME(treatment.treatmenttime) <= DATETIME(CURRENT_TIME(), '-1 year') GROUP BY...
eicu
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime...
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', intakeoutput.intakeoutputtime)) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid ...
eicu
CREATE TABLE table_16981 ( "Series #" real, "Season #" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the number of series of the ...
SELECT MAX("Series #") FROM table_16981 WHERE "Title" = 'Your Wife''s a Payne'
wikisql
CREATE TABLE table_49268 ( "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 is the tie no, on 24 november 1971 and the away team is king's lynn?
SELECT "Tie no" FROM table_49268 WHERE "Date" = '24 november 1971' AND "Away team" = 'king''s lynn'
wikisql
CREATE TABLE table_52777 ( "Region" text, "Date" text, "Label" text, "Format" text, "Catalog" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which label was in the United Kingdom region?
SELECT "Label" FROM table_52777 WHERE "Region" = 'united kingdom'
wikisql
CREATE TABLE table_24506 ( "Character" text, "Original Japanese" text, "English ( Streamline )" text, "English ( Manga UK )" text, "English ( Pioneer / Geneon )" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the original Japanese cast if Se...
SELECT "Original Japanese" FROM table_24506 WHERE "English ( Manga UK )" = 'Sean Barrett'
wikisql
CREATE TABLE city ( city_id number, county_id number, name text, white number, black number, amerindian number, asian number, multiracial number, hispanic number ) CREATE TABLE county_public_safety ( county_id number, name text, population number, police_officers num...
SELECT name FROM city WHERE county_id = (SELECT county_id FROM county_public_safety ORDER BY police_officers DESC LIMIT 1)
spider
CREATE TABLE table_203_150 ( id number, "season" number, "series" text, "team" text, "races" number, "wins" number, "poles" number, "f/laps" number, "podiums" number, "points" number, "position" text ) -- Using valid SQLite, answer the following questions for the tables pro...
SELECT COUNT(*) FROM table_203_150 WHERE "position" = 1
squall
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
SELECT diagnoses.icd9_code, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Michelle Medina"
mimicsql_data
CREATE TABLE storm ( Storm_ID int, Name text, Dates_active text, Max_speed int, Damage_millions_USD real, Number_Deaths int ) CREATE TABLE region ( Region_id int, Region_code text, Region_name text ) CREATE TABLE affected_region ( Region_id int, Storm_ID int, Number_cit...
SELECT Name, Number_Deaths FROM storm WHERE Number_Deaths >= 1 ORDER BY Number_Deaths DESC
nvbench
CREATE TABLE table_14499 ( "Name" text, "Years" text, "Gender" text, "Area" text, "Authority" text, "Decile" real, "Roll" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what area is Morven School?
SELECT "Area" FROM table_14499 WHERE "Name" = 'morven school'
wikisql
CREATE TABLE table_name_57 ( position VARCHAR, school VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the position of a player from North Carolina?
SELECT position FROM table_name_57 WHERE school = "north carolina"
sql_create_context
CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PostFeedback ( Id number, PostId numb...
SELECT * FROM PostTypes
sede
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, d...
SELECT medication.drugstarttime FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-17922')) AND medication.drugname = 'insulin aspart' AND DA...
eicu
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
SELECT COUNT(*) FROM wdmzjzjlb WHERE wdmzjzjlb.JZKSMC = '小儿骨质疏松科' AND wdmzjzjlb.JZKSRQ BETWEEN '2007-07-31' AND '2007-12-11' UNION SELECT COUNT(*) FROM bdmzjzjlb WHERE bdmzjzjlb.JZKSMC = '小儿骨质疏松科' AND bdmzjzjlb.JZKSRQ BETWEEN '2007-07-31' AND '2007-12-11'
css
CREATE TABLE table_27733258_11 ( team VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What company plays on april 1?
SELECT team FROM table_27733258_11 WHERE date = "April 1"
sql_create_context
CREATE TABLE table_2126093_3 ( winning_score VARCHAR, tournament VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the winning score of the Vernal Ladies tournament?
SELECT winning_score FROM table_2126093_3 WHERE tournament = "Vernal Ladies"
sql_create_context
CREATE TABLE table_name_65 ( home_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was Carlton's score as the home team?
SELECT home_team AS score FROM table_name_65 WHERE home_team = "carlton"
sql_create_context
CREATE TABLE table_name_61 ( title VARCHAR, last_year VARCHAR, first_year VARCHAR, publisher VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which EC Comics title ran from 1950 to 1953?
SELECT title FROM table_name_61 WHERE first_year = "1950" AND publisher = "ec comics" AND last_year = "1953"
sql_create_context
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 COUNT(*) FROM jybgb WHERE jybgb.JZLSH = '01359019093'
css
CREATE TABLE table_71019 ( "Date" text, "Tournament" text, "Surface" text, "Tier" text, "Opponent in the final" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the opponent on May 8, 2006?
SELECT "Opponent in the final" FROM table_71019 WHERE "Date" = 'may 8, 2006'
wikisql
CREATE TABLE table_27539535_4 ( points INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest amount of points?
SELECT MAX(points) FROM table_27539535_4
sql_create_context
CREATE TABLE table_14264 ( "Year" real, "Competition" text, "Location" text, "Weight Category" text, "Snatch" text, "Clean and Jerk" text, "Total" text, "Place" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the Clean and Jerk w...
SELECT "Clean and Jerk" FROM table_14264 WHERE "Snatch" = '190kg'
wikisql
CREATE TABLE table_72813 ( "Name" text, "Latitude" text, "Longitude" text, "Diameter (km)" text, "Year named" real, "Name origin" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the diameter in km of the feature named Colette Patera?
SELECT "Diameter (km)" FROM table_72813 WHERE "Name" = 'Colette Patera'
wikisql
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "59" AND lab.itemid = "51095"
mimicsql_data
CREATE TABLE table_32748 ( "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 at the game played at Kard...
SELECT "Home team" FROM table_32748 WHERE "Venue" = 'kardinia park'
wikisql
CREATE TABLE table_41490 ( "Position" real, "Team" text, "Points" real, "Played" real, "Drawn" real, "Lost" real, "Against" real, "Difference" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Difference with a position of less ...
SELECT "Difference" FROM table_41490 WHERE "Position" < '3' AND "Points" = '17'
wikisql
CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE program ( program_id int, name varchar, college varc...
SELECT DISTINCT total_credit FROM student WHERE student_id = 1
advising
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeri...
SELECT t1.labname FROM (SELECT lab.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 30 AND 39) AND DATETIME(lab.labresulttime) >= DATETIME(CURRENT_TIME(), '-3 year') GROUP BY lab.labname) AS t1 WHER...
eicu
CREATE TABLE table_35985 ( "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 was the surface when the opponent was judith wiesner, and the outcome was win...
SELECT "Surface" FROM table_35985 WHERE "Outcome" = 'winner' AND "Opponent" = 'judith wiesner'
wikisql
CREATE TABLE table_55972 ( "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Bronze has a Silver of 2, and a Total smaller than 5?
SELECT AVG("Bronze") FROM table_55972 WHERE "Silver" = '2' AND "Total" < '5'
wikisql
CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_airport text, arrival_time int, arrival_airline text, arrival_flight_number int, departure_time int, departure_airlin...
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 = 'PHOENIX' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER...
atis
CREATE TABLE table_25992 ( "Game" real, "Date" text, "Opponent" text, "Result" text, "Orangemen points" real, "Opponents" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the Orangemen record during game 3?
SELECT "Record" FROM table_25992 WHERE "Game" = '3'
wikisql
CREATE TABLE table_22023 ( "Club" text, "Played" text, "Won" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Tries against" text, "Try bonus" text, "Losing bonus" text, "Points" text ) -- Using valid SQLite, answer the follo...
SELECT "Losing bonus" FROM table_22023 WHERE "Points" = '53'
wikisql
CREATE TABLE dataset ( datasetid int, datasetname varchar ) CREATE TABLE paperfield ( fieldid int, paperid int ) CREATE TABLE writes ( paperid int, authorid int ) CREATE TABLE field ( fieldid int ) CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TABLE jo...
SELECT DISTINCT paper.year FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'deep learning' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid GROUP BY paper.year ORDER BY paper.year
scholar
CREATE TABLE table_24677 ( "No" real, "Driver" text, "Entrant" text, "Constructor" text, "Chassis" text, "Engine" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the number for autom vil club argentino for juan manuel fangio
SELECT "No" FROM table_24677 WHERE "Entrant" = 'Automóvil Club Argentino' AND "Driver" = 'Juan Manuel Fangio'
wikisql
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.short_title = "Percu endosc jejunostomy"
mimicsql_data
CREATE TABLE table_name_99 ( race VARCHAR, location VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the winner at spa-francorchamps?
SELECT race AS Winner FROM table_name_99 WHERE location = "spa-francorchamps"
sql_create_context
CREATE TABLE table_38847 ( "Institution" text, "Location" text, "Team Nickname" text, "Tenure" text, "New Conference" text, "New Classification" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the new conference for the Gauchos team?
SELECT "New Conference" FROM table_38847 WHERE "Team Nickname" = 'gauchos'
wikisql
CREATE TABLE table_61455 ( "Date" text, "Tournament" text, "Surface" text, "Partnering" text, "Opponent in the final" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Partnering has a Score of 7 6 7 , 6 1?
SELECT "Partnering" FROM table_61455 WHERE "Score" = '7–6 7 , 6–1'
wikisql
CREATE TABLE table_30007505_1 ( semifinalists VARCHAR, rank VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the number of semifinalists for 19 rank
SELECT COUNT(semifinalists) FROM table_30007505_1 WHERE rank = 19
sql_create_context
CREATE TABLE table_10706961_2 ( rd INTEGER, pole_position VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest Rd that Tom Sneva had the pole position in?
SELECT MAX(rd) FROM table_10706961_2 WHERE pole_position = "Tom Sneva"
sql_create_context
CREATE TABLE table_50121 ( "Points" real, "Score" text, "Premiers" text, "Runners Up" text, "Details" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the premier team that has 38 points and won with a score of 38-0?
SELECT "Premiers" FROM table_50121 WHERE "Points" = '38' AND "Score" = '38-0'
wikisql
CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, ...
SELECT DISTINCT t1.c1 FROM (SELECT lab.labresult, PERCENT_RANK() OVER (ORDER BY lab.labresult) AS c1 FROM lab WHERE lab.labname = 'alt (sgpt)' AND lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age = (SELECT patient.age FROM patient WHERE patient.uniquepid = '015-21757' AND NOT pa...
eicu
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemics...
SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-66039')) AND NOT vitalperiodic.sao2 IS NULL AND...
eicu
CREATE TABLE Students ( personal_name VARCHAR, family_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- List the personal names and family names of all the students in alphabetical order of family name.
SELECT personal_name, family_name FROM Students ORDER BY family_name
sql_create_context
CREATE TABLE table_35297 ( "Round" real, "Player" text, "Nationality" text, "NHL team" text, "College/Junior/Club Team (League)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Round has a Nationality of united states, and a College/Junior/Club...
SELECT MIN("Round") FROM table_35297 WHERE "Nationality" = 'united states' AND "College/Junior/Club Team (League)" = 'breck school (ushs)'
wikisql
CREATE TABLE table_78788 ( "Country" text, "Date" text, "Label" text, "Format" text, "Catalog Nr." text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What country is the Debemur Morti prod. label from?
SELECT "Country" FROM table_78788 WHERE "Label" = 'debemur morti prod.'
wikisql
CREATE TABLE table_name_46 ( draws INTEGER, played INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Draws average that has a Played that's smaller than 18?
SELECT AVG(draws) FROM table_name_46 WHERE played < 18
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 INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.gender = "M" AND procedures.long_title = "Open heart valvuloplasty of mitral valve without replacement"
mimicsql_data
CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ...
SELECT Age, COUNT(Id) AS count_per_age FROM Users WHERE Age BETWEEN 20 AND 30 GROUP BY Age
sede
CREATE TABLE table_76051 ( "Round" text, "Main date" text, "Number of fixtures" real, "Clubs" text, "New entries this round" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Round when the number of fixtures is more than 2, and the Main da...
SELECT "Round" FROM table_76051 WHERE "Number of fixtures" > '2' AND "Main date" = '7 and 28 november 2007'
wikisql
CREATE TABLE table_13110 ( "Elected" text, "Assembled" text, "Dissolved" text, "1st member" text, "2nd member" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What 1st member has a 2nd member of thomas snagge, and Elected of 1588/89?
SELECT "1st member" FROM table_13110 WHERE "2nd member" = 'thomas snagge' AND "Elected" = '1588/89'
wikisql
CREATE TABLE table_56394 ( "Product" text, "2004" text, "2003" text, "2002" text, "2001" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 2001 statistic for the product that had 2,360,000 tonnes in 2002?
SELECT "2001" FROM table_56394 WHERE "2002" = '2,360,000 tonnes'
wikisql
CREATE TABLE table_79127 ( "Date" text, "Time (UTC)" text, "Epicenter" text, "Magnitude" text, "Depth" text, "Intensity" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the magnitude with epicenter at Vrancea County, unknown intensity and...
SELECT "Magnitude" FROM table_79127 WHERE "Epicenter" = 'vrancea county' AND "Intensity" = 'unknown' AND "Time (UTC)" = '06:36'
wikisql
CREATE TABLE loan ( loan_id text, loan_type text, cust_id text, branch_id text, amount number ) CREATE TABLE customer ( cust_id text, cust_name text, acc_type text, acc_bal number, no_of_loans number, credit_score number, branch_id number, state text ) CREATE TABLE ...
SELECT DISTINCT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id
spider
CREATE TABLE table_30446 ( "Episode" text, "Date Aired" text, "Timeslot" text, "Rating" text, "Nightly Rank" real, "Weekly Rank" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the weekly rank of episode 1.03?
SELECT "Weekly Rank" FROM table_30446 WHERE "Episode" = '1.03'
wikisql
CREATE TABLE table_6951 ( "Nation" text, "Skip" text, "Third" text, "Second" text, "Lead" text, "Alternate" text, "Club" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was Switzerland's alternate?
SELECT "Alternate" FROM table_6951 WHERE "Nation" = 'switzerland'
wikisql
CREATE TABLE table_22050544_4 ( prize VARCHAR, event__number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the prize pool for the event number 27H?
SELECT prize AS Pool FROM table_22050544_4 WHERE event__number = "27H"
sql_create_context
CREATE TABLE table_203_198 ( id number, "season" text, "series" text, "team" text, "races" number, "wins" number, "poles" number, "fast laps" number, "points" number, "pos." text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was...
SELECT "series" FROM table_203_198 WHERE "season" = 2001 ORDER BY id LIMIT 1
squall
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "DIVORCED" AND demographic.ethnicity = "WHITE"
mimicsql_data
CREATE TABLE table_17552 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What episode was written b...
SELECT MAX("No. in season") FROM table_17552 WHERE "Written by" = 'Bobby Bell and Bill Lee'
wikisql
CREATE TABLE game ( stadium_id int, id int, Season int, Date text, Home_team text, Away_team text, Score text, Competition text ) CREATE TABLE injury_accident ( game_id int, id int, Player text, Injury text, Number_of_matches text, Source text ) CREATE TABLE sta...
SELECT Season, COUNT(Season) FROM game GROUP BY Home_team, Season ORDER BY Season
nvbench
CREATE TABLE employee ( emp_num number, emp_lname text, emp_fname text, emp_initial text, emp_jobcode text, emp_hiredate time, emp_dob time ) CREATE TABLE professor ( emp_num number, dept_code text, prof_office text, prof_extension text, prof_high_degree text ) CREATE T...
SELECT T1.emp_fname, T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T3.dept_code = T2.dept_code WHERE T3.dept_name = 'History' AND T2.prof_high_degree = 'Ph.D.'
spider
CREATE TABLE table_16017 ( "Season" text, "Division" text, "League Apps" real, "League Goals" real, "FA Cup Apps" real, "FA Cup Goals" real, "Total Apps" real, "Total Goals" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the smal...
SELECT MIN("Total Goals") FROM table_16017
wikisql
CREATE TABLE table_26967904_2 ( chambering VARCHAR, f_bolt___kgf__ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the chambering for the 8339 f bolt ( kgf )?
SELECT chambering FROM table_26967904_2 WHERE f_bolt___kgf__ = 8339
sql_create_context
CREATE TABLE table_61549 ( "Player" text, "Country" text, "Year(s) won" text, "Total" real, "To par" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Country has a Year(s) won of 1963?
SELECT "Country" FROM table_61549 WHERE "Year(s) won" = '1963'
wikisql
CREATE TABLE nuclear_power_plants ( id text, name text, latitude text, longitude text, country text, status text, reactortype text, reactormodel text, constructionstartat text, operationalfrom text, operationalto text, capacity text, lastupdatedat text, source tex...
SELECT reactormodel FROM nuclear_power_plants GROUP BY reactormodel ORDER BY COUNT(*) DESC LIMIT 1
geonucleardata
CREATE TABLE fare_basis ( fare_basis_code text, booking_class text, class_type text, premium text, economy text, discounted text, night text, season text, basis_days text ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TA...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA' AND CITY_2.c...
atis
CREATE TABLE table_46734 ( "Round" real, "Pick" real, "Player" text, "Nationality" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest Round, when College is 'Washington State', and when Pick is less than 48?
SELECT MIN("Round") FROM table_46734 WHERE "College" = 'washington state' AND "Pick" < '48'
wikisql
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE Comments ( Id num...
SELECT Name AS "bdgnam", Class AS "bdgcls", COUNT(DISTINCT 'UserId') AS "cntusr", (SELECT COUNT(*) FROM Badges AS "i" WHERE 'i'."Name" = 'o'."Name" AND 'i'."Class" = 'o'."Class" AND 'i'."UserId" = 4918) AS "selmul" FROM Badges AS "o" GROUP BY 'Name', 'Class' ORDER BY 'cntusr'
sede
CREATE TABLE table_53429 ( "Name" text, "League" real, "FA Cup" real, "League Cup" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average number of goals scored in the FA Cup by Whelan where he had more than 7 total goals?
SELECT AVG("FA Cup") FROM table_53429 WHERE "Name" = 'whelan' AND "Total" > '7'
wikisql
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic (...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.expire_flag = "1" AND prescriptions.drug = "MethylPREDNISolone Sodium Succ"
mimicsql_data
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.discharge_location = "HOME HEALTH CARE" AND lab.label = "Urobilinogen"
mimicsql_data
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) ...
SELECT demographic.admission_type, demographic.diagnosis FROM demographic WHERE demographic.name = "Travis Hofman"
mimicsql_data
CREATE TABLE table_name_28 ( team VARCHAR, conmebol_1995 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Team has a round 1 CONMEBOL 1995?
SELECT team FROM table_name_28 WHERE conmebol_1995 = "round 1"
sql_create_context
CREATE TABLE channel ( name VARCHAR, channel_id VARCHAR ) CREATE TABLE broadcast ( channel_id VARCHAR, time_of_day VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what are the names of the channels that broadcast in both morning and night?
SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' INTERSECT SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Night'
sql_create_context
CREATE TABLE personfriend ( name text, friend text, year number ) CREATE TABLE person ( name text, age number, city text, gender text, job text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find the name and age of the person who is a frien...
SELECT DISTINCT T1.name, T1.age FROM person AS T1 JOIN personfriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Dan' OR T2.friend = 'Alice'
spider
CREATE TABLE table_48188 ( "Outcome" text, "Year" real, "Championship" text, "Surface" text, "Opponent" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Outcome, when Opponent is Victoria Azarenka, and when Score is 6 2, 2 6,...
SELECT "Outcome" FROM table_48188 WHERE "Opponent" = 'victoria azarenka' AND "Score" = '6–2, 2–6, 7–5'
wikisql
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE treatment ( treat...
SELECT diagnosis.diagnosisname FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-127032')) AND STRFTIME('%y', diagnosis.diagnosistime) >= '210...
eicu
CREATE TABLE table_name_21 ( place VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Ben Hogan's Place?
SELECT place FROM table_name_21 WHERE player = "ben hogan"
sql_create_context
CREATE TABLE table_75422 ( "Year" real, "Entrant" text, "Engine" text, "Tyres" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Focus that has a Year bigger than 1977?
SELECT "Points" FROM table_75422 WHERE "Year" > '1977'
wikisql
CREATE TABLE table_75371 ( "Country" text, "Project Name" text, "Year startup" text, "Operator" text, "Peak" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Operator with a Peak that is 55?
SELECT "Operator" FROM table_75371 WHERE "Peak" = '55'
wikisql
CREATE TABLE table_name_12 ( conmebol_1994 VARCHAR, team VARCHAR, supercopa_1994 VARCHAR, recopa_1994 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which CONMEBOL 1994 has a Supercopa 1994 of n/a, and a Recopa 1994 of n/a, and a Team of san lorenzo?...
SELECT conmebol_1994 FROM table_name_12 WHERE supercopa_1994 = "n/a" AND recopa_1994 = "n/a" AND team = "san lorenzo"
sql_create_context
CREATE TABLE table_30861 ( "Episode #" real, "Series #" real, "Episode Title" text, "Original air date" text, "Production Code" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many episodes are titled 'the suspension'?
SELECT COUNT("Episode #") FROM table_30861 WHERE "Episode Title" = 'The Suspension'
wikisql
CREATE TABLE table_5475 ( "Round" real, "Pick #" real, "Overall" real, "Name" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Pick # of the player with an Overall less than 203 from West Virginia?
SELECT COUNT("Pick #") FROM table_5475 WHERE "College" = 'west virginia' AND "Overall" < '203'
wikisql
CREATE TABLE diagnoses ( 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 INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND procedures.icd9_code = "3606"
mimicsql_data
CREATE TABLE table_73806 ( "Position" real, "Sail number" text, "Yacht" text, "State/country" text, "Yacht type" text, "LOA (Metres)" text, "Skipper" text, "Corrected time d:hh:mm:ss" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What i...
SELECT "Position" FROM table_73806 WHERE "State/country" = 'NSW' AND "Yacht type" = 'Open 66'
wikisql
CREATE TABLE table_name_16 ( region VARCHAR, catalogue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what Region was the Catalogue number 1785089 released?
SELECT region FROM table_name_16 WHERE catalogue = "1785089"
sql_create_context
CREATE TABLE table_name_50 ( game INTEGER, record VARCHAR, points VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Game has a Record of 14 10 4, and Points smaller than 32?
SELECT SUM(game) FROM table_name_50 WHERE record = "14–10–4" AND points < 32
sql_create_context