instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_58900 ( "Glenelg FL" text, "Wins" real, "Byes" real, "Losses" real, "Draws" real, "Against" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many wins were there when the byes were more than 3?
SELECT COUNT("Wins") FROM table_58900 WHERE "Byes" > '3'
wikisql
CREATE TABLE table_4329 ( "Heat Rank" real, "Lane" real, "Swimmer" text, "Country" text, "Time" real, "Overall Rank" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the overall rank for heat rank of 8
SELECT "Overall Rank" FROM table_4329 WHERE "Heat Rank" = '8'
wikisql
CREATE TABLE table_41268 ( "Rider" text, "Bike" text, "Laps" real, "Time" text, "Grid" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What kind of bike had a grid less than 23, an accident under time, and Graeme Gowland as a rider?
SELECT "Bike" FROM table_41268 WHERE "Grid" < '23' AND "Time" = 'accident' AND "Rider" = 'graeme gowland'
wikisql
CREATE TABLE table_74553 ( "Date" text, "Opponent" text, "Venue" text, "Result" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the attendance rate for the Middlesbrough opponent?
SELECT "Attendance" FROM table_74553 WHERE "Opponent" = 'middlesbrough'
wikisql
CREATE TABLE table_name_42 ( city VARCHAR, airport VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what city is the toamasina airport in?
SELECT city FROM table_name_42 WHERE airport = "toamasina airport"
sql_create_context
CREATE TABLE table_57467 ( "Election" text, "1st Member" text, "1st Party" text, "2nd Member" text, "2nd Party" text, "3rd Member" text, "3rd Party" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What 3rd Member had 2nd Member of University ...
SELECT "3rd Member" FROM table_57467 WHERE "2nd Member" = 'university constituencies abolished'
wikisql
CREATE TABLE table_name_57 ( chassis VARCHAR, entrant VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Chassis did the Entrant clarke-mordaunt-guthrie-durlacher carry?
SELECT chassis FROM table_name_57 WHERE entrant = "clarke-mordaunt-guthrie-durlacher"
sql_create_context
CREATE TABLE table_name_67 ( bronze VARCHAR, silver VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When Iceland gets the Silver, who gets the Bronze?
SELECT bronze FROM table_name_67 WHERE silver = "iceland"
sql_create_context
CREATE TABLE table_53786 ( "Team" text, "Season" text, "Regular Season" real, "Postseason" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many total wins do the Texas Tech Red Raiders have including the 7 regular season wins?
SELECT MAX("Total") FROM table_53786 WHERE "Team" = 'texas tech red raiders' AND "Regular Season" > '7'
wikisql
CREATE TABLE table_15040_8 ( spanish VARCHAR, french VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Spanish word for the French word filtrer?
SELECT spanish FROM table_15040_8 WHERE french = "filtrer"
sql_create_context
CREATE TABLE table_name_15 ( title VARCHAR, year VARCHAR, genre VARCHAR, result VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which title's genre was jazz when it was nominated in 1996?
SELECT title FROM table_name_15 WHERE genre = "jazz" AND result = "nominated" AND year = "1996"
sql_create_context
CREATE TABLE table_13263 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many Bronzes have a Rank of 9, and a Silver larger than 2?
SELECT SUM("Bronze") FROM table_13263 WHERE "Rank" = '9' AND "Silver" > '2'
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 countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), ...
SELECT JOB_ID, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY JOB_ID
nvbench
CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, ...
SELECT COUNT(*) > 0 FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 19059)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp [syst...
mimic_iii
CREATE TABLE table_name_4 ( route_of_administration VARCHAR, status VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the route of administration that has several ongoing and complete?
SELECT route_of_administration FROM table_name_4 WHERE status = "several ongoing and complete"
sql_create_context
CREATE TABLE table_35167 ( "Game" real, "Date" text, "Opponent" text, "Result" text, "76ers points" real, "Opponent points" real, "Record" text, "Streak" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Date has a Streak of lost 1, a...
SELECT "Date" FROM table_35167 WHERE "Streak" = 'lost 1' AND "76ers points" < '94' AND "Game" > '13' AND "Record" = '14-40'
wikisql
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 hz_info JOIN mzjzjlb JOIN person_info_hz_info JOIN person_info ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND person_info_hz_info.YLJGDM = hz_info.YLJGDM AND person_in...
css
CREATE TABLE table_name_24 ( score VARCHAR, visitor VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the score of the game on November 12 with the Chicago Black Hawks as the visitor team?
SELECT score FROM table_name_24 WHERE visitor = "chicago black hawks" AND date = "november 12"
sql_create_context
CREATE TABLE table_43887 ( "Year" real, "Category" text, "Genre" text, "Title" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT IS THE RESULT FOR 2003, IN best urban/alternative performance?
SELECT "Result" FROM table_43887 WHERE "Year" = '2003' AND "Category" = 'best urban/alternative performance'
wikisql
CREATE TABLE table_32469 ( "Date" text, "Result" text, "Score" text, "Stadium" text, "City" text, "Crowd" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the result of the game at Odsal Stadium?
SELECT "Result" FROM table_32469 WHERE "Stadium" = 'odsal stadium'
wikisql
CREATE TABLE table_13036251_1 ( the_mole VARCHAR, airdate VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's the the mole with airdate being 5 january 2012
SELECT COUNT(the_mole) FROM table_13036251_1 WHERE airdate = "5 January 2012"
sql_create_context
CREATE TABLE Allergy_Type ( Allergy VARCHAR(20), AllergyType VARCHAR(20) ) CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE TABLE Has_Allergy ( StuID INTEGE...
SELECT AllergyType, COUNT(AllergyType) FROM Allergy_Type GROUP BY AllergyType ORDER BY AllergyType
nvbench
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 airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE time_int...
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 = 'ATLANTA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIM...
atis
CREATE TABLE table_10936 ( "Round" text, "Pick" text, "Player" text, "Nationality" text, "School" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which nationality does Florida Tech have?
SELECT "Nationality" FROM table_10936 WHERE "School" = 'florida tech'
wikisql
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.age < "89"
mimicsql_data
CREATE TABLE Students ( student_id INTEGER, date_of_registration DATETIME, date_of_latest_logon DATETIME, login_name VARCHAR(40), password VARCHAR(10), personal_name VARCHAR(40), middle_name VARCHAR(40), family_name VARCHAR(40) ) CREATE TABLE Student_Tests_Taken ( registration_id IN...
SELECT date_of_enrolment, COUNT(date_of_enrolment) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Pass" GROUP BY date_of_enrolment ORDER BY date_of_enrolment
nvbench
CREATE TABLE table_name_12 ( first VARCHAR, surname VARCHAR, position VARCHAR, uni_number VARCHAR, throws VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which First has a Uni # larger than 34, and Throws of r, and a Position of rhp, and a Surname...
SELECT first FROM table_name_12 WHERE uni_number > 34 AND throws = "r" AND position = "rhp" AND surname = "stockman"
sql_create_context
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE transfers ( row_id number, subject_id number, ...
SELECT labevents.charttime FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 32153) AND DATETIME(labevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') AND STRFTIME('%m', labevents.charttime) = '12' ORDER BY labevents...
mimic_iii
CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, maximum_stay int, application text, no_discounts text ) CREATE ...
SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'NASHVILLE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.ci...
atis
CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE flight ( aircraft_code_sequence text, airline_code varchar, airline_flight text, arrival_time int, connections int, departure_time int, dual_carrier text, flight_days text, flight_id...
SELECT DISTINCT airline.airline_code FROM airline, 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 = 'TORONTO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_n...
atis
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 person_info.XM FROM person_info JOIN hz_info JOIN zyjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND zyjzjlb.YLJGDM = jybgb.YLJGDM_ZYJZJLB AND zyjzjlb.JZLSH = jybgb.JZLSH_ZYJZJLB WHERE jybgb.BGDH = '36585431258'
css
CREATE TABLE table_18600760_1 ( land___sqmi__ VARCHAR, township VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the land for ada
SELECT COUNT(land___sqmi__) FROM table_18600760_1 WHERE township = "Ada"
sql_create_context
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 course_offering.end_time, course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.start_time, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday FROM semester INNER JOIN course_offering ON semester.semester_id = course_o...
advising
CREATE TABLE table_name_38 ( kk___5 VARCHAR, kk___3 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is KK -5 if KK - 3 is 310?
SELECT kk___5 FROM table_name_38 WHERE kk___3 = "310"
sql_create_context
CREATE TABLE table_204_691 ( id number, "date" text, "round" text, "opponent" text, "venue" text, "result" text, "attendance" number, "scorers" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who scored more goals : mccoist or hateley ?
SELECT "scorers" FROM table_204_691 WHERE "scorers" IN ('mccoist', 'hateley') GROUP BY "scorers" ORDER BY COUNT(*) DESC LIMIT 1
squall
CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text, ZYLBDM text, ZYMC text ) CREATE TABLE ftxmzjzjlb ( HXPLC number, HZ...
SELECT jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM txmzjzjlb JOIN jybgb JOIN jyjgzbb ON txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE txmzjzjlb.JZZDBM = 'E91.673' AND jyjgzbb.JCZBMC = '苯妥因' UNION SELECT jyjgzbb.CKZFWXX, ...
css
CREATE TABLE table_29047 ( "Date" text, "Time" text, "Visiting team" text, "Home team" text, "Site" text, "Broadcast" text, "Result" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the result in the game where ...
SELECT "Result" FROM table_29047 WHERE "Visiting team" = 'Louisiana-Monroe'
wikisql
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Malfunc oth device/graft" AND lab.label = "Urea Nitrogen"
mimicsql_data
CREATE TABLE table_name_57 ( crowd INTEGER, away_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the lowest crowd seen at a game that Richmond was the Away team in?
SELECT MIN(crowd) FROM table_name_57 WHERE away_team = "richmond"
sql_create_context
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, ZZBZ number, WDBZ number, JZKSBM text, JZKSMC text, JZKSRQ time, ...
SELECT mzjzjlb.JZLSH FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.RYBH = '18784112' AND hz_info.YLJGDM = '0131624' AND mzjzjlb.JZKSMC LIKE '%神外%'
css
CREATE TABLE table_1475 ( "Player" text, "VFL Games" real, "VFL Club(s)" text, "Rank held at time of death" text, "Date of death" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What vfl club(s) for players ranked sergeant, 8th b...
SELECT "VFL Club(s)" FROM table_1475 WHERE "Rank held at time of death" = 'Sergeant, 8th Brigade Australian Field Artillery'
wikisql
CREATE TABLE table_name_63 ( lost VARCHAR, against VARCHAR, played VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Lost has an Against of 49 and a Played smaller than 20?
SELECT COUNT(lost) FROM table_name_63 WHERE against = 49 AND played < 20
sql_create_context
CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime time ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_...
SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 73075) AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') AND STRFTIME('%m', prescriptions.startdate) = '12'
mimic_iii
CREATE TABLE t_kc21_t_kc22 ( MED_CLINIC_ID text, MED_EXP_DET_ID number ) 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, H...
SELECT t_kc21.MAIN_COND_DES FROM t_kc21 WHERE t_kc21.MED_CLINIC_ID = '85614606716'
css
CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text, meter_300 text, meter_400 text, meter_500 text, meter_600 text, meter_700 text, Time text ) CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE...
SELECT meter_600, meter_100 FROM swimmer ORDER BY meter_600 DESC
nvbench
CREATE TABLE table_12969 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( $ )" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What country is Steve Jones from?
SELECT "Country" FROM table_12969 WHERE "Player" = 'steve jones'
wikisql
CREATE TABLE ship ( TYPE VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show different types of ships and the number of ships of each type.
SELECT TYPE, COUNT(*) FROM ship GROUP BY TYPE
sql_create_context
CREATE TABLE table_51284 ( "Pick #" real, "Player" text, "Nationality" text, "Position" text, "League from" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What pick was Scott Glennie from the Western hockey league
SELECT "Pick #" FROM table_51284 WHERE "League from" = 'western hockey league' AND "Player" = 'scott glennie'
wikisql
CREATE TABLE Purchases ( purchase_transaction_id INTEGER, purchase_details VARCHAR(255) ) CREATE TABLE Ref_Transaction_Types ( transaction_type_code VARCHAR(10), transaction_type_description VARCHAR(80) ) CREATE TABLE Investors ( investor_id INTEGER, Investor_details VARCHAR(255) ) CREATE TAB...
SELECT date_of_transaction, COUNT(date_of_transaction) FROM Transactions WHERE share_count >= 100 OR amount_of_transaction >= 100 ORDER BY date_of_transaction DESC
nvbench
CREATE TABLE table_21828 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Series" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name t...
SELECT "Date" FROM table_21828 WHERE "Series" = '2-2'
wikisql
CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text ) CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Per...
SELECT All_Home, School_ID FROM basketball_match GROUP BY ACC_Home, All_Home ORDER BY School_ID DESC
nvbench
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) 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.JZZDBM = 'B99.606' AND jyjgzbb.JCZBMC = '促甲状腺激素'
css
CREATE TABLE table_28111 ( "Series #" real, "Season #" real, "Title" text, "Director" text, "Writer(s)" text, "Airdate" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who wrote the episode that aired December 1, 1956?
SELECT "Writer(s)" FROM table_28111 WHERE "Airdate" = 'December 1, 1956'
wikisql
CREATE TABLE table_train_17 ( "id" int, "severe_sepsis" bool, "mean_arterial_pressure_map" int, "peripheral_vascular_disease" bool, "septic_shock" bool, "age" float, "NOUSE" float ) -- Using valid SQLite, answer the following questions for the tables provided above. -- age > or = 18 years...
SELECT * FROM table_train_17 WHERE age >= 18
criteria2sql
CREATE TABLE table_19982699_1 ( _number VARCHAR, director VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many total number have robert young as the director?
SELECT COUNT(_number) FROM table_19982699_1 WHERE director = "Robert Young"
sql_create_context
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
SELECT jyjgzbb.JYZBLSH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_jybgb 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 = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_...
css
CREATE TABLE table_24206 ( "Game" real, "Date" text, "Opponent" text, "Result" text, "Cowboys points" real, "Opponents" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many points did the Cowboys have when they had a 7-0 re...
SELECT "Cowboys points" FROM table_24206 WHERE "Record" = '7-0'
wikisql
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellv...
SELECT MAX(patient.admissionweight) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-29746') AND NOT patient.admissionweight IS NULL AND STRFTIME('%y-%m', patient.unitadmittime) = '2104-03' GROUP BY STRFTIME('%y-%m-%d', patient...
eicu
CREATE TABLE table_name_95 ( year INTEGER, venue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What year did she compete in tampere, finland?
SELECT AVG(year) FROM table_name_95 WHERE venue = "tampere, finland"
sql_create_context
CREATE TABLE table_18754 ( "Frequency" text, "Call sign" text, "Name" text, "Format" text, "Owner" text, "Target city/ market" text, "City of license" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of Rapid City's Adult Cont...
SELECT "Name" FROM table_18754 WHERE "City of license" = 'Rapid City' AND "Format" = 'Adult Contemporary'
wikisql
CREATE TABLE table_12108_1 ( population VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the population where the area (sq. mi.) is area (sq. mi.)?
SELECT population FROM table_12108_1 WHERE "area__sq_mi_" = "area__sq_mi_"
sql_create_context
CREATE TABLE table_73926 ( "Episode" text, "Theme" text, "Song choice" text, "Original artist" text, "Order #" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In episode Top 16 (8 Men), what are the themes?
SELECT "Theme" FROM table_73926 WHERE "Episode" = 'Top 16 (8 Men)'
wikisql
CREATE TABLE table_34721 ( "Name" text, "Status" text, "Population" real, "District" text, "Former local authority" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Status of Mexborough?
SELECT "Status" FROM table_34721 WHERE "Name" = 'mexborough'
wikisql
CREATE TABLE table_39311 ( "Name" text, "GP-GS" text, "Effic" real, "Att-Cmp-Int" text, "Avg/G" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who averaged 201.3 yards passing per game?
SELECT "Name" FROM table_39311 WHERE "Avg/G" = '201.3'
wikisql
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "DEAD/EXPIRED" AND demographic.admityear < "2139"
mimicsql_data
CREATE TABLE player ( Player_ID int, Sponsor_name text, Player_name text, Gender text, Residence text, Occupation text, Votes int, Rank text ) CREATE TABLE match_result ( Rank int, Club_ID int, Gold int, Big_Silver int, Small_Silver int, Bronze int, Points in...
SELECT Occupation, COUNT(Occupation) FROM player GROUP BY Occupation ORDER BY Occupation DESC
nvbench
CREATE TABLE table_26614365_1 ( latin VARCHAR, english VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Latin for 'you sang'?
SELECT latin FROM table_26614365_1 WHERE english = "you sang"
sql_create_context
CREATE TABLE mzb ( 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 AVG(t_kc22.SELF_PAY_PRO) FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.MED_SER_ORG_NO = '7490542' AND t_kc22.STA_DATE BETWEEN '2009-02-14' AND '2016-04-20' UNION SELECT AVG(t_kc22.SELF_PAY_PRO) FROM gyb JOIN t_kc22 ON gyb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gyb.MED_SER_ORG_NO ...
css
CREATE TABLE table_22998777_1 ( team VARCHAR, poles VARCHAR, series VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If the series is ADAC GT Masters and poles is 1, what is the name of the team?
SELECT team FROM table_22998777_1 WHERE poles = 1 AND series = "ADAC GT Masters"
sql_create_context
CREATE TABLE table_65752 ( "Frequency" text, "Call sign" text, "Format" text, "Owner" text, "Notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Notes of the Frequency with a call sign of CBUE-FM?
SELECT "Notes" FROM table_65752 WHERE "Call sign" = 'cbue-fm'
wikisql
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) ...
SELECT SUM(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 739)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label...
mimic_iii
CREATE TABLE table_name_7 ( tournament VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which tournament was played on October 1, 2006?
SELECT tournament FROM table_name_7 WHERE date = "october 1, 2006"
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "F" AND diagnoses.short_title = "Gram-neg septicemia NEC"
mimicsql_data
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 treatment.treatmentname FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-94542')) AND STRFTIME('%y', treatment.treatmenttime) <= '2104...
eicu
CREATE TABLE election ( Delegate VARCHAR, Committee VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show the delegate and committee information of elections.
SELECT Delegate, Committee FROM election
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.expire_flag = "1" AND prescriptions.drug = "Sodium CITRATE 4%"
mimicsql_data
CREATE TABLE table_name_52 ( played INTEGER, points VARCHAR, wins VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest played number when points are larger than 32, and a wins are larger than 18?
SELECT MIN(played) FROM table_name_52 WHERE points > 32 AND wins > 18
sql_create_context
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 allergy ( allergy...
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 = '013-33898') AND patient.unitdischargetime IS NULL) ...
eicu
CREATE TABLE Staff ( first_name VARCHAR, middle_name VARCHAR, last_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- List the first name middle name and last name of all staff.
SELECT first_name, middle_name, last_name FROM Staff
sql_create_context
CREATE TABLE table_39375 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Leading scorer" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which record was for Warriors at home?
SELECT "Record" FROM table_39375 WHERE "Home" = 'warriors'
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_location = "TRANSFER FROM HOSP/EXTRAM" AND prescriptions.formulary_drug_cd = "PHEN100IVPB"
mimicsql_data
CREATE TABLE hz_info_zyjzjlb ( JZLSH number, YLJGDM number, zyjzjlb_id number ) CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, ...
SELECT zyjzjlb.ZYZDBM, zyjzjlb.ZYZDMC FROM hz_info JOIN zyjzjlb JOIN hz_info_zyjzjlb ON hz_info.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLS...
css
CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE course ( course_id int, name varchar, department varchar, number varchar, credits varchar, advisory_requirement varchar, enforced_requirement varchar, description v...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.credits = 3 AND program_course.category LIKE 'ULCS'
advising
CREATE TABLE table_test_10 ( "id" int, "left_ventricular_ejection_fraction_lvef" int, "systolic_blood_pressure_sbp" int, "immunosuppressive_disease" bool, "systolic_arterial_pressure_sap" int, "lymphomas" bool, "left_ventricular_dysfunction" bool, "tissue_hypoperfusion" bool, "heart_...
SELECT * FROM table_test_10 WHERE renal_disease = 1 OR serum_creatinine > 120
criteria2sql
CREATE TABLE table_15697 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the record as of July 22?
SELECT "Record" FROM table_15697 WHERE "Date" = 'july 22'
wikisql
CREATE TABLE table_20942925_1 ( directed_by VARCHAR, _number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many directors for #15?
SELECT COUNT(directed_by) FROM table_20942925_1 WHERE _number = 15
sql_create_context
CREATE TABLE table_33154 ( "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 the away team's score when the home tea...
SELECT "Away team score" FROM table_33154 WHERE "Home team score" = '16.14 (110)'
wikisql
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "HOME" AND procedures.long_title = "Percutaneous aspiration of liver"
mimicsql_data
CREATE TABLE table_16570286_2 ( matches VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many numbers were recorde under 50s when there was 2 matches?
SELECT COUNT(50 AS s) FROM table_16570286_2 WHERE matches = 2
sql_create_context
CREATE TABLE table_22993636_2 ( sec_wins VARCHAR, overall_record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many different SEC Win counts does the team with an overall record of 30-4 have?
SELECT COUNT(sec_wins) FROM table_22993636_2 WHERE overall_record = "30-4"
sql_create_context
CREATE TABLE station ( id INTEGER, name TEXT, lat NUMERIC, long NUMERIC, dock_count INTEGER, city TEXT, installation_date TEXT ) CREATE TABLE status ( station_id INTEGER, bikes_available INTEGER, docks_available INTEGER, time TEXT ) CREATE TABLE trip ( id INTEGER, d...
SELECT date, COUNT(date) FROM weather WHERE min_dew_point_f < (SELECT MIN(min_dew_point_f) FROM weather WHERE zip_code = 94107) GROUP BY date
nvbench
CREATE TABLE table_204_910 ( id number, "rank" number, "name" text, "nationality" text, "result" number, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the number of different nationalities represented by the top 5 athletes ?
SELECT COUNT(DISTINCT "nationality") FROM table_204_910 WHERE id <= 5
squall
CREATE TABLE table_name_43 ( position VARCHAR, nhl_team VARCHAR, pick__number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What position in the Vancouver Canucks has a Pick # of 101?
SELECT position FROM table_name_43 WHERE nhl_team = "vancouver canucks" AND pick__number = "101"
sql_create_context
CREATE TABLE table_10528691_4 ( model INTEGER, introduction VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the model number introduced May 1999?
SELECT MAX(model) FROM table_10528691_4 WHERE introduction = "May 1999"
sql_create_context
CREATE TABLE table_74869 ( "Team" text, "Class" text, "Chassis" text, "Engine" text, "Driver" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the team whose class is Rotax Light?
SELECT "Team" FROM table_74869 WHERE "Class" = 'rotax light'
wikisql
CREATE TABLE table_74435 ( "Pick #" real, "MLS team" text, "Player" text, "Position" text, "Affiliation" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What MLS team picked Babayele Sodade?
SELECT "MLS team" FROM table_74435 WHERE "Player" = 'Babayele Sodade'
wikisql
CREATE TABLE table_dev_21 ( "id" int, "gender" string, "leukopenia" int, "dialysis" bool, "hemoglobin_a1c_hba1c" float, "cd4_count" int, "platelets" int, "renal_disease" bool, "fasting_triglycerides" int, "hyperlipidemia" bool, "lymphopenia" int, "hba1c" float, "fasti...
SELECT * FROM table_dev_21 WHERE renal_disease = 1 OR (serum_creatinine >= 1.4 AND gender = 'female') OR (serum_creatinine >= 1.5 AND gender = 'male') OR dialysis = 1
criteria2sql
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
SELECT COUNT(*) FROM (SELECT t_kc21.MED_ORG_DEPT_CD FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '3731061' GROUP BY t_kc21.MED_ORG_DEPT_CD HAVING MAX(t_kc21.IN_HOSP_DAYS) < 8) AS T
css
CREATE TABLE gas_station ( station_id number, open_year number, location text, manager_name text, vice_manager_name text, representative_name text ) CREATE TABLE company ( company_id number, rank number, company text, headquarters text, main_industry text, sales_billion ...
SELECT company, headquarters FROM company ORDER BY market_value DESC
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2103" AND prescriptions.drug_type = "BASE"
mimicsql_data