instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_204_111 ( id number, "name" text, "animal type" text, "introduced" number, "reintroduced" text, "retired" number, "beanie baby resembled" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which is the only pillow pal without ...
SELECT "name" FROM table_204_111 WHERE "animal type" IS NULL
squall
CREATE TABLE table_72921 ( "School" text, "Est. Denotes original date of establishment of the school, changes in name and/or location noted in corresponding ootnote" real, "Location Denotes location of school by Seattle neighborhood, does not necessary correspond with attendance area" text, "Nickname" t...
SELECT "Location Denotes location of school by Seattle neighborhood, does not necessary correspond with attendance area" FROM table_72921 WHERE "School" = 'Eckstein'
wikisql
CREATE TABLE film ( Film_ID int, Rank_in_series int, Number_in_season int, Title text, Directed_by text, Original_air_date text, Production_code text ) CREATE TABLE cinema ( Cinema_ID int, Name text, Openning_year int, Capacity int, Location text ) CREATE TABLE schedule...
SELECT Directed_by, COUNT(*) FROM film GROUP BY Directed_by ORDER BY Directed_by DESC
nvbench
CREATE TABLE table_name_85 ( date VARCHAR, home_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What date did the home team of footscray play?
SELECT date FROM table_name_85 WHERE home_team = "footscray"
sql_create_context
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CRE...
SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT lab.patientunitstayid FROM lab WHERE lab.labname = 'mch')) AND STRFTIME('%y', cost.chargetime) >= '2102' GROUP BY cost.p...
eicu
CREATE TABLE table_35494 ( "Date" text, "Tournament" text, "Surface" text, "Opponen" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which tournament happened on september 25, 2006?
SELECT "Tournament" FROM table_35494 WHERE "Date" = 'september 25, 2006'
wikisql
CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE i...
SELECT COUNT(DISTINCT icustays.icustay_id) FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 15119 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1)
mimic_iii
CREATE TABLE table_64771 ( "Band" real, "Frequency (MHz)" text, "Wavelength" text, "Type" text, "Power (W)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Band number has a Power (W) of 400 or less?
SELECT SUM("Band") FROM table_64771 WHERE "Power (W)" < '400'
wikisql
CREATE TABLE table_name_61 ( prime_mover VARCHAR, model VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which prime mover had a Model of rs-18?
SELECT prime_mover FROM table_name_61 WHERE model = "rs-18"
sql_create_context
CREATE TABLE table_6643 ( "Club" text, "Played" 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 following questions fo...
SELECT "Lost" FROM table_6643 WHERE "Club" = 'mumbles rfc'
wikisql
CREATE TABLE Minor_in ( StuID INTEGER, DNO INTEGER ) CREATE TABLE Member_of ( FacID INTEGER, DNO INTEGER, Appt_Type VARCHAR(15) ) CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, ...
SELECT Days, COUNT(Days) FROM Course GROUP BY Days ORDER BY Credits
nvbench
CREATE TABLE table_name_94 ( years_for_grizzlies VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are years that Obinna Ekezie played for the Grizzlies?
SELECT years_for_grizzlies FROM table_name_94 WHERE player = "obinna ekezie"
sql_create_context
CREATE TABLE table_dev_32 ( "id" int, "post_challenge_capillary_glucose" int, "gender" string, "blood_donation" bool, "untreated_hyperlipidemia" bool, "hemoglobin_a1c_hba1c" float, "hematocrit_hct" float, "fasting_triglycerides" int, "fasting_blood_glucose_fbg" float, "fasting_pl...
SELECT * FROM table_dev_32 WHERE (baseline_hemoglobin_hgb < 10.5 AND gender = 'female') OR (baseline_hemoglobin_hgb < 12.5 AND gender = 'male') AND blood_donation = 1
criteria2sql
CREATE TABLE table_28137918_5 ( new_adherents_per_year INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the least amount of new adherents per year
SELECT MIN(new_adherents_per_year) FROM table_28137918_5
sql_create_context
CREATE TABLE table_22733 ( "State and District of Columbia" text, "Obese adults" text, "Overweight (incl. obese) adults" text, "Obese children and adolescents" text, "Obesity rank" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many states or Di...
SELECT COUNT("State and District of Columbia") FROM table_22733 WHERE "Overweight (incl. obese) adults" = '65.4%'
wikisql
CREATE TABLE table_18052353_4 ( state_assembly VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the composition of the state assembly in 2008?
SELECT state_assembly FROM table_18052353_4 WHERE year = "2008"
sql_create_context
CREATE TABLE table_54884 ( "Candidate" text, "Total Receipts" real, "Loans Received" real, "Receipts w/o Loans" real, "Money Spent" real, "Cash On Hand" real, "Total Debt" text, "Cash on Hand Minus Debt" real ) -- Using valid SQLite, answer the following questions for the tables provid...
SELECT MIN("Money Spent") FROM table_54884 WHERE "Total Debt" = '374,164' AND "Receipts w/o Loans" > '3,898,226'
wikisql
CREATE TABLE table_name_44 ( week INTEGER, result VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Week of the game with a Result of L 24-0?
SELECT MAX(week) FROM table_name_44 WHERE result = "l 24-0"
sql_create_context
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE patient ( uniquepid text, patientheal...
SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-34558')) AND DATETIME(medication.drugstarttime) >= DATETIME(CUR...
eicu
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 ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND prescriptions.formulary_drug_cd = "WARF5"
mimicsql_data
CREATE TABLE table_name_81 ( record VARCHAR, score VARCHAR, points VARCHAR, february VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Record has a Points smaller than 62 and a February larger than 16, and a Score of 8 7?
SELECT record FROM table_name_81 WHERE points < 62 AND february > 16 AND score = "8–7"
sql_create_context
CREATE TABLE table_204_801 ( id number, "year" number, "derby\nwinner" text, "galaxy" number, "draw" number, "chivas" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- in what year did chivas have the same number of wins as in 2012 ?
SELECT "year" FROM table_204_801 WHERE "year" <> 2012 AND "chivas" = (SELECT "chivas" FROM table_204_801 WHERE "year" = 2012)
squall
CREATE TABLE table_1601792_4 ( transmitted VARCHAR, frequency VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many stations are transmitted on frequency 7 uhf?
SELECT COUNT(transmitted) FROM table_1601792_4 WHERE frequency = "7 UHF"
sql_create_context
CREATE TABLE table_name_51 ( margin_of_victory VARCHAR, runner_s__up VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the margin of victory over Brad Faxon?
SELECT margin_of_victory FROM table_name_51 WHERE runner_s__up = "brad faxon"
sql_create_context
CREATE TABLE table_name_84 ( recorded VARCHAR, translation VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the record for Brussels translations?
SELECT recorded FROM table_name_84 WHERE translation = "brussels"
sql_create_context
CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId n...
SELECT TOP(1500) AS Id, DisplayName, Age, Reputation, CreationDate, LastAccessDate, 'http://stackoverflow.com/users/' + CAST(Id AS VARCHAR) AS Url FROM Users WHERE NOT Age IS NULL AND Reputation > 1 ORDER BY Age DESC, Reputation DESC
sede
CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE departments ( DEP...
SELECT JOB_ID, AVG(DEPARTMENT_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY AVG(DEPARTMENT_ID) DESC
nvbench
CREATE TABLE table_18519 ( "District" text, "Incumbent" text, "Party" text, "First elected" text, "Result" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the result in the election where the incumbent was first electe...
SELECT "Result" FROM table_18519 WHERE "First elected" = '1942'
wikisql
CREATE TABLE table_77999 ( "Round" text, "Date" text, "Opponent" text, "Venue" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Venue with a Date with 14 april 2002?
SELECT "Venue" FROM table_77999 WHERE "Date" = '14 april 2002'
wikisql
CREATE TABLE compartment_class ( compartment varchar, class_type varchar ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE time_zone ( time_zone_code tex...
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 = 'NASHVILLE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SEAT...
atis
CREATE TABLE table_28243691_2 ( institution VARCHAR, location VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What school is located in Huntsville, Texas?
SELECT institution FROM table_28243691_2 WHERE location = "Huntsville, Texas"
sql_create_context
CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credit int, total_gpa float, entered_as ...
SELECT DISTINCT department, name, number FROM course WHERE (description LIKE '%Meth Res Physiology%' OR name LIKE '%Meth Res Physiology%') AND credits = 9
advising
CREATE TABLE table_12232526_2 ( hull_numbers INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the maximum number of hull numbers?
SELECT MAX(hull_numbers) FROM table_12232526_2
sql_create_context
CREATE TABLE table_11690135_1 ( interview VARCHAR, country VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many interviews were there for Miss Virginia?
SELECT COUNT(interview) FROM table_11690135_1 WHERE country = "Virginia"
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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.language = "SPAN" AND demographic.dob_year < "2052"
mimicsql_data
CREATE TABLE table_name_29 ( length VARCHAR, junctions VARCHAR, route_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the length of route FM 2895 with junctions sh 359 us 59?
SELECT length FROM table_name_29 WHERE junctions = "sh 359 us 59" AND route_name = "fm 2895"
sql_create_context
CREATE TABLE table_43214 ( "Rank" real, "Name" text, "Span metres" real, "Span feet" real, "Material" text, "Year opened" text, "Country" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which country's material was concrete when the span metr...
SELECT "Country" FROM table_43214 WHERE "Material" = 'concrete' AND "Span metres" < '270' AND "Span feet" > '837' AND "Year opened" = '1943'
wikisql
CREATE TABLE table_name_56 ( tries_against VARCHAR, tries_for VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Tries Against, when Tries For is 21?
SELECT tries_against FROM table_name_56 WHERE tries_for = "21"
sql_create_context
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, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZZMC ...
SELECT jybgb.BBDM, jybgb.BBMC, jybgb.BBZT FROM jybgb WHERE jybgb.BGDH = '07088619663'
css
CREATE TABLE endowment ( endowment_id int, School_id int, donator_name text, amount real ) CREATE TABLE budget ( School_id int, Year int, Budgeted int, total_budget_percent_budgeted real, Invested int, total_budget_percent_invested real, Budget_invested_percent text ) CREAT...
SELECT County, SUM(Enrollment) FROM School GROUP BY County ORDER BY SUM(Enrollment)
nvbench
CREATE TABLE table_25926120_3 ( awardee_s_ VARCHAR, name_of_award VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who won best actress?
SELECT awardee_s_ FROM table_25926120_3 WHERE name_of_award = "Best Actress"
sql_create_context
CREATE TABLE table_57765 ( "Heat." real, "Race Title" text, "Circuit" text, "Location / State" text, "Date" text, "Winner" text, "Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the location/state of the race on 16 Jun?
SELECT "Location / State" FROM table_57765 WHERE "Date" = '16 jun'
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 qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_NM = '王霞英' AND NOT qtb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT <= 689.98) UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_NM = '王霞英' AND NOT gyb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT...
css
CREATE TABLE table_name_3 ( mall_name VARCHAR, stores VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Mall has 140 stores?
SELECT mall_name FROM table_name_3 WHERE stores = "140"
sql_create_context
CREATE TABLE table_name_39 ( poles INTEGER, points VARCHAR, class VARCHAR, team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many Poles have a Class of 125cc, and a Team of matteoni racing team, and Points larger than 3?
SELECT SUM(poles) FROM table_name_39 WHERE class = "125cc" AND team = "matteoni racing team" AND points > 3
sql_create_context
CREATE TABLE table_name_28 ( money___ VARCHAR, to_par VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the amount of money that a +5 to par with a score of 76-69-70-70=285?
SELECT COUNT(money___) AS $__ FROM table_name_28 WHERE to_par = "+5" AND score = 76 - 69 - 70 - 70 = 285
sql_create_context
CREATE TABLE table_39885 ( "Name" text, "Novelty" text, "Status" text, "Authors" text, "Unit" text, "Location" text, "Notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who has the status of jr synonym of protosialis casca?
SELECT "Novelty" FROM table_39885 WHERE "Status" = 'jr synonym of protosialis casca'
wikisql
CREATE TABLE table_2560677_1 ( artist_s_ VARCHAR, start_date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many artist(s) have a start date is 1966-12-12?
SELECT COUNT(artist_s_) FROM table_2560677_1 WHERE start_date = "1966-12-12"
sql_create_context
CREATE TABLE table_11867 ( "Name" text, "Premiere" text, "Finale" text, "Original teams" text, "The Biggest Loser" text, "At-Home Winner" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What were the original teams for the season that was won by ...
SELECT "Original teams" FROM table_11867 WHERE "The Biggest Loser" = 'danni allen'
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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
SELECT demographic.dob FROM demographic WHERE demographic.subject_id = "65652"
mimicsql_data
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 SQRGH, SQRXM FROM jybgb WHERE BGDH = '38029039376'
css
CREATE TABLE table_38991 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who ha the gold and 1 bronze, and more than 0 silver?
SELECT "Gold" FROM table_38991 WHERE "Bronze" = '1' AND "Silver" > '0'
wikisql
CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE ...
SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 17462 AND admissions.dischtime IS NULL) AND prescriptions.route = 'iv' ORDER BY prescriptions.startdate LIMIT 1
mimic_iii
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 int, flight_number int, from_airport varchar, meal_code text, stops 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, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, fare, fare_basis AS FARE_BASIS_0, fare_basis AS FARE_BASIS_1, flight, flight_fare WHERE ((DATE...
atis
CREATE TABLE table_68325 ( "Year" text, "Human Resources & Operations" text, "Local Affairs" text, "Academic & University Affairs" text, "External Affairs" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was in external affairs when Jakki Doyle w...
SELECT "External Affairs" FROM table_68325 WHERE "Human Resources & Operations" = 'jakki doyle'
wikisql
CREATE TABLE table_12856 ( "Designation" text, "Launch date/time ( GMT )" text, "Mass" text, "Apogee" text, "Inclination" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Mass, when Designation is Prognoz 2?
SELECT "Mass" FROM table_12856 WHERE "Designation" = 'prognoz 2'
wikisql
CREATE TABLE table_57184 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the earliest year a chassis of ferrari 312t and results of 31 points occurred?
SELECT MIN("Year") FROM table_57184 WHERE "Chassis" = 'ferrari 312t' AND "Points" = '31'
wikisql
CREATE TABLE railway_manage ( railway_id number, manager_id number, from_year text ) CREATE TABLE train ( train_id number, train_num text, name text, from text, arrival text, railway_id number ) CREATE TABLE railway ( railway_id number, railway text, builder text, b...
SELECT working_year_starts FROM manager ORDER BY level DESC
spider
CREATE TABLE table_name_74 ( top_5 INTEGER, top_10 VARCHAR, top_25 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average Top-5 finishes with 2 as the Top-10 and a greater than 4 Top-25?
SELECT AVG(top_5) FROM table_name_74 WHERE top_10 = 2 AND top_25 > 4
sql_create_context
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) 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 T...
SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY SUM(MANAGER_ID) DESC
nvbench
CREATE TABLE table_name_74 ( icao VARCHAR, airport VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the ICAO for lilongwe international airport
SELECT icao FROM table_name_74 WHERE airport = "lilongwe international airport"
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 COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-100763')) AND treatment.treatmentname = 'ct scan' AND STRFTIME('%y', tre...
eicu
CREATE TABLE loan ( loan_id text, loan_type text, cust_id text, branch_id text, amount number ) CREATE TABLE bank ( branch_id number, bname text, no_of_customers number, city text, state text ) CREATE TABLE customer ( cust_id text, cust_name text, acc_type text, ...
SELECT COUNT(*) FROM bank
spider
CREATE TABLE table_26315 ( "Rank" real, "Operators Name" text, "Technology" text, "Subscribers (in millions)" text, "Ownership" text, "Market Share" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the market share of the operator whose t...
SELECT "Market Share" FROM table_26315 WHERE "Technology" = 'CDMA EVDO GSM EDGE HSPA+'
wikisql
CREATE TABLE table_name_57 ( role VARCHAR, genre VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What drama role does she play in 1973?
SELECT role FROM table_name_57 WHERE genre = "drama" AND year = 1973
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 medication ( medi...
SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, COUNT(treatment.treatmenttime) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid ...
eicu
CREATE TABLE table_30108930_6 ( position VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Tyrell Francisco's player position?
SELECT position FROM table_30108930_6 WHERE player = "Tyrell Francisco"
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 jybgb.BGDH FROM hz_info JOIN mzjzjlb JOIN jybgb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE hz_info.person_info_XM = '潘德运' AND jybgb.BGRQ BETWEEN '2000-04-06' AND '2007-09-10' ...
css
CREATE TABLE table_17738 ( "Year" real, "Song title" text, "Artist" text, "Master recording ?" text, "Release date" text, "Single / Pack" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many master recordings are there for 'Famous for Nothing...
SELECT COUNT("Master recording ?") FROM table_17738 WHERE "Song title" = 'Famous For Nothing'
wikisql
CREATE TABLE table_name_90 ( rank VARCHAR, title VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What rank did Best Friends receive?
SELECT rank FROM table_name_90 WHERE title = "best friends"
sql_create_context
CREATE TABLE table_21729 ( "Series #" real, "Episode #" real, "Title" text, "Directed by" text, "Written by" text, "U.S. viewers (million)" text, "Original airdate" text, "Production Code" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- W...
SELECT "Production Code" FROM table_21729 WHERE "Directed by" = 'Patrick Norris' AND "Title" = 'The Night Moves'
wikisql
CREATE TABLE table_name_74 ( nation VARCHAR, second VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Glenys Bakker was second for which nation?
SELECT nation FROM table_name_74 WHERE second = "glenys bakker"
sql_create_context
CREATE TABLE table_53062 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the driver for grid less than 19 and Laps more than 59 with time/retired of +0.294
SELECT "Driver" FROM table_53062 WHERE "Grid" < '19' AND "Laps" > '59' AND "Time/Retired" = '+0.294'
wikisql
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 COUNT(*) FROM mzjzjlb WHERE ZZYSGH = '62380761' AND JZKSRQ BETWEEN '2014-01-24' AND '2020-12-29'
css
CREATE TABLE table_24074130_5 ( against VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is every entry for against with opponent Andreas Vinciguerra?
SELECT against FROM table_24074130_5 WHERE opponent = "Andreas Vinciguerra"
sql_create_context
CREATE TABLE film_market_estimation ( Estimation_ID int, Low_Estimate real, High_Estimate real, Film_ID int, Type text, Market_ID int, Year int ) CREATE TABLE film ( Film_ID int, Title text, Studio text, Director text, Gross_in_dollar int ) CREATE TABLE market ( Mar...
SELECT Type, COUNT(Type) FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID GROUP BY Type ORDER BY COUNT(Type) DESC
nvbench
CREATE TABLE route ( train_id int, station_id int ) CREATE TABLE station ( id int, network_name text, services text, local_authority text ) CREATE TABLE train ( id int, train_number int, name text, origin text, destination text, time text, interval text ) CREATE TA...
SELECT services, COUNT(services) FROM station GROUP BY services ORDER BY services DESC
nvbench
CREATE TABLE table_11924 ( "Tallangatta DFL" text, "Wins" real, "Byes" real, "Losses" real, "Draws" real, "Against" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of byes that has 11 wins and a Tallangatta DFL of Barnawa...
SELECT COUNT("Byes") FROM table_11924 WHERE "Wins" = '11' AND "Tallangatta DFL" = 'barnawartha'
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 procedures ( ...
SELECT demographic.days_stay, lab."CATEGORY" FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.subject_id = "18372"
mimicsql_data
CREATE TABLE volume ( Volume_ID int, Volume_Issue text, Issue_Date text, Weeks_on_Top real, Song text, Artist_ID int ) CREATE TABLE artist ( Artist_ID int, Artist text, Age int, Famous_Title text, Famous_Release_date text ) CREATE TABLE music_festival ( ID int, Musi...
SELECT Result, COUNT(Result) FROM music_festival GROUP BY Result ORDER BY Result DESC
nvbench
CREATE TABLE table_34910 ( "Version" text, "Length" text, "Album" text, "Remixed by" text, "Year" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How long was the instrumental version in 1986?
SELECT "Length" FROM table_34910 WHERE "Year" = '1986' AND "Version" = 'instrumental'
wikisql
CREATE TABLE table_66418 ( "School" text, "Location" text, "Mascot" text, "Enrollment" real, "IHSAA Class" text, "# / County" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which IHSAA Class has a Location of columbia city?
SELECT "IHSAA Class" FROM table_66418 WHERE "Location" = 'columbia city'
wikisql
CREATE TABLE cinema ( name VARCHAR, openning_year VARCHAR, capacity VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show name, opening year, and capacity for each cinema.
SELECT name, openning_year, capacity FROM cinema
sql_create_context
CREATE TABLE table_7853 ( "Place" text, "Player" text, "Country" text, "Score" real, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT IS THE PLACE THAT HAS SCORE OF 65 OR BETTER, FOR ROCCO MEDIATE?
SELECT "Place" FROM table_7853 WHERE "Score" > '65' AND "Player" = 'rocco mediate'
wikisql
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id num...
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', transfers.intime)) FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 65582 AND admissions.dischtime IS NULL) AND transfers.careunit = 'micu' ORDER BY transfers.intime DESC LIMIT 1
mimic_iii
CREATE TABLE table_79723 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the rank of Turkey (TUR) with a total more than 2?
SELECT COUNT("Rank") FROM table_79723 WHERE "Nation" = 'turkey (tur)' AND "Total" > '2'
wikisql
CREATE TABLE course ( course_id int, name varchar, department varchar, number varchar, credits varchar, advisory_requirement varchar, enforced_requirement varchar, description varchar, num_semesters int, num_enrolled int, has_discussion varchar, has_lab varchar, has_p...
SELECT DISTINCT name FROM instructor WHERE NOT name IN (SELECT INSTRUCTORalias1.name FROM course AS COURSEalias0 INNER JOIN course_offering AS COURSE_OFFERINGalias0 ON COURSEalias0.course_id = COURSE_OFFERINGalias0.course_id INNER JOIN offering_instructor AS OFFERING_INSTRUCTOR ON OFFERING_OFFERING_ID = COURSE_OFFERING...
advising
CREATE TABLE t_kc21_t_kc24 ( MED_CLINIC_ID text, MED_SAFE_PAY_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, ...
SELECT t_kc21.MED_CLINIC_ID FROM t_kc24 JOIN t_kc21_t_kc24 JOIN t_kc21 ON t_kc21_t_kc24.MED_SAFE_PAY_ID = t_kc24.MED_SAFE_PAY_ID AND t_kc21_t_kc24.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc24.PERSON_ID = '29469375' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2013-11-17' AND '2014-04-24'
css
CREATE TABLE table_49307 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average Week, when Opponent is Minnesota Vikings?
SELECT AVG("Week") FROM table_49307 WHERE "Opponent" = 'minnesota vikings'
wikisql
CREATE TABLE table_61327 ( "Outcome" text, "Date" real, "Tournament" text, "Surface" text, "Partner" text, "Opponents in the final" text, "Score in the final" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the Partner which is in 1979, ...
SELECT "Partner" FROM table_61327 WHERE "Date" = '1979' AND "Opponents in the final" = 'heinz günthardt bob hewitt'
wikisql
CREATE TABLE table_2484 ( "Issuer" text, "Issue Date" text, "ISIN" text, "Amount Issued [\u20ac]" text, "Coupon" text, "Maturity" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the ISIN that has a coupon of 1.02 and a value issued of 447...
SELECT "ISIN" FROM table_2484 WHERE "Coupon" = '1.02' AND "Amount Issued [\u20ac]" = '447,000,000'
wikisql
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 t_kc21 WHERE t_kc21.PERSON_ID = '07375083' AND t_kc21.CLINIC_TYPE = '住院' AND MOD(t_kc21.MED_AMOUT, 1) = 0
css
CREATE TABLE table_name_34 ( party VARCHAR, electorate VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What party is the member that has an electorate of Lindsay?
SELECT party FROM table_name_34 WHERE electorate = "lindsay"
sql_create_context
CREATE TABLE table_21716 ( "Class" text, "Part 1" text, "Part 2" text, "Part 3" text, "Part 4" text, "Verb meaning" text, "Usual PIE origin" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the verb meaning for *bundun?
SELECT "Verb meaning" FROM table_21716 WHERE "Part 3" = '*bundun'
wikisql
CREATE TABLE Subjects ( subject_id INTEGER, subject_name VARCHAR(120) ) CREATE TABLE Course_Authors_and_Tutors ( author_id INTEGER, author_tutor_ATB VARCHAR(3), login_name VARCHAR(40), password VARCHAR(40), personal_name VARCHAR(80), middle_name VARCHAR(80), family_name VARCHAR(80),...
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"
nvbench
CREATE TABLE table_64429 ( "Player" text, "Original Season" text, "Gender" text, "Eliminated" text, "Placing" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who's the player eliminated on episode 8 of Fresh Meat?
SELECT "Player" FROM table_64429 WHERE "Original Season" = 'fresh meat' AND "Eliminated" = 'episode 8'
wikisql
CREATE TABLE editor ( editor_id number, name text, age number ) CREATE TABLE journal_committee ( editor_id number, journal_id number, work_type text ) CREATE TABLE journal ( journal_id number, date text, theme text, sales number ) -- Using valid SQLite, answer the following q...
SELECT name FROM editor WHERE age > 25
spider
CREATE TABLE table_name_3 ( date VARCHAR, week VARCHAR, result VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the date of the game with a result of bye before week 12?
SELECT date FROM table_name_3 WHERE week < 12 AND result = "bye"
sql_create_context
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE medication ( medication...
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 = '028-39354')) AND vitalperiodic.heartrate < 108.0 AN...
eicu
CREATE TABLE table_66238 ( "State (class)" text, "Vacator" text, "Reason for change" text, "Successor" text, "Date of successor's formal installation" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which State (class) has a Successor of harry f. byr...
SELECT "State (class)" FROM table_66238 WHERE "Successor" = 'harry f. byrd, jr. (d)'
wikisql