instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE train ( Train_ID int, Name text, Time text, Service text ) CREATE TABLE station ( Station_ID int, Name text, Annual_entry_exit real, Annual_interchanges real, Total_Passengers real, Location text, Main_Services text, Number_of_Platforms int ) CREATE TABLE t...
SELECT SUM(Number_of_Platforms), SUM(Total_Passengers) FROM station GROUP BY Location
nvbench
CREATE TABLE table_34274 ( "Year" text, "Men's singles" text, "Women's singles" text, "Men's doubles" text, "Women's doubles" text, "Mixed doubles" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who won the Women's doubles the year that there wa...
SELECT "Women's doubles" FROM table_34274 WHERE "Men's doubles" = 'no competition' AND "Men's singles" = 'no competition'
wikisql
CREATE TABLE Addresses ( address_id INTEGER, address_details VARCHAR(255) ) CREATE TABLE Product_Suppliers ( product_id INTEGER, supplier_id INTEGER, date_supplied_from DATETIME, date_supplied_to DATETIME, total_amount_purchased VARCHAR(80), total_value_purchased DECIMAL(19,4) ) CREATE...
SELECT product_type_code, MAX(product_price) FROM Products GROUP BY product_type_code
nvbench
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.admittime, procedures.short_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "17595"
mimicsql_data
CREATE TABLE authors ( authid number, lname text, fname text ) CREATE TABLE authorship ( authid number, instid number, paperid number, authorder number ) CREATE TABLE papers ( paperid number, title text ) CREATE TABLE inst ( instid number, name text, country text ) -...
SELECT COUNT(*) FROM authors
spider
CREATE TABLE table_name_98 ( date VARCHAR, crowd INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the date of the game with 36,766 fans?
SELECT date FROM table_name_98 WHERE crowd > 36 OFFSET 766
sql_create_context
CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE area ( course_id int, area varchar ) CREATE TAB...
SELECT COUNT(DISTINCT course.department, course.name, course.number, semester.semester) FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'department0' AND course.number BETWEEN 100 AND 100 + 100 AND semester.semester IN ('FA', 'WN') AND semester.semester_...
advising
CREATE TABLE gyb ( CLINIC_ID 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, INSU_TYPE text, IN...
SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_ID = '16747082' AND qtb.MED_SER_ORG_NO = '7283689' AND qtb.IN_DIAG_DIS_NM LIKE '%失眠%' UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_ID = '16747082' AND gyb.MED_SER_ORG_NO = '7283689' AND gyb.IN_DIAG_DIS_NM LIKE '%失眠%' UNION SELECT zyb.MED_CLINIC_ID FROM zyb ...
css
CREATE TABLE table_37695 ( "Rank" text, "Urban sub-area" text, "Population" text, "Status" text, "Council area" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which urban sub-area has a population of 16,140?
SELECT "Urban sub-area" FROM table_37695 WHERE "Population" = '16,140'
wikisql
CREATE TABLE table_name_51 ( ethernet_ports VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the ethernet ports of the u10 appliance?
SELECT ethernet_ports FROM table_name_51 WHERE name = "u10"
sql_create_context
CREATE TABLE table_name_6 ( lost INTEGER, draw VARCHAR, matches VARCHAR, points VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of the losses that a match score larger than 26, a points score of 62, and a draw greater than 5?
SELECT SUM(lost) FROM table_name_6 WHERE matches > 26 AND points = 62 AND draw > 5
sql_create_context
CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE ReviewTasks ( Id num...
SELECT LEFT(REPLACE(Comment, 'to http://', ''), STR_POSITION(REPLACE(Comment, 'to http://', ''), '/') - 1), COUNT(PostId) FROM PostHistory WHERE PostHistoryTypeId = 35 GROUP BY LEFT(REPLACE(Comment, 'to http://', ''), STR_POSITION(REPLACE(Comment, 'to http://', ''), '/') - 1) ORDER BY 2 DESC
sede
CREATE TABLE table_name_43 ( wins VARCHAR, team VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many wins does Benelli have before 1962?
SELECT COUNT(wins) FROM table_name_43 WHERE team = "benelli" AND year < 1962
sql_create_context
CREATE TABLE Person ( name varchar(20), age INTEGER, city TEXT, gender TEXT, job TEXT ) CREATE TABLE PersonFriend ( name varchar(20), friend varchar(20), year INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who has friends that are ol...
SELECT friend, age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age > (SELECT AVG(age) FROM Person) ORDER BY friend DESC
nvbench
CREATE TABLE table_name_15 ( moving_to VARCHAR, nat VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where is the nationality of Arg Esp moving to?
SELECT moving_to FROM table_name_15 WHERE nat = "arg esp"
sql_create_context
CREATE TABLE table_65816 ( "Event" text, "Time" text, "Nationality" text, "Date" text, "Meet" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Meet of the Event with a Time of 7:55.02?
SELECT "Meet" FROM table_65816 WHERE "Time" = '7:55.02'
wikisql
CREATE TABLE table_20081 ( "No. in season" real, "No. disc" 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. -- Which number episode of season 6 was the title 'Sight Unsee...
SELECT MIN("No. in season") FROM table_20081 WHERE "Title" = 'Sight Unseen'
wikisql
CREATE TABLE table_43894 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Ground" text, "Date" text, "Time" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Ground, when Away Team is Sydney?
SELECT "Ground" FROM table_43894 WHERE "Away team" = 'sydney'
wikisql
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 prescriptions ( subject_id text, hadm_id...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "27" AND prescriptions.route = "ID"
mimicsql_data
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, chartt...
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'guaifenesin er' AND DATETIME(prescriptions.startdate) <= DATETIME...
mimic_iii
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 jyjgzbb.JYZBLSH FROM hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.B...
css
CREATE TABLE table_name_10 ( date VARCHAR, winning_score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the date of the match with a winning score of 7 (67-72-69-69=277)?
SELECT date FROM table_name_10 WHERE winning_score = –7(67 - 72 - 69 - 69 = 277)
sql_create_context
CREATE TABLE table_27948565_1 ( round VARCHAR, circuit VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the number of rounds for brno
SELECT COUNT(round) FROM table_27948565_1 WHERE circuit = "Brno"
sql_create_context
CREATE TABLE table_14797 ( "Team 1" text, "Agg." text, "Team 2" text, "1st leg" text, "2nd leg" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the aggregate for the match with a team 2 of Hafia FC?
SELECT "Agg." FROM table_14797 WHERE "Team 2" = 'hafia fc'
wikisql
CREATE TABLE table_name_94 ( score VARCHAR, to_par VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Score has a To par of +1, and a Player of masashi ozaki?
SELECT score FROM table_name_94 WHERE to_par = "+1" AND player = "masashi ozaki"
sql_create_context
CREATE TABLE table_56884 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the mean number of laps for the constructor Ferrari when the time/retired was fuel pressure...
SELECT AVG("Laps") FROM table_56884 WHERE "Constructor" = 'ferrari' AND "Time/Retired" = 'fuel pressure'
wikisql
CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE aircraft ( aircraft_code varchar, aircraft_description varchar, manufacturer varchar, basic_type varchar, engines int, propulsion varchar, wide_body varchar, wing_span int, length int...
SELECT DISTINCT airport_code FROM airport WHERE airport_code = 'MIA'
atis
CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE fligh...
SELECT DISTINCT flight.flight_id FROM aircraft, equipment_sequence, flight WHERE ((flight.from_airport IN (SELECT AIRPORT_SERVICEalias0.airport_code FROM airport_service AS AIRPORT_SERVICEalias0 WHERE AIRPORT_SERVICEalias0.city_code IN (SELECT CITYalias0.city_code FROM city AS CITYalias0 WHERE CITYalias0.city_name = 'S...
atis
CREATE TABLE table_name_44 ( opponent VARCHAR, game VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the opponent of game 75?
SELECT opponent FROM table_name_44 WHERE game = 75
sql_create_context
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TA...
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', lab.labresulttime)) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '012-31752' AND patient.hosp...
eicu
CREATE TABLE table_50011 ( "Tournament" text, "Wins" real, "Top-10" real, "Top-25" real, "Events" real, "Cuts made" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total of events when the tournament was U.S. Open and the Top-25 was l...
SELECT SUM("Events") FROM table_50011 WHERE "Tournament" = 'u.s. open' AND "Top-25" < '1'
wikisql
CREATE TABLE table_name_93 ( year VARCHAR, league VARCHAR, league_position VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What year did the malaysia premier league get a position of 8/12?
SELECT year FROM table_name_93 WHERE league = "malaysia premier league" AND league_position = "8/12"
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 prescriptions ( subject_id text, hadm_id...
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.long_title = "Other chronic pulmonary heart diseases" AND prescriptions.drug_type = "MAIN"
mimicsql_data
CREATE TABLE table_55548 ( "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 were in attendance when the away team s...
SELECT SUM("Crowd") FROM table_55548 WHERE "Away team score" = '8.13 (61)'
wikisql
CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_CLINIC_ID text, MED_DIRE_CD tex...
SELECT t_kc21.MED_SER_ORG_NO FROM t_kc21 WHERE t_kc21.PERSON_NM = '喻奇文' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.SOC_SRT_DIRE_NM = '氯雷他定片')
css
CREATE TABLE table_18621 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many party with dbeingtrict being alabama 6
SELECT COUNT("Party") FROM table_18621 WHERE "District" = 'Alabama 6'
wikisql
CREATE TABLE table_27781212_1 ( position INTEGER, points VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the minimum position with 31 points?
SELECT MIN(position) FROM table_27781212_1 WHERE points = 31
sql_create_context
CREATE TABLE table_train_54 ( "id" int, "organ_transplantation" bool, "severe_sepsis" bool, "systolic_blood_pressure_sbp" int, "hiv_infection" bool, "thrombocytopenia" float, "sepsis" bool, "hypotension" bool, "burn_injury" int, "septic_shock" bool, "age" float, "NOUSE" f...
SELECT * FROM table_train_54 WHERE burn_injury > 10
criteria2sql
CREATE TABLE table_name_92 ( rank VARCHAR, points VARCHAR, club VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Can you tell me the total number of Rank that has the Points larger than 99, and the Club of barcelona?
SELECT COUNT(rank) FROM table_name_92 WHERE points > 99 AND club = "barcelona"
sql_create_context
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugsto...
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 = '012-37411' AND patient.hospitaldischargetime IS NULL)) AND med...
eicu
CREATE TABLE table_55399 ( "Ship's name" text, "Date entered service" text, "Date withdrawn" text, "Tonnage" real, "Type of Ship" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the sum of tonnage when the type of ship is twin screw ro-ro mot...
SELECT SUM("Tonnage") FROM table_55399 WHERE "Type of Ship" = 'twin screw ro-ro motorship' AND "Date entered service" = '11 february 1983'
wikisql
CREATE TABLE table_26108 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Prod. Code" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the title of the episod...
SELECT "Title" FROM table_26108 WHERE "Prod. Code" = '2-19'
wikisql
CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decima...
SELECT HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%'
nvbench
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_offering.end_time, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE course.department = 'department0' AND (course.number = 794 OR course.number = 345) AND course_offeri...
advising
CREATE TABLE table_73296 ( "Expression" text, "Y = 2008" text, "Y = 2009" text, "Y = 2010" text, "Y = 2011" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the y = 2009 when the expression is month = floor ((d + e + 114) / 31)?
SELECT "Y = 2009" FROM table_73296 WHERE "Expression" = 'month = floor ((d + e + 114) / 31)'
wikisql
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.admission_location = "EMERGENCY ROOM ADMIT" AND demographic.days_stay > "5"
mimicsql_data
CREATE TABLE table_name_27 ( operating_system_version VARCHAR, memory___ram__ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which operating system has 1GB (mobile ddr) memory (RAM)?
SELECT operating_system_version FROM table_name_27 WHERE memory___ram__ = "1gb (mobile ddr)"
sql_create_context
CREATE TABLE table_228439_4 ( district VARCHAR, successor VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What district is Samuel A. Bridges ( D ) assigned to as a successor?
SELECT district FROM table_228439_4 WHERE successor = "Samuel A. Bridges ( D )"
sql_create_context
CREATE TABLE table_name_15 ( rank INTEGER, gold VARCHAR, bronze VARCHAR, total VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average rank of a country with less than 13 bronze medals, a total of 11 medals, and more than 4 gold?
SELECT AVG(rank) FROM table_name_15 WHERE bronze < 13 AND total = 11 AND gold > 4
sql_create_context
CREATE TABLE field ( fieldid int ) CREATE TABLE author ( authorid int, authorname varchar ) CREATE TABLE venue ( venueid int, venuename varchar ) CREATE TABLE dataset ( datasetid int, datasetname varchar ) CREATE TABLE paperkeyphrase ( paperid int, keyphraseid int ) CREATE TABLE...
SELECT DISTINCT WRITES_0.paperid FROM author AS AUTHOR_0, author AS AUTHOR_1, writes AS WRITES_0, writes AS WRITES_1 WHERE AUTHOR_0.authorname = 'Richard Ladner' AND AUTHOR_1.authorname = 'Linda Shapiro' AND WRITES_0.authorid = AUTHOR_0.authorid AND WRITES_1.authorid = AUTHOR_1.authorid AND WRITES_1.paperid = WRITES_0....
scholar
CREATE TABLE table_24463 ( "Category" text, "Sub-category" text, "Cab size" text, "Drive wheels" text, "Capacity (litres)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the number of cab size for 4 medium tanker
SELECT COUNT("Cab size") FROM table_24463 WHERE "Category" = '4 Medium tanker'
wikisql
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 prescriptions ( subject_id text, hadm_id...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "DIVORCED" AND lab.label = "Sedimentation Rate"
mimicsql_data
CREATE TABLE table_name_64 ( game INTEGER, score VARCHAR, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Score of 118 114, and a Record of 8 1 is what lowest game?
SELECT MIN(game) FROM table_name_64 WHERE score = "118–114" AND record = "8–1"
sql_create_context
CREATE TABLE zyjzjlb ( YLJGDM text, JZLSH text, MZJZLSH text, KH text, KLX number, HZXM text, WDBZ number, RYDJSJ time, RYTJDM number, RYTJMC text, JZKSDM text, JZKSMC text, RZBQDM text, RZBQMC text, RYCWH text, CYKSDM text, CYKSMC text, CYBQDM tex...
SELECT ZYBMLX, ZYZDBM, ZYZDMC FROM zyjzjlb WHERE JZLSH = '99580652501'
css
CREATE TABLE table_13668 ( "Title" text, "Director" text, "Writer" text, "Original airdate" text, "Prod. Code" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who directed the episode with production code 40811-005?
SELECT "Director" FROM table_13668 WHERE "Prod. Code" = '40811-005'
wikisql
CREATE TABLE table_name_52 ( name VARCHAR, title VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who has the title of marquis?
SELECT name FROM table_name_52 WHERE title = "marquis"
sql_create_context
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dob_year < "2168" AND procedures.icd9_code = "66"
mimicsql_data
CREATE TABLE mountain ( mountain_id number, name text, height number, prominence number, range text, country text ) CREATE TABLE climber ( climber_id number, name text, country text, time text, points number, mountain_id number ) -- Using valid SQLite, answer the follo...
SELECT T1.time FROM climber AS T1 JOIN mountain AS T2 ON T1.mountain_id = T2.mountain_id WHERE T2.country = "Uganda"
spider
CREATE TABLE table_15772 ( "Year" text, "Men's singles" text, "Women's singles" text, "Men's doubles" text, "Women's doubles" text, "Mixed doubles" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who won the Men's doubles when there was no compet...
SELECT "Men's doubles" FROM table_15772 WHERE "Men's singles" = 'no competition'
wikisql
CREATE TABLE table_15778392_1 ( song_choice VARCHAR, week__number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT WAS HER SONG CHOICE WHEN THE WEEK WAS TOP 10?
SELECT song_choice FROM table_15778392_1 WHERE week__number = "Top 10"
sql_create_context
CREATE TABLE table_37578 ( "Name" text, "Style" text, "Opened" real, "Manufacturer" text, "Themed Area" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Themed Area has a Name of troublesome trucks runaway coaster?
SELECT "Themed Area" FROM table_37578 WHERE "Name" = 'troublesome trucks runaway coaster'
wikisql
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuo...
SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'excision thyroid lesion') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31325) AND ...
mimic_iii
CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDat...
SELECT OwnerUserId AS "user_link", COUNT(*) AS N FROM Posts WHERE PostTypeId = 1 AND Score < 0 GROUP BY OwnerUserId ORDER BY N DESC LIMIT 1000
sede
CREATE TABLE table_name_6 ( player VARCHAR, goals VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which player has 1299 goals?
SELECT player FROM table_name_6 WHERE goals = "1299"
sql_create_context
CREATE TABLE table_1181375_1 ( notes VARCHAR, withdrawn VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's the notes where withdrawn is 1956 57
SELECT notes FROM table_1181375_1 WHERE withdrawn = "1956–57"
sql_create_context
CREATE TABLE table_61756 ( "Position" real, "Club" text, "Played" real, "Points" real, "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 MIN("Goals for") FROM table_61756 WHERE "Wins" > '15' AND "Goal Difference" > '35'
wikisql
CREATE TABLE table_name_20 ( total INTEGER, year_s__won VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the winning total from 1976?
SELECT MAX(total) FROM table_name_20 WHERE year_s__won = "1976"
sql_create_context
CREATE TABLE table_2312 ( "Country" text, "Contestant" text, "Age" real, "Height (cm)" real, "Height (ft)" text, "Hometown" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What country is the contestant from Chihuahua from?
SELECT "Country" FROM table_2312 WHERE "Hometown" = 'Chihuahua'
wikisql
CREATE TABLE labevents ( row_id number, subject_id number, hadm_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 time ) CREATE TABLE icust...
SELECT SUM(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 = 70267)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'pig...
mimic_iii
CREATE TABLE table_77512 ( "Name" text, "Position" text, "Height" text, "Weight" real, "Year" text, "Home Town" text, "High School" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Home Town with a Name with rob cunningham?
SELECT "Home Town" FROM table_77512 WHERE "Name" = 'rob cunningham'
wikisql
CREATE TABLE table_15683 ( "County" text, "Kerry%" text, "Kerry#" real, "Bush%" text, "Bush#" real, "Others%" text, "Others#" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the value Others% when the value Others# is greater than 147...
SELECT "Others%" FROM table_15683 WHERE "Others#" > '147' AND "Kerry%" = '39.6%'
wikisql
CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversa...
SELECT CAST(TIME_TO_STR(CreationDate, '%Y') AS TEXT) + '-' + CAST(TIME_TO_STR(CreationDate, '%m') AS TEXT) AS "Month", COUNT(*) AS "Count" FROM Posts WHERE PostTypeId = 1 AND OwnerUserId = '##userid##' GROUP BY CAST(TIME_TO_STR(CreationDate, '%Y') AS TEXT) + '-' + CAST(TIME_TO_STR(CreationDate, '%m') AS TEXT) ORDER BY ...
sede
CREATE TABLE table_name_14 ( grüne VARCHAR, rettö VARCHAR, state VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What percent did GR NE get in Tyrol where RETT got 0.6%?
SELECT grüne FROM table_name_14 WHERE rettö = "0.6%" AND state = "tyrol"
sql_create_context
CREATE TABLE table_name_98 ( region__year_ VARCHAR, no_2 VARCHAR, no_10 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what region and year was Jacob the number 2 name and Ryan the number 10 name?
SELECT region__year_ FROM table_name_98 WHERE no_2 = "jacob" AND no_10 = "ryan"
sql_create_context
CREATE TABLE table_76193 ( "Team" text, "Sets+" real, "Sets\u2013" real, "Points+" real, "Points\u2013" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest Sets+ number for Valeriano All s Menorca when the Sets- number was larger than...
SELECT MAX("Sets+") FROM table_76193 WHERE "Team" = 'valeriano allès menorca' AND "Sets\u2013" > '31'
wikisql
CREATE TABLE table_name_1 ( to_par VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the To par, when the Score is 68-71-69=208?
SELECT to_par FROM table_name_1 WHERE score = 68 - 71 - 69 = 208
sql_create_context
CREATE TABLE table_name_24 ( score VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the score for 30 january 2013
SELECT score FROM table_name_24 WHERE date = "30 january 2013"
sql_create_context
CREATE TABLE table_32500 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was Fitzroy's score when they were the away...
SELECT "Away team score" FROM table_32500 WHERE "Away team" = 'fitzroy'
wikisql
CREATE TABLE table_29484 ( "Pos" real, "Grid" real, "Car" real, "Driver" text, "Constructor" text, "Manufacturer" text, "Laps" real, "Laps Led" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the maximum finish...
SELECT MAX("Pos") FROM table_29484 WHERE "Constructor" = 'Joe Gibbs Racing' AND "Driver" = 'Denny Hamlin'
wikisql
CREATE TABLE table_59478 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the tie number of the away game for Ashford Town (Middx)?
SELECT "Tie no" FROM table_59478 WHERE "Away team" = 'ashford town (middx)'
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 prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
SELECT demographic.marital_status, demographic.age FROM demographic WHERE demographic.subject_id = "990"
mimicsql_data
CREATE TABLE table_11622924_1 ( purse__$__ VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How much was the prize in the tournament where the winning score was 289 (9)?
SELECT purse__$__ FROM table_11622924_1 WHERE score = "289 (9)"
sql_create_context
CREATE TABLE table_74236 ( "Song title" text, "Artist" text, "Show" text, "Difficulty" real, "Effort" real, "Year" real, "Dancers" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many shows were in 1994?
SELECT COUNT("Difficulty") FROM table_74236 WHERE "Year" = '1994'
wikisql
CREATE TABLE table_45763 ( "Year" text, "Model" text, "Engine Type / Cyl." text, "Power bhp (kW)" text, "Wheelbase in" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the engine type with a wheelbase of 127 inches in 1915?
SELECT "Engine Type / Cyl." FROM table_45763 WHERE "Wheelbase in" = '127' AND "Year" = '1915'
wikisql
CREATE TABLE table_53049 ( "Raion (district) or City" text, "Total" text, "Ukrainians" text, "Moldovans" text, "Bessarabian Bulgarians" text, "Russians" text, "Gagauzians" text, "Other ethnic groups\u00b2" text ) -- Using valid SQLite, answer the following questions for the tables prov...
SELECT "Moldovans" FROM table_53049 WHERE "Ukrainians" = '14,200'
wikisql
CREATE TABLE table_2168295_1 ( area__km²_ INTEGER, headquarters VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If the headquarters is Bharatpur, what is the maximum area?
SELECT MAX(area__km²_) FROM table_2168295_1 WHERE headquarters = "Bharatpur"
sql_create_context
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 SUM(t_kc22.AMOUNT) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '韩韵诗' AND gwyjzb.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2003-07-31' AND '2013-12-15' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' UNION SELECT SUM(t_kc22.AMOUNT) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb...
css
CREATE TABLE table_name_79 ( date VARCHAR, opponent VARCHAR, stadium VARCHAR, week VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Date has a Stadium of giants stadium, and a Week smaller than 13, and an Opponent of seattle seahawks?
SELECT date FROM table_name_79 WHERE stadium = "giants stadium" AND week < 13 AND opponent = "seattle seahawks"
sql_create_context
CREATE TABLE table_65810 ( "Airing date" text, "English title (Chinese title)" text, "Number of episodes" real, "Genre" text, "Official website" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the airing date of Armed Reaction with 20 episodes...
SELECT "Airing date" FROM table_65810 WHERE "Official website" = 'official website' AND "Number of episodes" = '20' AND "Genre" = 'modern action' AND "English title (Chinese title)" = 'armed reaction 陀槍師姐'
wikisql
CREATE TABLE table_name_1 ( crowd INTEGER, venue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the lowest crowd size at MCG?
SELECT MIN(crowd) FROM table_name_1 WHERE venue = "mcg"
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2109" AND prescriptions.drug = "NORepinephrine"
mimicsql_data
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 AVG(demographic.age) FROM demographic WHERE demographic.days_stay = "26" AND demographic.admityear >= "2105"
mimicsql_data
CREATE TABLE table_name_47 ( time_retired VARCHAR, laps VARCHAR, grid VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Time/Retired for laps higher than 52 on a grid larger than 21?
SELECT time_retired FROM table_name_47 WHERE laps > 52 AND grid > 21
sql_create_context
CREATE TABLE table_21063459_1 ( opponent VARCHAR, result VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who did the team play against in the game that resulted with a loss?
SELECT opponent FROM table_21063459_1 WHERE result = "Loss"
sql_create_context
CREATE TABLE table_name_43 ( country VARCHAR, director_s_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Country has a Director of 2007?
SELECT country FROM table_name_43 WHERE director_s_ = "2007"
sql_create_context
CREATE TABLE table_name_50 ( competition VARCHAR, date VARCHAR, result VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Competition has a Result of w, and a Score of 2-0, and a Date of may 9, 1954?
SELECT competition FROM table_name_50 WHERE result = "w" AND score = "2-0" AND date = "may 9, 1954"
sql_create_context
CREATE TABLE table_41255 ( "Advocate # 1" text, "Advocate # 2" text, "Root of All Evil" text, "Poll winner" text, "Original air date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Root of All Evil with an Original air date that is septe...
SELECT "Root of All Evil" FROM table_41255 WHERE "Original air date" = 'september 3, 2008'
wikisql
CREATE TABLE table_name_82 ( game VARCHAR, year VARCHAR, genre VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What game was before 2010 and was a role-playing game?
SELECT game FROM table_name_82 WHERE year < 2010 AND genre = "role-playing game"
sql_create_context
CREATE TABLE bdmzjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH number, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZD...
SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb 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 AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jy...
css
CREATE TABLE table_name_82 ( wins INTEGER, points VARCHAR, rank VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Points of 26, and a Rank smaller than 27 had what sum of wins?
SELECT SUM(wins) FROM table_name_82 WHERE points = 26 AND rank < 27
sql_create_context