instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_204_332 ( id number, "administrative\narea" text, "area\nkm2" number, "area\nsq mi" number, "population" number, "administrative\ncentre" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what administrative area comes before nig...
SELECT "administrative\narea" FROM table_204_332 WHERE id = (SELECT id FROM table_204_332 WHERE "administrative\narea" = 'nightingale island') - 1
squall
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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 te...
SELECT * FROM jyjgzbb WHERE jyjgzbb.JCZBMC = (SELECT jyjgzbb.JCZBMC FROM jyjgzbb WHERE jyjgzbb.JYZBLSH = '69156371520') AND jyjgzbb.JCZBJGDW = (SELECT jyjgzbb.JCZBJGDW FROM jyjgzbb WHERE jyjgzbb.JYZBLSH = '69156371520') AND jyjgzbb.JCZBJGDL >= (SELECT jyjgzbb.JCZBJGDL FROM jyjgzbb WHERE jyjgzbb.JYZBLSH = '69156371520')
css
CREATE TABLE hz_info_zyjzjlb ( JZLSH number, YLJGDM number, zyjzjlb_id number ) 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,...
SELECT mzjzjlb.YLJGDM FROM person_info JOIN hz_info JOIN mzjzjlb 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 WHERE person_info.XM = '陶国兴' UNION SELECT hz_info_zyjzjlb.YLJGDM FROM person_info JOIN hz_info JOIN zyjzjlb JOIN hz_info_zyjzj...
css
CREATE TABLE table_name_33 ( floors INTEGER, rank VARCHAR, building VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest amount of floors after rank 1 in the Trillium (residential) building?
SELECT MIN(floors) FROM table_name_33 WHERE rank > 1 AND building = "the trillium (residential)"
sql_create_context
CREATE TABLE fgwyjzb ( CLINIC_ID text, CLINIC_TYPE 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, ...
SELECT gwyjzb.OUT_DIAG_DOC_CD, gwyjzb.OUT_DIAG_DOC_NM FROM gwyjzb WHERE gwyjzb.PERSON_NM = '朱红叶' GROUP BY gwyjzb.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC UNION SELECT fgwyjzb.OUT_DIAG_DOC_CD, fgwyjzb.OUT_DIAG_DOC_NM FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '朱红叶' GROUP BY fgwyjzb.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC
css
CREATE TABLE table_name_81 ( week VARCHAR, opponent VARCHAR, attendance VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of Week, when Opponent is At Chicago Bears, and when Attendance is greater than 49,070?
SELECT COUNT(week) FROM table_name_81 WHERE opponent = "at chicago bears" AND attendance > 49 OFFSET 070
sql_create_context
CREATE TABLE bdmzjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH number, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZD...
SELECT wdmzjzjlb.MZZYZDZZBM FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '37329151718' UNION SELECT bdmzjzjlb.MZZYZDZZBM FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '37329151718'
css
CREATE TABLE table_name_17 ( events INTEGER, top_10 INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- I want the average events for top 10 less than 4
SELECT AVG(events) FROM table_name_17 WHERE top_10 < 4
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 admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text,...
SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT outputevents.itemid FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 51177)) AND STRFTIME('%y-%m-%d', outputeve...
mimic_iii
CREATE TABLE table_21340 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location/Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In...
SELECT "High rebounds" FROM table_21340 WHERE "Record" = '5-11'
wikisql
CREATE TABLE table_64565 ( "Name" text, "Years" text, "A-League" text, "Finals" text, "Total" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What years have 10 (0) in the finals?
SELECT "Years" FROM table_64565 WHERE "Finals" = '10 (0)'
wikisql
CREATE TABLE betfront ( year number, datetime time, country text, competion text, match text, home_opening number, draw_opening number, away_opening number, home_closing number, draw_closing number, away_closing number ) CREATE TABLE football_data ( season text, date...
SELECT awayteam FROM football_data WHERE hometeam = "Omiya Ardija" AND season LIKE "%2018%"
worldsoccerdatabase
CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE ReviewTaskResults ( Id number, ...
SELECT TIME_TO_STR(CreationDate, '%h') * 60 + TIME_TO_STR(CreationDate, '%M') AS minute, SUM(CASE PostTypeId WHEN 1 THEN 1 ELSE 0 END) AS questions, SUM(CASE PostTypeId WHEN 2 THEN 1 ELSE 0 END) AS answers FROM Posts WHERE PostTypeId = 1 OR PostTypeId = 2 AND CreationDate >= '##mindate:string?20140101##' GROUP BY TIME_...
sede
CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE month ( month_number int, month_name text ) CREATE TA...
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 = 'DALLAS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON...
atis
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 hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz_i...
css
CREATE TABLE table_44492 ( "Archbishop" text, "Born" text, "Ordained Priest" text, "Ordained Bishop" text, "Appointed Archbishop" text, "Vacated throne" text, "Died" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was the archbishop that...
SELECT "Ordained Bishop" FROM table_44492 WHERE "Born" = 'february 10, 1858'
wikisql
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, v...
SELECT patients.dob FROM patients WHERE patients.subject_id = 6940
mimic_iii
CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE cour...
SELECT DISTINCT name, number FROM course WHERE credits = 11 AND department = 'EECS'
advising
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.gender = "M" AND lab.label = "Amylase"
mimicsql_data
CREATE TABLE table_65003 ( "World record" text, "Snatch" text, "Yang Lian ( CHN )" text, "98kg" text, "Santo Domingo , Dominican" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 98kg for Santo Domingo, Domincan on 1 October 2006?
SELECT "98kg" FROM table_65003 WHERE "Santo Domingo , Dominican" = '1 october 2006'
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 WHERE demographic.admission_type = "ELECTIVE" AND diagnoses.long_title = "Blood in stool"
mimicsql_data
CREATE TABLE table_23385853_1 ( rally_base VARCHAR, rally_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the rally base for rallye de france alsace
SELECT rally_base FROM table_23385853_1 WHERE rally_name = "Rallye de France Alsace"
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 COUNT(hz_info.RYBH) FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE zyjzjlb.YLJGDM = '5267326' AND DATEDIFF(zyjzjlb.CYSJ, zyjzjlb.RYSJ) > 27
css
CREATE TABLE table_name_10 ( seats_up_for_election INTEGER, election_result VARCHAR, new_council VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many seats were up for election during the vote where the election result was 9 and the new council 27?
SELECT SUM(seats_up_for_election) FROM table_name_10 WHERE election_result = 9 AND new_council > 27
sql_create_context
CREATE TABLE table_45237 ( "Name" text, "Raw bandwidth (Mbit/s)" text, "Max. cable length (m)" text, "Power provided" text, "Devices per channel" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Raw bandwidth (Mbit/s) for the SAS 300?
SELECT "Raw bandwidth (Mbit/s)" FROM table_45237 WHERE "Name" = 'sas 300'
wikisql
CREATE TABLE Teachers ( teacher_id INTEGER, address_id INTEGER, first_name VARCHAR(80), middle_name VARCHAR(80), last_name VARCHAR(80), gender VARCHAR(1), cell_mobile_number VARCHAR(40), email_address VARCHAR(40), other_details VARCHAR(255) ) CREATE TABLE Students ( student_id I...
SELECT date_address_to, SUM(monthly_rental) FROM Student_Addresses GROUP BY date_address_to ORDER BY monthly_rental DESC
nvbench
CREATE TABLE table_41307 ( "Ballarat FL" 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 least amount of draws with an against of 1261?
SELECT MIN("Draws") FROM table_41307 WHERE "Against" = '1261'
wikisql
CREATE TABLE institution ( TYPE VARCHAR, enrollment INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show institution types, along with the number of institutions and total enrollment for each type.
SELECT TYPE, COUNT(*), SUM(enrollment) FROM institution GROUP BY TYPE
sql_create_context
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 AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE zzmzjzjlb.JZZDSM = '矽肺(硅肺)Ⅲ期' AND jyjgzbb.JCZBMC = ...
css
CREATE TABLE table_2409041_9 ( title VARCHAR, written_by VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the name of the epiode written by Gary M. Goodrich?
SELECT title FROM table_2409041_9 WHERE written_by = "Gary M. Goodrich"
sql_create_context
CREATE TABLE table_36594 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many people attended the game on October 31?
SELECT "Attendance" FROM table_36594 WHERE "Date" = 'october 31'
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 MIN(demographic.age) FROM demographic WHERE demographic.admission_type = "NEWBORN" AND demographic.insurance = "Government"
mimicsql_data
CREATE TABLE table_41417 ( "Rank" real, "Name" text, "Team" text, "Games" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What team was Paolo Quinteros on?
SELECT "Team" FROM table_41417 WHERE "Name" = 'paolo quinteros'
wikisql
CREATE TABLE table_name_47 ( first_elected INTEGER, result VARCHAR, incumbent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the lowest re-elected result for Sylvester C. Smith?
SELECT MIN(first_elected) FROM table_name_47 WHERE result = "re-elected" AND incumbent = "sylvester c. smith"
sql_create_context
CREATE TABLE table_17170 ( "Player" text, "No.(s)" text, "Height in Ft." text, "Position" text, "Years for Rockets" text, "School/Club Team/Country" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What years for the rockets did player ford, alton...
SELECT "Years for Rockets" FROM table_17170 WHERE "Player" = 'Ford, Alton Alton Ford'
wikisql
CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_airport text, arrival_time int, arrival_airline text, arriv...
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, days, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SEATTLE' AND date_day.day_number = 1 AND date_day.month_number = 6 AND d...
atis
CREATE TABLE table_11960196_3 ( high_points VARCHAR, game VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who did the high points of game 5?
SELECT high_points FROM table_11960196_3 WHERE game = 5
sql_create_context
CREATE TABLE table_5268 ( "Year" real, "Competition" text, "Venue" text, "Position" text, "Notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what year is the notes distance 1.83m?
SELECT "Year" FROM table_5268 WHERE "Notes" = '1.83m'
wikisql
CREATE TABLE table_40548 ( "Round" text, "Opposition" text, "First leg" text, "Second leg" text, "Aggregate score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who has the first leg that has a round in the semi-final?
SELECT "First leg" FROM table_40548 WHERE "Round" = 'semi-final'
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 employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), ...
SELECT PHONE_NUMBER, DEPARTMENT_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY DEPARTMENT_ID DESC
nvbench
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.MED_SER_ORG_NO = '2510888' AND t_kc21.IN_HOSP_DATE BETWEEN '2007-03-04' AND '2019-12-03' AND t_kc21.CLINIC_TYPE = '住院'
css
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dod_year <= "2112.0" AND prescriptions.drug = "Voriconazole"
mimicsql_data
CREATE TABLE fgwyjzb ( CLINIC_ID text, CLINIC_TYPE 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, ...
SELECT gwyjzb.FLX_MED_ORG_ID FROM gwyjzb WHERE gwyjzb.MED_CLINIC_ID = '43267723179' UNION SELECT fgwyjzb.FLX_MED_ORG_ID FROM fgwyjzb WHERE fgwyjzb.MED_CLINIC_ID = '43267723179'
css
CREATE TABLE table_name_64 ( ihsaa_class VARCHAR, year_joined VARCHAR, mascot VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which ISHAA school joined in 2012 and has a mascot of the panthers?
SELECT ihsaa_class FROM table_name_64 WHERE year_joined < 2012 AND mascot = "panthers"
sql_create_context
CREATE TABLE table_46216 ( "Date" text, "Opponent" text, "Location" text, "Time" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where did the Lightning play the NY Rangers at 7:00 pm?
SELECT "Location" FROM table_46216 WHERE "Opponent" = 'ny rangers' AND "Time" = '7:00 pm'
wikisql
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "HOME HEALTH CARE" AND procedures.short_title = "Tonsil&adenoid biopsy"
mimicsql_data
CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varchar...
SELECT DISTINCT course.department, course.name, course.number, program_course.category FROM course, course_offering, program_course, semester WHERE course.course_id = course_offering.course_id AND program_course.category IN ('PreMajor', 'MDE') AND program_course.course_id = course.course_id AND semester.semester = 'Spr...
advising
CREATE TABLE table_name_2 ( name VARCHAR, rocket VARCHAR, block VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What name has a Rocket of titan iv(401)b and a Block of block i/ii hybrid?
SELECT name FROM table_name_2 WHERE rocket = "titan iv(401)b" AND block = "block i/ii hybrid"
sql_create_context
CREATE TABLE table_name_27 ( language VARCHAR, director VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the language of the film directed by Federico Fellini?
SELECT language FROM table_name_27 WHERE director = "federico fellini"
sql_create_context
CREATE TABLE table_59105 ( "Child" text, "Date of birth" text, "Mother" text, "Father" text, "DNA testing status" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the father that was born on January 2, 1842?
SELECT "Father" FROM table_59105 WHERE "Date of birth" = 'january 2, 1842'
wikisql
CREATE TABLE table_name_64 ( launched VARCHAR, ship VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What launch has a Ship of fearless?
SELECT launched FROM table_name_64 WHERE ship = "fearless"
sql_create_context
CREATE TABLE table_49969 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" real, "Money ( $ )" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the place when the score is 68-72-77-74=291?
SELECT "Place" FROM table_49969 WHERE "Score" = '68-72-77-74=291'
wikisql
CREATE TABLE table_name_41 ( tropical_lows INTEGER, season VARCHAR, tropical_cyclones VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the least amount of tropical lows for the 1993 94 season with less than 11 tropical cyclones
SELECT MIN(tropical_lows) FROM table_name_41 WHERE season = "1993–94" AND tropical_cyclones < 11
sql_create_context
CREATE TABLE table_name_17 ( rally_name VARCHAR, surface VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Rally Name has a Surface of asphalt and gravel?
SELECT rally_name FROM table_name_17 WHERE surface = "asphalt and gravel"
sql_create_context
CREATE TABLE table_58035 ( "Round" real, "Player" text, "Nationality" text, "NHL Team" text, "College/Junior/Club Team (League)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the nhl team for round 10?
SELECT "NHL Team" FROM table_58035 WHERE "Round" = '10'
wikisql
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 admissions ( row_id number, subject_id number, hadm...
SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT t1.itemid FROM (SELECT inputevents_cv.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM inputevents_cv WHERE DATETIME(inputevents_cv.charttime) <= DATETIME(CURRENT_TIME(), '-2 year') GROUP BY inputevents_cv.itemid) AS t1 WHERE t1.c1 <= 3)
mimic_iii
CREATE TABLE table_name_6 ( nationality VARCHAR, college_junior_club_team__league_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the nationality of the player who played for the Peterborough Petes (OHL)?
SELECT nationality FROM table_name_6 WHERE college_junior_club_team__league_ = "peterborough petes (ohl)"
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 person_info.JGDM, person_info.JGMC, COUNT(person_info.RYBH) FROM person_info JOIN hz_info JOIN mzjzjlb 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 WHERE mzjzjlb.JZZDSM = '嗜眠症' GROUP BY person_info.JGDM
css
CREATE TABLE table_1601027_2 ( succeeded_by VARCHAR, earpads VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name what succeeded by for foam
SELECT succeeded_by FROM table_1601027_2 WHERE earpads = "Foam"
sql_create_context
CREATE TABLE table_name_51 ( ngc_number INTEGER, declination___j2000__ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the highest ngc number when the declination (j2000) is 25 26 ?
SELECT MAX(ngc_number) FROM table_name_51 WHERE declination___j2000__ = "°25′26″"
sql_create_context
CREATE TABLE table_13858 ( "Date" text, "Label" text, "Format" text, "Country" text, "Catalog" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was the release that was in SACD (hybrid) format?
SELECT "Date" FROM table_13858 WHERE "Format" = 'sacd (hybrid)'
wikisql
CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text te...
SELECT P.OwnerUserId AS "user_link", SUM(CASE WHEN P.Score < @Cap THEN P.Score ELSE @Cap END) AS TotalScore, COUNT(*) AS "#Answers" FROM Posts AS P INNER JOIN PostTags AS PT ON PT.PostId = P.ParentId INNER JOIN Tags AS T ON T.Id = PT.TagId WHERE T.TagName = '##TagName##' AND NOT P.OwnerUserId IS NULL GROUP BY P.OwnerUs...
sede
CREATE TABLE table_name_57 ( method VARCHAR, time VARCHAR, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the method of resolution for the fight that had a time of 5:00 and a record of 5-0?
SELECT method FROM table_name_57 WHERE time = "5:00" AND record = "5-0"
sql_create_context
CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, Delet...
SELECT COUNT(*) FROM Users
sede
CREATE TABLE table_name_51 ( catalogue VARCHAR, track VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What cataglogue has 27 tracks?
SELECT catalogue FROM table_name_51 WHERE track = 27
sql_create_context
CREATE TABLE table_31066 ( "Week of" text, "Tournament" text, "Champion" text, "Runner-up" text, "Semifinalists" text, "Quarterfinalists" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who were the semifinalists when sammy giammalva was runner-u...
SELECT "Semifinalists" FROM table_31066 WHERE "Runner-up" = 'Sammy Giammalva'
wikisql
CREATE TABLE table_50636 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Round" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was Gassaway's record at the fight in mississippi, united states against anthony ...
SELECT "Record" FROM table_50636 WHERE "Location" = 'mississippi, united states' AND "Opponent" = 'anthony macias'
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 prescriptions...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.charttime = "2144-12-08 03:27:00"
mimicsql_data
CREATE TABLE table_name_57 ( date VARCHAR, partner VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Date of the match with a Score of 0 6, 2 6 with Partner Marcella Mesker?
SELECT date FROM table_name_57 WHERE partner = "marcella mesker" AND score = "0–6, 2–6"
sql_create_context
CREATE TABLE table_55121 ( "Episode #" real, "# in Season" real, "Episode Name" text, "Airdate" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average episode # located in Tanzania and whose # in season is larger than 5?...
SELECT AVG("Episode #") FROM table_55121 WHERE "Location" = 'tanzania' AND "# in Season" > '5'
wikisql
CREATE TABLE people ( People_ID int, Sex text, Name text, Date_of_Birth text, Height real, Weight real ) CREATE TABLE candidate ( Candidate_ID int, People_ID int, Poll_Source text, Date text, Support_rate real, Consider_rate real, Oppose_rate real, Unsure_rate re...
SELECT Sex, SUM(Height) FROM people GROUP BY Sex ORDER BY SUM(Height) DESC
nvbench
CREATE TABLE table_73103 ( "No. in season" real, "No. in series" real, "Title" text, "Canadian airdate" text, "US airdate" text, "Production code" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many U.S. air dates were from an episode in Sea...
SELECT COUNT("US airdate") FROM table_73103 WHERE "No. in season" = '4'
wikisql
CREATE TABLE table_name_19 ( competition VARCHAR, assists INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What competition had more than 40 assists?
SELECT competition FROM table_name_19 WHERE assists > 40
sql_create_context
CREATE TABLE Services ( Service_ID INTEGER, Service_Type_Code CHAR(15) ) CREATE TABLE Participants_in_Events ( Event_ID INTEGER, Participant_ID INTEGER ) CREATE TABLE Events ( Event_ID INTEGER, Service_ID INTEGER, Event_Details VARCHAR(255) ) CREATE TABLE Participants ( Participant_ID...
SELECT T1.Event_Details, T1.Event_ID FROM Events AS T1 JOIN Participants_in_Events AS T2 ON T1.Event_ID = T2.Event_ID GROUP BY T1.Event_Details
nvbench
CREATE TABLE table_name_21 ( ae_2011 INTEGER, forbes_2011 VARCHAR, ft_2011 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average AE 2011 ranking with a Forbes 2011 ranking of 24 and a FT 2011 ranking less than 44?
SELECT AVG(ae_2011) FROM table_name_21 WHERE forbes_2011 = 24 AND ft_2011 < 44
sql_create_context
CREATE TABLE table_203_33 ( id number, "conference" text, "date" text, "place" text, "attendance" number, "archive of presentations" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many days was the wikimania 2011 ?
SELECT "date" - "date" FROM table_203_33 WHERE "conference" = 'wikimania 2011'
squall
CREATE TABLE table_204_968 ( id number, "squad #" number, "position" text, "player" text, "transferred to" text, "fee" text, "date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many consecutive players were released on july 9 ?
SELECT COUNT("player") FROM table_204_968 WHERE "date" = '9 july 2012'
squall
CREATE TABLE table_name_61 ( result VARCHAR, nominated_work VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Did the nominated work of white valentine win an award?
SELECT result FROM table_name_61 WHERE nominated_work = "white valentine"
sql_create_context
CREATE TABLE table_name_34 ( fall_09 INTEGER, fall_05 INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the mean Fall 09 number where fall 05 is less than 3?
SELECT AVG(fall_09) FROM table_name_34 WHERE fall_05 < 3
sql_create_context
CREATE TABLE people ( People_ID int, Sex text, Name text, Date_of_Birth text, Height real, Weight real ) CREATE TABLE candidate ( Candidate_ID int, People_ID int, Poll_Source text, Date text, Support_rate real, Consider_rate real, Oppose_rate real, Unsure_rate re...
SELECT Name, Weight FROM people ORDER BY Name DESC
nvbench
CREATE TABLE table_51306 ( "Year" real, "Design" text, "Issue" text, "Artist" text, "Mintage" real, "Issue Price" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What artist has a mintage of greater than 34,135?
SELECT "Artist" FROM table_51306 WHERE "Mintage" > '34,135'
wikisql
CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text ) CREATE TABLE university ( Scho...
SELECT All_Home, AVG(School_ID) FROM basketball_match GROUP BY All_Home ORDER BY AVG(School_ID)
nvbench
CREATE TABLE candidate ( candidate_id number, people_id number, poll_source text, date text, support_rate number, consider_rate number, oppose_rate number, unsure_rate number ) CREATE TABLE people ( people_id number, sex text, name text, date_of_birth text, height nu...
SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t1.sex = 'F' ORDER BY t1.name
spider
CREATE TABLE table_61638 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Date, when Away Team is 'Minehead'?
SELECT "Date" FROM table_61638 WHERE "Away team" = 'minehead'
wikisql
CREATE TABLE table_50379 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was Bill Glasson's score to par after 2 rounds?
SELECT "To par" FROM table_50379 WHERE "Player" = 'bill glasson'
wikisql
CREATE TABLE table_29102 ( "Series #" real, "Episode #" real, "Title" text, "Director" text, "Writer" text, "Original airdate" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the first numbered episode in the series titled 'the wind bene...
SELECT MIN("Series #") FROM table_29102 WHERE "Title" = 'The Wind Beneath Our Wings'
wikisql
CREATE TABLE table_name_29 ( track VARCHAR, distance VARCHAR, race VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the race with the track distance of 6 furlongs and spectacular bid stakes?
SELECT track FROM table_name_29 WHERE distance = "6 furlongs" AND race = "spectacular bid stakes"
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 jyjgzbb.JCXMMC, jyjgzbb.JCZBDM, jyjgzbb.JCZBMC, jyjgzbb.JCFF FROM jyjgzbb WHERE jyjgzbb.JYZBLSH = '39909874653'
css
CREATE TABLE t_kc21 ( CLINIC_ID text, CLINIC_TYPE 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, ...
SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_ID = '76340683' AND t_kc21.MED_SER_ORG_NO = '3169811' AND t_kc21.OUT_DIAG_DIS_NM LIKE '%妊娠%'
css
CREATE TABLE table_name_43 ( rank VARCHAR, time VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the rank when the time was 59.65?
SELECT rank FROM table_name_43 WHERE time = "59.65"
sql_create_context
CREATE TABLE table_203_671 ( id number, "name" text, "rank" text, "age" number, "years until mandatory retirement" text, "appointed by" text, "year appointed" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who has the most number of years ...
SELECT "name" FROM table_203_671 ORDER BY "years until mandatory retirement" DESC LIMIT 1
squall
CREATE TABLE table_name_6 ( position VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What position does Zack Torquato play?
SELECT position FROM table_name_6 WHERE player = "zack torquato"
sql_create_context
CREATE TABLE table_name_33 ( score VARCHAR, place VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Score of the T3 Place Player?
SELECT score FROM table_name_33 WHERE place = "t3"
sql_create_context
CREATE TABLE table_13328239_4 ( opponent VARCHAR, round VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the opponent in round 2?
SELECT opponent FROM table_13328239_4 WHERE round = "2"
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 CYKSDM, CYKSMC FROM zyjzjlb WHERE JZLSH = '94947569717'
css
CREATE TABLE table_39156 ( "Game" real, "October" real, "Opponent" text, "Score" text, "Record" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Score has an October smaller than 15, and a Record of 2 0 0?
SELECT "Score" FROM table_39156 WHERE "October" < '15' AND "Record" = '2–0–0'
wikisql
CREATE TABLE table_73441 ( "Conference" text, "Regular Season Winner" text, "Conference Player of the Year" text, "Conference Tournament" text, "Tournament Venue (City)" text, "Tournament Winner" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Wh...
SELECT "Conference" FROM table_73441 WHERE "Regular Season Winner" = 'Arizona State'
wikisql
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Government" AND procedures.long_title = "Creation of conduit between left ventricle and aorta"
mimicsql_data
CREATE TABLE table_name_38 ( opponent VARCHAR, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the opponent that led to a 10-13 record?
SELECT opponent FROM table_name_38 WHERE record = "10-13"
sql_create_context
CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), SALARY decimal(8,2), COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0), DEPARTMENT_ID decimal(...
SELECT HIRE_DATE, SALARY FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY HIRE_DATE
nvbench