instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_22241 ( "Year to April" real, "Revenue (\u00a3million)" text, "EBIT (\u00a3m)" text, "Net profit (\u00a3m)" text, "Earnings per share (p)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the eps for net profit being 39.2
SELECT "Earnings per share (p)" FROM table_22241 WHERE "Net profit (\u00a3m)" = '39.2'
wikisql
CREATE TABLE table_name_25 ( team_name VARCHAR, poles VARCHAR, final_placing VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Team Name has Poles of 0, and a Final Placing of 29th?
SELECT team_name FROM table_name_25 WHERE poles = "0" AND final_placing = "29th"
sql_create_context
CREATE TABLE table_20424140_3 ( number_of_dances VARCHAR, place VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many different numbers of total dances are there for the couple ranked at number 6?
SELECT COUNT(number_of_dances) FROM table_20424140_3 WHERE place = 6
sql_create_context
CREATE TABLE cite ( citingpaperid int, citedpaperid int ) CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TABLE paperfield ( fieldid int, paperid int ) CREATE TABLE paperdataset ( paperid int, datasetid int ) CREATE TABLE paperkeyphrase ( paperid int, ...
SELECT DISTINCT paper.year, writes.paperid FROM author, paper, writes WHERE author.authorname IN ('Nigam H. Shah', 'Srinivasan Iyer') AND writes.authorid = author.authorid AND writes.paperid = paper.paperid GROUP BY writes.paperid HAVING COUNT(DISTINCT writes.authorid) = 2 ORDER BY paper.year DESC
scholar
CREATE TABLE table_69640 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" real, "Money ( $ )" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the player with score of 73-69-74-71=287
SELECT "Player" FROM table_69640 WHERE "Score" = '73-69-74-71=287'
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 demographic.age, demographic.admittime FROM demographic WHERE demographic.name = "Lawrence Wibbens"
mimicsql_data
CREATE TABLE table_16337329_5 ( past_habitual VARCHAR, probable_future VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the past habitual for garchas 'you (will) do
SELECT past_habitual FROM table_16337329_5 WHERE probable_future = "गर्छस् garchas 'you (will) do'"
sql_create_context
CREATE TABLE table_11545282_11 ( position VARCHAR, nationality VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the position of Turkey
SELECT position FROM table_11545282_11 WHERE nationality = "Turkey"
sql_create_context
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Colosty/enter comp-mech" AND lab.fluid = "Blood"
mimicsql_data
CREATE TABLE table_train_80 ( "id" int, "mini_mental_state_examination_mmse" int, "uncontrolled_diabetes" bool, "glucose_6_phosphate_dehydrogenase_deficiency_g6pd" int, "cornell_scale_for_depression_in_dementia_csdd" int, "clinical_dementia_rating_cdr" float, "age" float, "NOUSE" float )...
SELECT * FROM table_train_80 WHERE uncontrolled_diabetes = 1 OR glucose_6_phosphate_dehydrogenase_deficiency_g6pd > 200
criteria2sql
CREATE TABLE table_18100 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Results" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What party did incumbent Albert Wynn belong to?
SELECT "Party" FROM table_18100 WHERE "Incumbent" = 'Albert Wynn'
wikisql
CREATE TABLE table_train_107 ( "id" int, "systolic_blood_pressure_sbp" int, "body_weight" float, "modified_hachinski_ischemia_scale" int, "diastolic_blood_pressure_dbp" int, "body_mass_index_bmi" float, "clinical_dementia_rating_cdr" float, "NOUSE" float ) -- Using valid SQLite, answer...
SELECT * FROM table_train_107 WHERE body_weight > 120
criteria2sql
CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, Dup...
SELECT COUNT(*) FROM Users
sede
CREATE TABLE table_name_8 ( team VARCHAR, owner_s_ VARCHAR, crew_chief VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What team is owned by Mark Smith and has Paul Clapprood as a crew chief?
SELECT team FROM table_name_8 WHERE owner_s_ = "mark smith" AND crew_chief = "paul clapprood"
sql_create_context
CREATE TABLE table_name_31 ( matches INTEGER, player VARCHAR, total VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- With a Total of less than 29, what is Ian Ryan's most Matches?
SELECT MAX(matches) FROM table_name_31 WHERE player = "ian ryan" AND total < 29
sql_create_context
CREATE TABLE table_train_25 ( "id" int, "bleeding" int, "acute_cerebrovascular_accident_cva" bool, "heart_disease" bool, "trauma" bool, "st_segment_elevation_myocardial_infarction_stemi" bool, "NOUSE" float ) -- Using valid SQLite, answer the following questions for the tables provided abo...
SELECT * FROM table_train_25 WHERE trauma = 1
criteria2sql
CREATE TABLE table_name_62 ( draws INTEGER, losses VARCHAR, byes VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest draw that has 5 losses and byes greater than 0?
SELECT MIN(draws) FROM table_name_62 WHERE losses = 5 AND byes > 0
sql_create_context
CREATE TABLE table_47430 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who had a score of 70-69-70=209?
SELECT "Player" FROM table_47430 WHERE "Score" = '70-69-70=209'
wikisql
CREATE TABLE mzjybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH number, 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, ...
SELECT jyjgzbb.JYZBLSH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN zyjybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB AND zyjybgb.Y...
css
CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_fli...
SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DALLAS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_...
atis
CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TAB...
SELECT CURRENT_TIMESTAMP()
sede
CREATE TABLE table_name_69 ( name VARCHAR, roll VARCHAR, decile VARCHAR, authority VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What integrated school had a decile of 2 and a roll larger than 55?
SELECT name FROM table_name_69 WHERE decile = 2 AND authority = "integrated" AND roll > 55
sql_create_context
CREATE TABLE table_name_68 ( draws INTEGER, south_west_dfl VARCHAR, byes VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest value for Draws, when South West DFL is 'Tyrendarra', and when Byes is greater than 0?
SELECT MIN(draws) FROM table_name_68 WHERE south_west_dfl = "tyrendarra" AND byes > 0
sql_create_context
CREATE TABLE table_68159 ( "Year" real, "Competition" text, "Venue" text, "Position" text, "Event" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the highest Year for the Venue of Santiago De Chile and the Event of 800 m?
SELECT MAX("Year") FROM table_68159 WHERE "Event" = '800 m' AND "Venue" = 'santiago de chile'
wikisql
CREATE TABLE table_74065 ( "Total #" real, "Episode #" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many different episode numbers are there for the episodes di...
SELECT COUNT("Total #") FROM table_74065 WHERE "Directed by" = 'Sheri Elwood'
wikisql
CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) C...
SELECT DISTINCT FLIGHT_0.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, airport_service AS AIRPORT_SERVICE_3, city AS CITY_0, city AS CITY_1, city AS CITY_2, city AS CITY_3, fare, fare_basis, flight AS FLIGHT_0, flight AS FLIGHT_1, flight...
atis
CREATE TABLE table_57874 ( "Track" real, "Title" text, "Translation" text, "Composer" text, "Recorded" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the recorded date of track 8?
SELECT "Recorded" FROM table_57874 WHERE "Track" = '8'
wikisql
CREATE TABLE table_name_65 ( language VARCHAR, content VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What language has viaggi as the content?
SELECT language FROM table_name_65 WHERE content = "viaggi"
sql_create_context
CREATE TABLE table_54387 ( "Week" text, "Date" text, "Opponent" text, "Result" text, "Kickoff [a ]" text, "Game site" text, "Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which game had a kickoff at 1:00 and a...
SELECT "Opponent" FROM table_54387 WHERE "Kickoff [a ]" = '1:00' AND "Record" = '3-7'
wikisql
CREATE TABLE temperature ( city_id number, jan number, feb number, mar number, apr number, jun number, jul number, aug number, sep number, oct number, nov number, dec number ) CREATE TABLE city ( city_id number, city text, hanzi text, hanyu_pinyin text, ...
SELECT city, gdp FROM city ORDER BY gdp LIMIT 1
spider
CREATE TABLE customer_addresses ( customer_id number, address_id number, date_address_from time, address_type text, date_address_to time ) CREATE TABLE customer_contact_channels ( customer_id number, channel_code text, active_from_date time, active_to_date time, contact_number t...
SELECT customer_name FROM customers
spider
CREATE TABLE table_name_35 ( power_notation VARCHAR, long_scale VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- For a long scale of one million, what is the power notion?
SELECT power_notation FROM table_name_35 WHERE long_scale = "one million"
sql_create_context
CREATE TABLE journal ( Theme VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show the distinct themes of journals.
SELECT DISTINCT Theme FROM journal
sql_create_context
CREATE TABLE table_name_47 ( total INTEGER, year_s__won VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the average total for years won of 1975
SELECT AVG(total) FROM table_name_47 WHERE year_s__won = "1975"
sql_create_context
CREATE TABLE journal ( Journal_ID int, Date text, Theme text, Sales int ) CREATE TABLE journal_committee ( Editor_ID int, Journal_ID int, Work_Type text ) CREATE TABLE editor ( Editor_ID int, Name text, Age real ) -- Using valid SQLite, answer the following questions for the ...
SELECT Name, COUNT(Name) FROM editor GROUP BY Name ORDER BY COUNT(Name) DESC
nvbench
CREATE TABLE table_20310 ( "Week #" text, "Theme" text, "Song choice" text, "Original artist" text, "Order #" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the original artist when the theme was 1980s?
SELECT "Original artist" FROM table_20310 WHERE "Theme" = '1980s'
wikisql
CREATE TABLE table_64977 ( "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 County has a School of bloomfield?
SELECT "County" FROM table_64977 WHERE "School" = 'bloomfield'
wikisql
CREATE TABLE table_17102076_10 ( game INTEGER, location_attendance VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the least game for arco arena 13,330
SELECT MIN(game) FROM table_17102076_10 WHERE location_attendance = "ARCO Arena 13,330"
sql_create_context
CREATE TABLE table_name_8 ( date VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Date, when Score is '80-79'?
SELECT date FROM table_name_8 WHERE score = "80-79"
sql_create_context
CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, city_code text ) CREATE TABLE allergy_type ( allergy text, allergytype text ) CREATE TABLE has_allergy ( stuid number, allergy text ) -- Using valid SQLite...
SELECT DISTINCT allergy FROM allergy_type WHERE allergytype = "food"
spider
CREATE TABLE table_12033013_3 ( directed_by VARCHAR, production_code VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who directed the episode with a production code 3ADK-03?
SELECT directed_by FROM table_12033013_3 WHERE production_code = "3ADK-03"
sql_create_context
CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) 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_cod...
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 = 'MONTREAL' AND CITY_1.country_name = 'CANADA' AND date_day.day_number = 24...
atis
CREATE TABLE table_name_26 ( record VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the record for the opponent the Cleveland Cavaliers?
SELECT record FROM table_name_26 WHERE opponent = "cleveland cavaliers"
sql_create_context
CREATE TABLE table_33487 ( "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 scored 5.7 (37)?
SELECT "Home team" FROM table_33487 WHERE "Home team score" = '5.7 (37)'
wikisql
CREATE TABLE table_5445 ( "National team" text, "Club" text, "Season" text, "Apps" real, "Goals" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What club had over 0 goals in 2011?
SELECT "Club" FROM table_5445 WHERE "Goals" > '0' AND "Season" = '2011'
wikisql
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "LEFT AGAINST MEDICAL ADVI" AND procedures.icd9_code = "3324"
mimicsql_data
CREATE TABLE table_name_8 ( lost INTEGER, drawn VARCHAR, games VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Lost has a Drawn larger than 1, and Games smaller than 7?
SELECT MIN(lost) FROM table_name_8 WHERE drawn > 1 AND games < 7
sql_create_context
CREATE TABLE table_name_37 ( number_ VARCHAR, _name VARCHAR, date INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the number and name where the date is earlier than 1905?
SELECT number_ & _name FROM table_name_37 WHERE date < 1905
sql_create_context
CREATE TABLE table_1341738_19 ( district VARCHAR, incumbent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What district did Joe Waggonner belong to?
SELECT district FROM table_1341738_19 WHERE incumbent = "Joe Waggonner"
sql_create_context
CREATE TABLE table_62800 ( "Pos." real, "Car #" real, "Driver" text, "Make" text, "Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Car # has a Driver of ryan newman, and a Position larger than 10?
SELECT MIN("Car #") FROM table_62800 WHERE "Driver" = 'ryan newman' AND "Pos." > '10'
wikisql
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) 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 ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "MARRIED"
mimicsql_data
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE patient ( unique...
SELECT t3.labname FROM (SELECT t2.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'depression' AND DATETIME(diagnosis.diagnosistime, 's...
eicu
CREATE TABLE table_203_420 ( id number, "#" number, "stadium" text, "capacity" number, "city" text, "home team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the maximum number of people that can attend an event at windsor park ?
SELECT "capacity" FROM table_203_420 WHERE "stadium" = 'windsor park'
squall
CREATE TABLE table_41691 ( "Rank" real, "Province" text, "Population" real, "Area" real, "Density" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest Density for the independencia province, with an area smaller than 2,007.4?
SELECT MAX("Density") FROM table_41691 WHERE "Province" = 'independencia' AND "Area" < '2,007.4'
wikisql
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemics...
SELECT allergy.allergyname FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-15869')) AND STRFTIME('%y-%m', allergy.allergytime) <= '2105-11'
eicu
CREATE TABLE t_kc21 ( MED_CLINIC_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, COMP_ID text, PERSON_ID text, PERSON_NM text, IDENTITY_CARD text, SOC_SRT_CARD text, PERSON_SEX number, PERSON_AGE number, IN_HOSP_DATE time, OUT_HOSP_DATE time, DIFF_PLACE_FLG numb...
SELECT COUNT(*) FROM t_kc22 WHERE MED_ORG_DEPT_CD = '2152' AND STA_DATE BETWEEN '2005-01-25' AND '2018-04-07' AND SOC_SRT_DIRE_NM = '奥卡西平片(薄膜衣)'
css
CREATE TABLE injury_accident ( game_id int, id int, Player text, Injury text, Number_of_matches text, Source text ) CREATE TABLE game ( stadium_id int, id int, Season int, Date text, Home_team text, Away_team text, Score text, Competition text ) CREATE TABLE sta...
SELECT Season, COUNT(Season) FROM game GROUP BY Away_team ORDER BY Season DESC
nvbench
CREATE TABLE table_name_82 ( college VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What college did Richard Ticzon attend?
SELECT college FROM table_name_82 WHERE player = "richard ticzon"
sql_create_context
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) 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...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND procedures.short_title = "Cystoscopy NEC"
mimicsql_data
CREATE TABLE table_45989 ( "Gatchaman" text, "Battle of the Planets" text, "G-Force" text, "Eagle Riders" text, "OVA (Harmony Gold Dub)" text, "Rank" text, "Bird Uniform" text, "Weapon" text, "Mecha" text, "Japanese voice actor" text, "Voice actor (BOTP)" text, "Voice act...
SELECT "Japanese voice actor" FROM table_45989 WHERE "Mecha" = 'airplane'
wikisql
CREATE TABLE jyjgzbb ( JYZBLSH text, YLJGDM text, BGDH text, BGRQ time, JYRQ time, JCRGH text, JCRXM text, SHRGH text, SHRXM text, JCXMMC text, JCZBDM text, JCFF text, JCZBMC text, JCZBJGDX text, JCZBJGDL number, JCZBJGDW text, SBBM text, YQBH text...
SELECT (SELECT COUNT(*) 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 = '张承悦' AND mzjzjlb.JZKSRQ BETWEEN '2004-12-30' AND '2008-02-28') + (SELECT COUNT(*) FROM person_info J...
css
CREATE TABLE table_name_18 ( bike VARCHAR, grid VARCHAR, time VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the bike that has a grid number smaller than 9 with a time of +7.764?
SELECT bike FROM table_name_18 WHERE grid < 9 AND time = "+7.764"
sql_create_context
CREATE TABLE zyb ( CLINIC_ID text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, INSU_TYPE text, IN...
SELECT * FROM qtb WHERE qtb.MED_SER_ORG_NO = '2376078' AND qtb.IN_HOSP_DATE BETWEEN '2013-06-11' AND '2014-03-10' UNION SELECT * FROM gyb WHERE gyb.MED_SER_ORG_NO = '2376078' AND gyb.IN_HOSP_DATE BETWEEN '2013-06-11' AND '2014-03-10' UNION SELECT * FROM zyb WHERE zyb.MED_SER_ORG_NO = '2376078' AND zyb.IN_HOSP_DATE BETW...
css
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 qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_AGE <= 17 UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_AGE <= 17 UNION SELECT zyb.MED_CLINIC_ID FROM zyb WHERE zyb.PERSON_AGE <= 17 UNION SELECT mzb.MED_CLINIC_ID FROM mzb WHERE mzb.PER...
css
CREATE TABLE table_name_68 ( Box VARCHAR, away_team VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the Box Score which has an Away team of new zealand breakers on 7 february?
SELECT Box AS score FROM table_name_68 WHERE away_team = "new zealand breakers" AND date = "7 february"
sql_create_context
CREATE TABLE table_14496232_2 ( tour VARCHAR, mens_singles VARCHAR, womens_doubles VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the tour when mens singles is chen jin and womens doubles is zhang yawen zhao tingting
SELECT tour FROM table_14496232_2 WHERE mens_singles = "Chen Jin" AND womens_doubles = "Zhang Yawen Zhao Tingting"
sql_create_context
CREATE TABLE COURSE ( Id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many courses are there in total?
SELECT COUNT(*) FROM COURSE
sql_create_context
CREATE TABLE table_name_21 ( score VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Score of the game on March 19?
SELECT score FROM table_name_21 WHERE date = "march 19"
sql_create_context
CREATE TABLE table_2501754_4 ( episode__number INTEGER, viewing_figures_millions VARCHAR, prod_code VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest episode number with 6.19 million viewers and a production code of icec487y?
SELECT MIN(episode__number) FROM table_2501754_4 WHERE viewing_figures_millions = "6.19" AND prod_code = "ICEC487Y"
sql_create_context
CREATE TABLE table_62061 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which To par has a Player of bernhard langer?
SELECT "To par" FROM table_62061 WHERE "Player" = 'bernhard langer'
wikisql
CREATE TABLE table_17325580_10 ( game INTEGER, high_assists VARCHAR, high_points VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What number game had a high assist of lebron james (7) and high point of lebron james (21)?
SELECT MAX(game) FROM table_17325580_10 WHERE high_assists = "LeBron James (7)" AND high_points = "LeBron James (21)"
sql_create_context
CREATE TABLE table_17682 ( "Region/Country" text, "Local name" text, "Network" text, "Dates aired" text, "Starring" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In how many networks the local name of the franchise was 'in sickness and in health'?
SELECT COUNT("Network") FROM table_17682 WHERE "Local name" = 'In Sickness and in Health'
wikisql
CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int ) CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE swimme...
SELECT meter_200, AVG(meter_100) FROM swimmer GROUP BY meter_200 ORDER BY AVG(meter_100) DESC
nvbench
CREATE TABLE table_4836 ( "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 score against an Away team...
SELECT "Home team score" FROM table_4836 WHERE "Away team score" = '8.15 (63)'
wikisql
CREATE TABLE table_name_99 ( grid INTEGER, laps VARCHAR, time_retired VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which grid has less than 11 laps, and a Time/Retired of accident?
SELECT AVG(grid) FROM table_name_99 WHERE laps < 11 AND time_retired = "accident"
sql_create_context
CREATE TABLE table_name_57 ( seats INTEGER, model VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many seats does the BTC-5 model have?
SELECT SUM(seats) FROM table_name_57 WHERE model = "btc-5"
sql_create_context
CREATE TABLE person_info ( RYBH text, XBDM number, XBMC text, XM text, CSRQ time, CSD text, MZDM text, MZMC text, GJDM text, GJMC text, JGDM text, JGMC text, XLDM text, XLMC text, ZYLBDM text, ZYMC text ) CREATE TABLE mzjzjlb ( YLJGDM text, JZLSH ...
SELECT JCZBMC, JCZBJGDW, AVG(JCZBJGDL) FROM jyjgzbb WHERE YLJGDM = '8996226' AND BGRQ BETWEEN '2010-06-14' AND '2013-12-07' GROUP BY JCZBMC, JCZBJGDW ORDER BY AVG(JCZBJGDL) LIMIT 26
css
CREATE TABLE table_55719 ( "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 venue of the Melbourne team?
SELECT "Venue" FROM table_55719 WHERE "Home team" = 'melbourne'
wikisql
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.JCFF FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyj...
css
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 treatment ( treatmentid...
SELECT microlab.culturetakentime FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-3355' AND patient.hospitaldischargetime IS NULL)) AND microla...
eicu
CREATE TABLE table_76143 ( "Title" text, "Season" text, "Winner" text, "Score" text, "Runner-up" text, "Venue" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Attendance number for the title of 44th?
SELECT "Attendance" FROM table_76143 WHERE "Title" = '44th'
wikisql
CREATE TABLE table_13758243_1 ( player VARCHAR, position VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What kicker was drafted?
SELECT player FROM table_13758243_1 WHERE position = "Kicker"
sql_create_context
CREATE TABLE table_name_43 ( february INTEGER, opponent VARCHAR, game VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest Feb value having an opponent of the Philadelphia Flyers and is after game 63?
SELECT MAX(february) FROM table_name_43 WHERE opponent = "philadelphia flyers" AND game > 63
sql_create_context
CREATE TABLE table_28606933_7 ( total INTEGER, period VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many consecutive starts for the linebacker who played from 9/21/1975 12/16/1984?
SELECT MAX(total) FROM table_28606933_7 WHERE period = "9/21/1975 – 12/16/1984"
sql_create_context
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.expire_flag = "1" AND demographic.days_stay > "69"
mimicsql_data
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 T1.Price, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code
nvbench
CREATE TABLE Maintenance_Engineers ( engineer_id INTEGER, company_id INTEGER, first_name VARCHAR(50), last_name VARCHAR(50), other_details VARCHAR(255) ) CREATE TABLE Parts ( part_id INTEGER, part_name VARCHAR(255), chargeable_yn VARCHAR(1), chargeable_amount VARCHAR(20), other_...
SELECT first_name, COUNT(first_name) FROM Maintenance_Engineers AS T1 JOIN Engineer_Skills AS T2 ON T1.engineer_id = T2.engineer_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id GROUP BY first_name ORDER BY COUNT(first_name)
nvbench
CREATE TABLE table_name_49 ( crowd INTEGER, home_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When the home team was Richmond, what was the largest crowd?
SELECT MAX(crowd) FROM table_name_49 WHERE home_team = "richmond"
sql_create_context
CREATE TABLE table_22028 ( "Home (1st leg)" text, "Home (2nd leg)" text, "1st Leg" text, "2nd leg" text, "Aggregate" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the aggregate when the second leg is 1-3?
SELECT "Aggregate" FROM table_22028 WHERE "2nd leg" = '1-3'
wikisql
CREATE TABLE table_20466963_4 ( guest_1 VARCHAR, guest_4 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the guest 1 in the episode where guest 4 is Jill Douglas?
SELECT guest_1 FROM table_20466963_4 WHERE guest_4 = "Jill Douglas"
sql_create_context
CREATE TABLE table_name_63 ( league_cup_apps INTEGER, fa_cup_goals VARCHAR, fa_cup_apps VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of league cup appearances for the players with FA cup goals larger than 0 and FA cup appearances less t...
SELECT SUM(league_cup_apps) FROM table_name_63 WHERE fa_cup_goals > 0 AND fa_cup_apps < 2
sql_create_context
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE d_labitems ( row_id numbe...
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', icustays.intime)) FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 65582) AND icustays.outtime IS NULL
mimic_iii
CREATE TABLE table_name_16 ( class VARCHAR, city_of_license VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the Class for the city the license plate was issued in great barrington, massachusetts?
SELECT class FROM table_name_16 WHERE city_of_license = "great barrington, massachusetts"
sql_create_context
CREATE TABLE table_77525 ( "Diagram(s)" text, "Quantity" real, "Numbers" text, "Completed" real, "Length" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the numbers for the item completed earlier than 1904?
SELECT "Numbers" FROM table_77525 WHERE "Completed" < '1904'
wikisql
CREATE TABLE Courses ( course_id INTEGER, author_id INTEGER, subject_id INTEGER, course_name VARCHAR(120), course_description VARCHAR(255) ) CREATE TABLE Subjects ( subject_id INTEGER, subject_name VARCHAR(120) ) CREATE TABLE Student_Tests_Taken ( registration_id INTEGER, date_test...
SELECT date_of_latest_logon, COUNT(date_of_latest_logon) FROM Students WHERE family_name = "Jaskolski" OR family_name = "Langosh" ORDER BY COUNT(date_of_latest_logon)
nvbench
CREATE TABLE table_59166 ( "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. -- On what date does Watford have a Tie no of 2?
SELECT "Date" FROM table_59166 WHERE "Home team" = 'watford' AND "Tie no" = '2'
wikisql
CREATE TABLE table_9020 ( "Verb" text, "2 (VF)" text, "2 (F)" text, "3 (F)" text, "2/3 (P)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the 2 (VF) which has a 2 (F) of dhute?
SELECT "2 (VF)" FROM table_9020 WHERE "2 (F)" = 'তুমি dhute'
wikisql
CREATE TABLE table_69895 ( "Rank" real, "Player" text, "County" text, "Tally" text, "Total" real, "Opposition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What County has Dublin as the Opposition?
SELECT "County" FROM table_69895 WHERE "Opposition" = 'dublin'
wikisql
CREATE TABLE table_1289860_2 ( hometown VARCHAR, background VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where is the real estate agent from?
SELECT hometown FROM table_1289860_2 WHERE background = "Real Estate agent"
sql_create_context
CREATE TABLE table_1560673_1 ( position_in_2013 VARCHAR, first_season VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What position is the player whose first year is 2014
SELECT position_in_2013 FROM table_1560673_1 WHERE first_season = 2014
sql_create_context