instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
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, weight int, capacity int, pay_load int, cruising_speed int, range_...
SELECT DISTINCT airline.airline_code FROM airline, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, fare, flight, flight_fare, flight_stop WHERE ((CITY_2.city_code = AIRPORT_SERVICE_2.city_code AND CITY_2.ci...
atis
CREATE TABLE table_35025 ( "Round" text, "Pick" text, "Player" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which college is Kellen Davis from?
SELECT "College" FROM table_35025 WHERE "Player" = 'kellen davis'
wikisql
CREATE TABLE table_name_30 ( player VARCHAR, college_junior_club_team__league_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the player that is part of the team Shawinigan Dynamos (Qmjhl)?
SELECT player FROM table_name_30 WHERE college_junior_club_team__league_ = "shawinigan dynamos (qmjhl)"
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 BGDH FROM jybgb WHERE JZLSH = '25783022508' AND KSMC LIKE '%内镜%'
css
CREATE TABLE table_204_673 ( id number, "name" text, "egot completed" text, "emmy" number, "grammy" number, "oscar" number, "tony" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which actor/actress took the most years to complete egot ?
SELECT "name" FROM table_204_673 ORDER BY "egot completed" DESC LIMIT 1
squall
CREATE TABLE table_204_941 ( id number, "#" number, "date" text, "visitor" text, "score" text, "home" text, "record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- was the result of the game on the 2nd the same as the game on the 23rd ?
SELECT (SELECT "score" FROM table_204_941 WHERE "date" = 2) = (SELECT "score" FROM table_204_941 WHERE "date" = 23)
squall
CREATE TABLE Products ( Product_ID VARCHAR(100), Product_Name VARCHAR(255), Product_Price DECIMAL(20,4), Product_Description VARCHAR(255), Other_Product_Service_Details VARCHAR(255) ) CREATE TABLE Bookings_Services ( Order_ID INTEGER, Product_ID INTEGER ) CREATE TABLE Order_Items ( Ord...
SELECT Store_Name, COUNT(Store_Name) FROM Bookings AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T1.Status_Code = "stop" GROUP BY Store_Name ORDER BY Store_Name DESC
nvbench
CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE airport_service ( city_code varchar, ...
SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'PHILADELPHIA' AND ground_service.city_code = city.city_code
atis
CREATE TABLE table_74572 ( "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 is the date of the game where the home team...
SELECT "Date" FROM table_74572 WHERE "Home team score" = '9.10 (64)'
wikisql
CREATE TABLE table_name_89 ( altitude__mslm_ INTEGER, density__inhabitants_km_2__ VARCHAR, common_of VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Altitude (mslm) has a Density (inhabitants/km 2) smaller than 1467.5, and a Common of moncalieri?
SELECT SUM(altitude__mslm_) FROM table_name_89 WHERE density__inhabitants_km_2__ < 1467.5 AND common_of = "moncalieri"
sql_create_context
CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE ta ( campus_job_id int, student_id int...
SELECT COUNT(DISTINCT course.course_id, semester.semester) FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'department0' AND course.number BETWEEN 300 AND 300 + 100 AND semester.semester IN ('SP', 'SS', 'SU') AND semester.semester_id = course_offering.se...
advising
CREATE TABLE table_name_31 ( catalogno VARCHAR, year VARCHAR, remark VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What catalogno was in 1971 and had a remark of #27 us?
SELECT catalogno FROM table_name_31 WHERE year = 1971 AND remark = "#27 us"
sql_create_context
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_nam...
SELECT admissions.dischtime FROM admissions WHERE admissions.subject_id = 83079 AND STRFTIME('%y', admissions.dischtime) >= '2100' ORDER BY admissions.dischtime DESC LIMIT 1
mimic_iii
CREATE TABLE table_80076 ( "NIR Number" text, "Introduced" text, "BR Number(s)" text, "Built" text, "Type" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which NIR number is for the tso (ex-br class 488 unit 488305) type that has a 6082 / 72605 BR n...
SELECT "NIR Number" FROM table_80076 WHERE "Type" = 'tso (ex-br class 488 unit 488305)' AND "BR Number(s)" = '6082 / 72605'
wikisql
CREATE TABLE table_10977 ( "Name" text, "Street address in Detroit" text, "Years as tallest" text, "Height feet / m" text, "Floors" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which place has 23 floors and a street address in Detroit of 144 west ...
SELECT "Name" FROM table_10977 WHERE "Floors" = '23' AND "Street address in Detroit" = '144 west congress street'
wikisql
CREATE TABLE table_5313 ( "District" text, "Incumbent" text, "Party" text, "First elected" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which republican was first elected in 1886 in the district of ohio 17?
SELECT "Result" FROM table_5313 WHERE "Party" = 'republican' AND "First elected" = '1886' AND "District" = 'ohio 17'
wikisql
CREATE TABLE table_40907 ( "Block" text, "Launched" real, "Operational" real, "Not usable" real, "Retired" real, "Launch Failures" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average number of not usable satellited when there are ...
SELECT AVG("Not usable") FROM table_40907 WHERE "Retired" = '0' AND "Launch Failures" < '1'
wikisql
CREATE TABLE table_name_53 ( player VARCHAR, college VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What player attended UAB college?
SELECT player FROM table_name_53 WHERE college = "uab"
sql_create_context
CREATE TABLE table_76148 ( "Pick #" real, "NFL Team" text, "Player" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If the Position is Running Back what is the Total number of Pick #?
SELECT COUNT("Pick #") FROM table_76148 WHERE "Position" = 'running back'
wikisql
CREATE TABLE table_name_49 ( Id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 1938 that has N/A for 1948?
SELECT 1938 FROM table_name_49 WHERE 1948 = "n/a"
sql_create_context
CREATE TABLE table_name_51 ( engine VARCHAR, year VARCHAR, points VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which engine has a year later than 2006 and 60 as the points?
SELECT engine FROM table_name_51 WHERE year > 2006 AND points = "60"
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.age < "61" AND diagnoses.long_title = "Pseudomonas infection in conditions classified elsewhere and of unspecified site"
mimicsql_data
CREATE TABLE table_31868 ( "Year" real, "Tournaments played" real, "Cuts made*" real, "Wins" real, "Top 10s" real, "Best finish" text, "Earnings ($)" real, "Money list rank" text, "Scoring average" real, "Scoring rank" text ) -- Using valid SQLite, answer the following question...
SELECT "Best finish" FROM table_31868 WHERE "Top 10s" > '0' AND "Scoring average" = '73.04'
wikisql
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 countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_...
SELECT HIRE_DATE, COMMISSION_PCT FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY HIRE_DATE
nvbench
CREATE TABLE table_37971 ( "Tournament" text, "2001" text, "2002" text, "2003" text, "2004" text, "2005" text, "2006" text, "2007" text, "2008" text, "2009" text, "2011" text, "2012" text, "2013" text, "Career SR" text, "Career Win-Loss" text ) -- Using vali...
SELECT "2003" FROM table_37971 WHERE "2013" = '1r' AND "2007" = '2r'
wikisql
CREATE TABLE table_name_46 ( city VARCHAR, state VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the city that is located in California when the year is greater than 2009?
SELECT city FROM table_name_46 WHERE state = "california" AND year > 2009
sql_create_context
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE countries ( COUNTRY...
SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY COUNT(HIRE_DATE)
nvbench
CREATE TABLE game ( stadium_id int, id int, Season int, Date text, Home_team text, Away_team text, Score text, Competition text ) CREATE TABLE injury_accident ( game_id int, id int, Player text, Injury text, Number_of_matches text, Source text ) CREATE TABLE sta...
SELECT Season, COUNT(Season) FROM game GROUP BY Away_team ORDER BY Season
nvbench
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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...
SELECT COUNT(*) FROM mzjzjlb WHERE mzjzjlb.JZKSBM = '553' AND mzjzjlb.JZKSRQ BETWEEN '2003-05-10' AND '2016-07-14'
css
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 * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_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 jybgb.YLJG...
css
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) ...
SELECT vitalperiodic.respiration FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '029-26705')) AND NOT vitalperiodic.respiration IS NULL ...
eicu
CREATE TABLE table_name_3 ( attendance INTEGER, week VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the lowest Attendance for a Week of 2?
SELECT MIN(attendance) FROM table_name_3 WHERE week = 2
sql_create_context
CREATE TABLE table_28481 ( "Episode" text, "Theme" text, "Song choice" text, "Original recording artist" text, "Order #" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the order # or Erma Franklin?
SELECT "Order #" FROM table_28481 WHERE "Original recording artist" = 'Erma Franklin'
wikisql
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 jyjgzbb ( BGDH text, BGRQ tim...
SELECT jyjgzbb.JCFF FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_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...
css
CREATE TABLE table_15681 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which engine scored 9 points?
SELECT "Engine" FROM table_15681 WHERE "Points" = '9'
wikisql
CREATE TABLE table_name_94 ( date VARCHAR, type_of_game VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was the WC 1974 Qualifying game?
SELECT date FROM table_name_94 WHERE type_of_game = "wc 1974 qualifying"
sql_create_context
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) 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...
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE ...
mimic_iii
CREATE TABLE table_name_5 ( award VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Award has a date of 2002?
SELECT award FROM table_name_5 WHERE year = 2002
sql_create_context
CREATE TABLE table_12928 ( "Player" text, "Country" text, "Year(s) won" text, "Total" real, "To par" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Total has a Year(s) won of 1991?
SELECT MIN("Total") FROM table_12928 WHERE "Year(s) won" = '1991'
wikisql
CREATE TABLE table_2562572_43 ( cyrillic_name_other_names VARCHAR, settlement VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many entries are there for cyrillic name other names where settlement is idvor?
SELECT COUNT(cyrillic_name_other_names) FROM table_2562572_43 WHERE settlement = "Idvor"
sql_create_context
CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PostFeedback ( Id number, PostId numb...
SELECT Answer.Id AS "post_link", Answer.Score AS "score", Question.Tags, Answer.CreationDate AS "creation_date" FROM Posts AS Question LEFT JOIN Posts AS Answer ON Question.Id = Answer.ParentId WHERE Answer.PostTypeId = 2 AND Answer.OwnerUserId = @MyUserID AND Question.Tags LIKE '%<server-socket>%' ORDER BY Question.Cr...
sede
CREATE TABLE party ( Party_ID int, Year real, Party text, Governor text, Lieutenant_Governor text, Comptroller text, Attorney_General text, US_Senate text ) CREATE TABLE election ( Election_ID int, Counties_Represented text, District int, Delegate text, Party int, ...
SELECT County_name, Population FROM county ORDER BY Population DESC
nvbench
CREATE TABLE table_24915874_1 ( weight__kg_ VARCHAR, horse VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the weight in kg when the horse was Alcopop?
SELECT weight__kg_ FROM table_24915874_1 WHERE horse = "Alcopop"
sql_create_context
CREATE TABLE table_name_30 ( open_cup VARCHAR, division INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHich Open Cup has a Division larger than 4?
SELECT open_cup FROM table_name_30 WHERE division > 4
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 AVG(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.t_kc21_PERSON_AGE < 20)
css
CREATE TABLE table_name_36 ( finish VARCHAR, country VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the finish by the player from West Germany?
SELECT finish FROM table_name_36 WHERE country = "west germany"
sql_create_context
CREATE TABLE zyjzjlb_jybgb ( YLJGDM_ZYJZJLB text, BGDH number, YLJGDM number ) 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 n...
SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN 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 = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '尤云霞' AND jybg...
css
CREATE TABLE table_79634 ( "Debut year" real, "Player" text, "Games" real, "Goals" real, "Years at club" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which player debuted before 1943, played for the club in 1942, played less than 12 games, and sco...
SELECT "Player" FROM table_79634 WHERE "Debut year" < '1943' AND "Games" < '12' AND "Goals" < '11' AND "Years at club" = '1942'
wikisql
CREATE TABLE table_name_24 ( constructor VARCHAR, laps VARCHAR, driver VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who built michael schumacher's car that went under 31 laps?
SELECT constructor FROM table_name_24 WHERE laps < 31 AND driver = "michael schumacher"
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND prescriptions.drug_type = "ADDITIVE"
mimicsql_data
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 zyjzjlb ( CYBQDM text, CYBQMC...
SELECT jyjgzbb.YQBH, jyjgzbb.YQMC FROM hz_info JOIN mzjzjlb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJZJLB WHERE hz_info.RYBH = '89244700' AND jyjgzbb.JYRQ BETWEEN...
css
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 = "TRANSFER FROM HOSP/EXTRAM" AND demographic.diagnosis = "HYPOXIA"
mimicsql_data
CREATE TABLE table_73633 ( "Institution" text, "Location" text, "Team Name" text, "Founded" real, "Affiliation" text, "Enrollment" real, "Year Joined" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the location for the team name of e...
SELECT "Location" FROM table_73633 WHERE "Team Name" = 'Eagles'
wikisql
CREATE TABLE election ( Election_ID int, Counties_Represented text, District int, Delegate text, Party int, First_Elected real, Committee text ) CREATE TABLE county ( County_Id int, County_name text, Population real, Zip_code text ) CREATE TABLE party ( Party_ID int, ...
SELECT Committee, COUNT(Committee) FROM election GROUP BY Committee ORDER BY COUNT(Committee) DESC
nvbench
CREATE TABLE table_name_13 ( attendance VARCHAR, week VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the attendance in week 6?
SELECT attendance FROM table_name_13 WHERE week = 6
sql_create_context
CREATE TABLE table_16163 ( "Season" text, "Team" text, "League Apps" real, "League Goals" real, "Cup Apps" real, "Cup Goals" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the team for season 1911-12?
SELECT "Team" FROM table_16163 WHERE "Season" = '1911-12'
wikisql
CREATE TABLE table_23597 ( "Draw" real, "Artist" text, "Song" text, "Regions" real, "Studio Audience" real, "Press Jury" real, "Oil Rig" real, "Total Points" real, "Place" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the oil...
SELECT "Oil Rig" FROM table_23597 WHERE "Place" = '7th'
wikisql
CREATE TABLE table_name_6 ( canadian_championship VARCHAR, concacaf_champions_league VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Canadian Championship had CONCACAF Champions League of semifinals?
SELECT canadian_championship FROM table_name_6 WHERE concacaf_champions_league = "semifinals"
sql_create_context
CREATE TABLE table_71795 ( "Manager" text, "Years" text, "Games" real, "Wins" real, "Losses" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was Jim Hoff's sum of losses and a wins smaller than 12?
SELECT SUM("Losses") FROM table_71795 WHERE "Manager" = 'jim hoff' AND "Wins" < '12'
wikisql
CREATE TABLE table_2675 ( "Year" text, "Date" text, "Driver" text, "Team" text, "Manufacturer" text, "Laps" text, "Miles (km)" text, "Race time" text, "Average speed (mph)" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above...
SELECT COUNT("Date") FROM table_2675 WHERE "Average speed (mph)" = '91.033'
wikisql
CREATE TABLE table_name_90 ( chemical_class VARCHAR, example VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which chemical class uses the example Chloroethane (ethyl chloride)?
SELECT chemical_class FROM table_name_90 WHERE example = "chloroethane (ethyl chloride)"
sql_create_context
CREATE TABLE table_name_60 ( runner_s__up VARCHAR, championship VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In 1946, what is the Runner(s)-up of the Women's Western Open Championship?
SELECT runner_s__up FROM table_name_60 WHERE championship = "women's western open" AND year = 1946
sql_create_context
CREATE TABLE table_43778 ( "City" text, "Country" text, "IATA" text, "ICAO" text, "Airport" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is IATA, when ICAO is 'VHHH'?
SELECT "IATA" FROM table_43778 WHERE "ICAO" = 'vhhh'
wikisql
CREATE TABLE table_65429 ( "Season" text, "1st round" text, "2nd round" text, "3rd round" text, "Finals" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Season has Finals of out of playoffs.?
SELECT "Season" FROM table_65429 WHERE "Finals" = 'out of playoffs.'
wikisql
CREATE TABLE table_204_779 ( id number, "network name" text, "flagship" text, "programming type" text, "owner" text, "affiliates" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the average number of affiliates that a given network will...
SELECT AVG("affiliates") FROM table_204_779
squall
CREATE TABLE table_name_69 ( rating INTEGER, viewers__m_ VARCHAR, overall_rank VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the rating of the episode with 13.47 million viewers and overall rank larger than 6?
SELECT SUM(rating) FROM table_name_69 WHERE viewers__m_ = 13.47 AND overall_rank > 6
sql_create_context
CREATE TABLE table_name_67 ( south_marquesan VARCHAR, sāmoan VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What kind of South Marquesan has a S moan of /matua/?
SELECT south_marquesan FROM table_name_67 WHERE sāmoan = "/matua/"
sql_create_context
CREATE TABLE table_72905 ( "Class" text, "Part 1" text, "Part 2" text, "Part 3" text, "Part 4" text, "Verb meaning" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the part 4 when part 1 is 'lesan'?
SELECT "Part 4" FROM table_72905 WHERE "Part 1" = 'lesan'
wikisql
CREATE TABLE table_21397 ( "Year (Ceremony)" text, "Film title used in nomination" text, "Original title" text, "Director" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What year and ceremony was the original title (britter baire)?
SELECT "Year (Ceremony)" FROM table_21397 WHERE "Original title" = 'বৃত্তের বাইরে (Britter Baire)'
wikisql
CREATE TABLE t_kc24 ( MED_SAFE_PAY_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, REF_SLT_FLG number, CLINIC_SLT_DATE time, COMP_ID text, PERSON_ID text, FLX_MED_ORG_ID text, INSU_TYPE text, MED_AMOUT number, PER_ACC_PAY number, OVE_PAY numb...
SELECT MED_ORG_DEPT_NM, OUT_DIAG_DIS_NM, AVG(PERSON_AGE) FROM t_kc21 WHERE MED_SER_ORG_NO = '0101657' GROUP BY MED_ORG_DEPT_NM, OUT_DIAG_DIS_NM HAVING AVG(PERSON_AGE) > 23
css
CREATE TABLE table_51517 ( "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 home team that had a score of 6.20 ...
SELECT "Home team" FROM table_51517 WHERE "Home team score" = '6.20 (56)'
wikisql
CREATE TABLE table_76461 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "Location" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Score has a Location of richfield coliseum?
SELECT "Score" FROM table_76461 WHERE "Location" = 'richfield coliseum'
wikisql
CREATE TABLE table_name_25 ( tournament VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the tournamnet name that has a 2001 of 1r and 2011?
SELECT tournament FROM table_name_25 WHERE 2001 = "1r" AND 2011 = "a"
sql_create_context
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) -- Using valid SQLite, answer the following questions for the...
SELECT T2.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name DESC
nvbench
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) -- Using valid SQLite, answer the following questions for the...
SELECT T2.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name DESC
nvbench
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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, ...
SELECT * FROM person_info JOIN hz_info JOIN wdmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE person_info.XM = '水兴平' AND hz_info.YLJGDM = '5237390' AND NOT wdmzjzjlb.JZKSMC LIKE '%免疫%' UNION SELECT * FROM person_info JO...
css
CREATE TABLE lapTimes ( raceId INTEGER, driverId INTEGER, lap INTEGER, position INTEGER, time TEXT, milliseconds INTEGER ) CREATE TABLE results ( resultId INTEGER, raceId INTEGER, driverId INTEGER, constructorId INTEGER, number INTEGER, grid INTEGER, position TEXT, ...
SELECT name, COUNT(name) FROM constructors AS T1 JOIN constructorStandings AS T2 ON T1.constructorId = T2.constructorId WHERE T1.nationality = "Japanese" AND T2.points > 5 GROUP BY name ORDER BY name DESC
nvbench
CREATE TABLE ref_product_categories ( product_category_code text, product_category_description text, unit_of_measure text ) CREATE TABLE products ( product_id number, color_code text, product_category_code text, product_name text, typical_buying_price text, typical_selling_price tex...
SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN characteristics AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name ORDER BY COUNT(*) DESC LIMIT 1
spider
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 AVG(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.t_kc21_PERSON_AGE < 23)
css
CREATE TABLE table_70835 ( "Name" text, "Frequency" text, "Language" text, "City" text, "Website" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which website is in english and has the frequency of an online newspaper ?
SELECT "Website" FROM table_70835 WHERE "Language" = 'english' AND "Frequency" = 'online newspaper'
wikisql
CREATE TABLE table_13210 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Nation has Silver smaller than 16, Bronze larger than 6, and Gold of 2?
SELECT "Nation" FROM table_13210 WHERE "Silver" < '16' AND "Bronze" > '6' AND "Gold" = '2'
wikisql
CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDa...
SELECT * FROM Users, Badges WHERE Users.Id = Badges.UserId AND Badges.Class = 1 AND Badges.TagBased = 1 AND Badges.Name = 'node.js' ORDER BY Reputation DESC
sede
CREATE TABLE table_18373 ( "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. -- what is the party when the incumbent is sidney r. yates?
SELECT "Party" FROM table_18373 WHERE "Incumbent" = 'Sidney R. Yates'
wikisql
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_i...
SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 59002 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1)
mimic_iii
CREATE TABLE loan ( loan_ID varchar(3), loan_type varchar(15), cust_ID varchar(3), branch_ID varchar(3), amount int ) CREATE TABLE bank ( branch_ID int, bname varchar(20), no_of_customers int, city varchar(10), state varchar(20) ) CREATE TABLE customer ( cust_ID varchar(3),...
SELECT cust_name, credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_ID = T2.cust_ID
nvbench
CREATE TABLE table_name_17 ( draws INTEGER, against VARCHAR, wins VARCHAR, losses VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average draws with more than 1 win, 14 losses, and against less than 1836?
SELECT AVG(draws) FROM table_name_17 WHERE wins > 1 AND losses = 14 AND against < 1836
sql_create_context
CREATE TABLE table_203_414 ( id number, "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. -- which team was the top scorer in the 1st leg ?
SELECT "team 1" FROM table_203_414 ORDER BY "1st leg" DESC LIMIT 1
squall
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.insurance = "Medicaid" AND demographic.diagnosis = "BRAIN MASS;INTRACRANIAL HEMORRHAGE"
mimicsql_data
CREATE TABLE table_name_36 ( result VARCHAR, original_title VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was Zona Sur's result after being considered for nomination?
SELECT result FROM table_name_36 WHERE original_title = "zona sur"
sql_create_context
CREATE TABLE table_204_29 ( id number, "rank" number, "lane" number, "name" text, "nationality" text, "time" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many swimmers swam at least a 1:59.99 race ?
SELECT COUNT("name") FROM table_204_29 WHERE "time" = 1
squall
CREATE TABLE captain ( Captain_ID int, Name text, Ship_ID int, age text, Class text, Rank text ) CREATE TABLE Ship ( Ship_ID int, Name text, Type text, Built_Year real, Class text, Flag text ) -- Using valid SQLite, answer the following questions for the tables provide...
SELECT Class, COUNT(Class) FROM captain GROUP BY Class
nvbench
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 jybgb.BGDH FROM person_info JOIN hz_info JOIN txmzjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND 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 WHERE person_info.XM = '俞...
css
CREATE TABLE table_36828 ( "Title" text, "Genre" text, "C=64" text, "ZX Spectrum" text, "Others" text, "Year" real, "Format" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which ZX Spectrum has a C=64 of c64, and a Title of ankh?
SELECT "ZX Spectrum" FROM table_36828 WHERE "C=64" = 'c64' AND "Title" = 'ankh'
wikisql
CREATE TABLE table_11354111_3 ( overall_rank VARCHAR, viewers__m_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's the overall rank with viewers (m) of 7.44
SELECT overall_rank FROM table_11354111_3 WHERE viewers__m_ = "7.44"
sql_create_context
CREATE TABLE table_name_16 ( school VARCHAR, team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What school does the Blue Raiders belong to?
SELECT school FROM table_name_16 WHERE team = "blue raiders"
sql_create_context
CREATE TABLE table_47786 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who placed t7 with a score of 70-71=141?
SELECT "Player" FROM table_47786 WHERE "Place" = 't7' AND "Score" = '70-71=141'
wikisql
CREATE TABLE table_name_92 ( gold INTEGER, bronze VARCHAR, total VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Gold has a Bronze larger than 1, and a Total larger than 80?
SELECT SUM(gold) FROM table_name_92 WHERE bronze > 1 AND total > 80
sql_create_context
CREATE TABLE table_65916 ( "Team" text, "Winners" real, "Runners-up" real, "Years won" text, "Years runners-up" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of winners when 1983 is the years won?
SELECT COUNT("Winners") FROM table_65916 WHERE "Years won" = '1983'
wikisql
CREATE TABLE table_name_43 ( car_no VARCHAR, time_retired VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What car number had a race time of +0.3844?
SELECT car_no FROM table_name_43 WHERE time_retired = "+0.3844"
sql_create_context
CREATE TABLE track ( Track_ID int, Name text, Location text, Seating real, Year_Opened real ) CREATE TABLE race ( Race_ID int, Name text, Class text, Date text, Track_ID text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are th...
SELECT Class, COUNT(*) FROM race GROUP BY Class
nvbench