instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_51108 ( "Rider" text, "Manufacturer" text, "Laps" real, "Time" text, "Grid" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the Time which has Laps of 19, and a Grid larger than 19, and a Manufacturer of ktm, and a Rider of ra...
SELECT "Time" FROM table_51108 WHERE "Laps" = '19' AND "Grid" > '19' AND "Manufacturer" = 'ktm' AND "Rider" = 'randy krummenacher'
wikisql
CREATE TABLE table_name_54 ( lithium VARCHAR, rubidium VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the type of lithium when rubidium is nabr (1.9)?
SELECT lithium FROM table_name_54 WHERE rubidium = "nabr (1.9)"
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 jybgb.SHSJ FROM hz_info JOIN mzjzjlb JOIN jybgb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE hz_info.RYBH = '47198797' AND jybgb.BGRQ BETWEEN '2007-11-06' AND '2012-05-08' UNION...
css
CREATE TABLE table_67332 ( "Rank" text, "Country" text, "2009" text, "2010" text, "2011" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the production in 2010 with rank of 8?
SELECT "2010" FROM table_67332 WHERE "Rank" = '8'
wikisql
CREATE TABLE table_22612 ( "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. -- Wh...
SELECT "High assists" FROM table_22612 WHERE "Date" = 'July 26'
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 demographic.admission_location, diagnoses.icd9_code FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "2560"
mimicsql_data
CREATE TABLE table_name_34 ( e_greenberg VARCHAR, t_wyka VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which E. Greenberg has a T. Wyka of 10,793 (70%)?
SELECT e_greenberg FROM table_name_34 WHERE t_wyka = "10,793 (70%)"
sql_create_context
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE microlab ( microlabid number, ...
SELECT t1.drugstarttime FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'ondansetron' AND patient.uniquepid = '006-97726' AND STRFTIME('%y-%m', medication.drugstarttime) = '2104-02') AS t1 JOIN ...
eicu
CREATE TABLE table_name_76 ( yellow INTEGER, category VARCHAR, amerindian VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of Yellow, when Category is Bugre (Indian), and when Amerindian is less than 50,00?
SELECT SUM(yellow) FROM table_name_76 WHERE category = "bugre (indian)" AND amerindian < 50 OFFSET 00
sql_create_context
CREATE TABLE table_7106 ( "Tournament" text, "Wins" real, "Top-5" real, "Top-10" real, "Top-25" real, "Events" real, "Cuts made" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest top-25 of the tournament with less than 22 ev...
SELECT MAX("Top-25") FROM table_7106 WHERE "Events" < '22' AND "Top-10" > '1'
wikisql
CREATE TABLE table_21132404_1 ( political_parties VARCHAR, _percentage_2006 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many political parties had a %2006 rating of 43.5?
SELECT COUNT(political_parties) FROM table_21132404_1 WHERE _percentage_2006 = "43.5"
sql_create_context
CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE ...
SELECT 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 = 87733)) AND DATETIME(outputevents.charttim...
mimic_iii
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE cost ( r...
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t1.icd9_code FROM (SELECT diagnoses_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnoses_icd WHERE diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age BETWEEN...
mimic_iii
CREATE TABLE table_64247 ( "Year" real, "Title" text, "Director" text, "Studio(s)" text, "Notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What studio had the director Peter Lord Nick Park before 2004?
SELECT "Studio(s)" FROM table_64247 WHERE "Year" < '2004' AND "Director" = 'peter lord nick park'
wikisql
CREATE TABLE table_72137 ( "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. -- The canadian airdate of 11 february 2008 applied to...
SELECT COUNT("No. in series") FROM table_72137 WHERE "Canadian airdate" = '11 February 2008'
wikisql
CREATE TABLE medicine_enzyme_interaction ( enzyme_id number, medicine_id number, interaction_type text ) CREATE TABLE enzyme ( id number, name text, location text, product text, chromosome text, omim number, porphyria text ) CREATE TABLE medicine ( id number, name text,...
SELECT name, trade_name FROM medicine EXCEPT SELECT T1.name, T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id JOIN enzyme AS T3 ON T3.id = T2.enzyme_id WHERE T3.product = 'Protoporphyrinogen IX'
spider
CREATE TABLE table_26137666_3 ( pole_position VARCHAR, circuit VARCHAR, winning_driver VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is every pole position for the Castle Combe circuit and Robbie Kerr is the winning driver?
SELECT pole_position FROM table_26137666_3 WHERE circuit = "Castle Combe" AND winning_driver = "Robbie Kerr"
sql_create_context
CREATE TABLE table_23295 ( "#" real, "Player" text, "Age" real, "Australian Open" real, "French Open" real, "Wimbledon" real, "US Open" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many players are on this list?
SELECT MAX("#") FROM table_23295
wikisql
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 WHERE t_kc22.t_kc21_IN_DIAG_DIS_CD = 'Y80.928'
css
CREATE TABLE table_13759 ( "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. -- What is the highest debut year for player Joe Youlden, with goals larger than 0?
SELECT MAX("Debut year") FROM table_13759 WHERE "Player" = 'joe youlden' AND "Goals" > '0'
wikisql
CREATE TABLE Attribute_Definitions ( attribute_id INTEGER, attribute_name VARCHAR(30), attribute_data_type VARCHAR(10) ) CREATE TABLE Catalogs ( catalog_id INTEGER, catalog_name VARCHAR(50), catalog_publisher VARCHAR(80), date_of_publication DATETIME, date_of_latest_revision DATETIME ) ...
SELECT catalog_level_name, catalog_level_number FROM Catalog_Structure WHERE catalog_level_number BETWEEN 5 AND 10 ORDER BY catalog_level_name DESC
nvbench
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Carcinoma in situ of lip, oral cavity, and pharynx" AND lab.flag = "delta"
mimicsql_data
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.icd9_code = "4562"
mimicsql_data
CREATE TABLE table_66076 ( "Period" text, "Internet Explorer" text, "Firefox" text, "Chrome" text, "Safari" text, "Opera" text, "Other Mozilla" text, "Mobile" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What percentage of users were u...
SELECT "Other Mozilla" FROM table_66076 WHERE "Chrome" = '9.00%'
wikisql
CREATE TABLE table_name_54 ( date_aired VARCHAR, title VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the date of the show titled Beat the Star?
SELECT date_aired FROM table_name_54 WHERE title = "beat the star"
sql_create_context
CREATE TABLE table_49160 ( "Skip" text, "Third/Vice skip" text, "Second" text, "Lead" text, "City" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Lead has a Skip of ted appelman?
SELECT "Lead" FROM table_49160 WHERE "Skip" = 'ted appelman'
wikisql
CREATE TABLE table_name_51 ( airport VARCHAR, iata VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Airport with an IATA of TRZ?
SELECT airport FROM table_name_51 WHERE iata = "trz"
sql_create_context
CREATE TABLE table_41697 ( "Tournament" text, "Wins" real, "Top-5" real, "Top-10" real, "Top-25" real, "Events" real, "Cuts made" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Wins has a Top-5 of 6?
SELECT AVG("Wins") FROM table_41697 WHERE "Top-5" = '6'
wikisql
CREATE TABLE table_203_105 ( id number, "name" text, "street address" text, "years as tallest" text, "height\nft (m)" text, "floors" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was the first building named as the tallest ?
SELECT "name" FROM table_203_105 ORDER BY id LIMIT 1
squall
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 zyjybgb.BGDH FROM hz_info JOIN mzjzjlb JOIN zyjybgb ON 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 WHERE hz_info.RYBH = '54118858' AND NOT zyjybgb.BGDH IN (SELECT jyjgzbb.BGDH FROM ...
css
CREATE TABLE table_67889 ( "Club" text, "Played" text, "Drawn" text, "Lost" text, "Try BP" text, "Losing BP" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the number drawn when 3 have been lost?
SELECT "Drawn" FROM table_67889 WHERE "Lost" = '3'
wikisql
CREATE TABLE table_name_17 ( quantity_preserved VARCHAR, class VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the quantity preserved of the e-1 class?
SELECT quantity_preserved FROM table_name_17 WHERE class = "e-1"
sql_create_context
CREATE TABLE table_75318 ( "Date" text, "Type" text, "Record description" text, "Achievement" text, "Pilot" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Pilot of g.v. alfyorov, and a Record description of altitude with kg (lb) payload, and a Type ...
SELECT "Date" FROM table_75318 WHERE "Pilot" = 'g.v. alfyorov' AND "Record description" = 'altitude with kg (lb) payload' AND "Type" = 'mi-10'
wikisql
CREATE TABLE customer_orders ( order_id number, customer_id number, store_id number, order_date time, planned_delivery_date time, actual_delivery_date time, other_order_details text ) CREATE TABLE ref_service_types ( service_type_code text, parent_service_type_code text, service...
SELECT customer_phone FROM performers WHERE customer_name = "Ashley"
spider
CREATE TABLE table_15027 ( "Year" real, "Men's singles" text, "Women's singles" text, "Men's doubles" text, "Women's doubles" text, "Mixed doubles" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the year for anton kriel chris cotillard
SELECT "Year" FROM table_15027 WHERE "Men's doubles" = 'anton kriel chris cotillard'
wikisql
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId n...
SELECT CreationDate FROM Comments WHERE UserId = '##UserId##'
sede
CREATE TABLE genre ( g_name varchar2(20), rating varchar2(10), most_popular_in varchar2(50) ) CREATE TABLE files ( f_id number(10), artist_name varchar2(50), file_size varchar2(20), duration varchar2(20), formats varchar2(20) ) CREATE TABLE song ( song_name varchar2(50), artist...
SELECT formats, COUNT(*) FROM files GROUP BY formats
nvbench
CREATE TABLE table_7583 ( "1900s" real, "1920s" real, "1930s" real, "1940s" real, "1950s" real, "1960s" real, "1970s" real, "1980s" real, "1990s" real, "2000s to date" real, "Total to date" real ) -- Using valid SQLite, answer the following questions for the tables provided...
SELECT SUM("2000s to date") FROM table_7583 WHERE "1920s" < '0'
wikisql
CREATE TABLE review ( a_id integer, u_id integer, i_id integer, rating integer, rank integer ) CREATE TABLE useracct ( u_id integer, name varchar(128) ) CREATE TABLE trust ( source_u_id integer, target_u_id integer, trust integer ) CREATE TABLE item ( i_id integer, tit...
SELECT name, AVG(T2.rating) FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id ORDER BY AVG(T2.rating)
nvbench
CREATE TABLE table_name_14 ( year INTEGER, chinese_title VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- I want the average year of
SELECT AVG(year) FROM table_name_14 WHERE chinese_title = "敗犬女王"
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE zzmzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH number, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, K...
SELECT COUNT(*) FROM fzzmzjzjlb WHERE fzzmzjzjlb.YLJGDM = '7835150' AND fzzmzjzjlb.JZKSRQ BETWEEN '2011-04-06' AND '2019-11-23'
css
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( ...
SELECT 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.icd9_code = "78321" AND lab.flag = "abnormal"
mimicsql_data
CREATE TABLE table_name_17 ( attendance VARCHAR, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was total attendance on the day they went 17-7?
SELECT COUNT(attendance) FROM table_name_17 WHERE record = "17-7"
sql_create_context
CREATE TABLE table_76287 ( "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. -- wh...
SELECT "High assists" FROM table_76287 WHERE "Game" < '13' AND "Score" = 'w 75-66'
wikisql
CREATE TABLE table_train_183 ( "id" int, "anemia" bool, "hiv_infection" bool, "hemoglobin_a1c_hba1c" float, "creatinine_clearance_cl" float, "panel_reactive_antibodies" int, "NOUSE" float ) -- Using valid SQLite, answer the following questions for the tables provided above. -- creatinine ...
SELECT * FROM table_train_183 WHERE creatinine_clearance_cl < 60
criteria2sql
CREATE TABLE table_29310 ( "Team" text, "Home Gms" real, "Home Total" real, "Home Avg" real, "Top Home Crowd" text, "Road Gms" real, "Road Total" real, "Road Avg" real, "Overall Gms" real, "Overall Total" real, "Overall Avg" real ) -- Using valid SQLite, answer the followin...
SELECT MAX("Home Total") FROM table_29310
wikisql
CREATE TABLE table_204_13 ( id number, "finished" text, "post" number, "horse" text, "jockey" text, "trainer" text, "owner" text, "time / behind" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the number of post for 3rd finished
SELECT "post" FROM table_204_13 WHERE "finished" = 3
squall
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 demographic ( subject_id text, hadm_id t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "NEWBORN" AND prescriptions.drug_type = "BASE"
mimicsql_data
CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text, meter_300 text, meter_400 text, meter_500 text, meter_600 text, meter_700 text, Time text ) ...
SELECT meter_500, ID FROM swimmer
nvbench
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 zyjzjlb.KH, zyjzjlb.KLX FROM zyjzjlb WHERE zyjzjlb.JZLSH = '28664417730'
css
CREATE TABLE table_48729 ( "Total Points" real, "Score" text, "Premiers" text, "Runners Up" text, "Details" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score where the total points was 50?
SELECT "Score" FROM table_48729 WHERE "Total Points" = '50'
wikisql
CREATE TABLE table_30445 ( "Episode" text, "Date Aired" text, "Timeslot" text, "Rating" text, "Nightly Rank" real, "Weekly Rank" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When did the episode 1.13 air for the first time?
SELECT "Date Aired" FROM table_30445 WHERE "Episode" = '1.13'
wikisql
CREATE TABLE diagnoses ( 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 procedures ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "URGENT" AND prescriptions.drug = "Albuterol 0.083% Neb Soln"
mimicsql_data
CREATE TABLE music_festival ( Date_of_ceremony VARCHAR, RESULT VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Return the dates of ceremony and the results of all music festivals
SELECT Date_of_ceremony, RESULT FROM music_festival
sql_create_context
CREATE TABLE table_18746 ( "Frequency" text, "Call sign" text, "Name" text, "Format" text, "Owner" text, "Target city/ market" text, "City of license" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What market is Wessington Springs in
SELECT "Target city/ market" FROM table_18746 WHERE "City of license" = 'Wessington Springs'
wikisql
CREATE TABLE table_name_75 ( week INTEGER, attendance INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average week number of all the matches where less than 22,604 people attended?
SELECT AVG(week) FROM table_name_75 WHERE attendance < 22 OFFSET 604
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 jyjgzbb.BGDH 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 = '28140515' AND NOT jyjgzbb.BGDH IN (SELECT jyjgzb...
css
CREATE TABLE station ( id number, network_name text, services text, local_authority text ) CREATE TABLE weekly_weather ( station_id number, day_of_week text, high_temperature number, low_temperature number, precipitation number, wind_speed_mph number ) CREATE TABLE train ( ...
SELECT t3.name, t3.time FROM station AS t1 JOIN route AS t2 ON t1.id = t2.station_id JOIN train AS t3 ON t2.train_id = t3.id WHERE t1.local_authority = "Chiltern"
spider
CREATE TABLE table_name_18 ( horizontal_bar VARCHAR, parallel_bars VARCHAR, pommel_horse VARCHAR, position VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the horizontal bar score with a pommel horse of n/a, and the position is less than 27, a...
SELECT horizontal_bar FROM table_name_18 WHERE pommel_horse = "n/a" AND position < 27 AND parallel_bars = "15.800"
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, YLJGDM text, RYBH text ) 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...
SELECT * FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.RYBH = '03371547' AND hz_info.YLJGDM = '9414834' AND NOT zyjzjlb.JZKSMC LIKE '%造口%'
css
CREATE TABLE table_name_41 ( earnings__ INTEGER, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How much has dave stockton earned?
SELECT MAX(earnings__) AS $__ FROM table_name_41 WHERE player = "dave stockton"
sql_create_context
CREATE TABLE table_20114 ( "Pos." real, "Driver" text, "Qualifying" real, "Race 1" text, "Race 2" text, "Race 3" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the total number of qualifiying for race 3 being 3
SELECT COUNT("Qualifying") FROM table_20114 WHERE "Race 3" = '3'
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 ACC_Road, School_ID FROM basketball_match GROUP BY All_Home, ACC_Road ORDER BY ACC_Road
nvbench
CREATE TABLE table_49579 ( "Date" text, "Tournament" text, "Surface" text, "Opponent in the final" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What date was the opponent in the final Barbara Paulus?
SELECT "Date" FROM table_49579 WHERE "Opponent in the final" = 'barbara paulus'
wikisql
CREATE TABLE table_name_30 ( country VARCHAR, points INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Country, when Points are more than 12?
SELECT country FROM table_name_30 WHERE points > 12
sql_create_context
CREATE TABLE table_name_21 ( general_classification VARCHAR, stage VARCHAR, points_classification VARCHAR, young_rider_classification VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the general classification of the stage 3 with Daniele Bennat...
SELECT general_classification FROM table_name_21 WHERE points_classification = "daniele bennati" AND young_rider_classification = "morris possoni" AND stage = "3"
sql_create_context
CREATE TABLE table_52036 ( "Country" text, "OF-5" text, "OF-4" text, "OF-2" text, "OF-1" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What country has OF-1 Locotenent?
SELECT "Country" FROM table_52036 WHERE "OF-1" = 'locotenent'
wikisql
CREATE TABLE Rooms ( RoomId TEXT, roomName TEXT, beds INTEGER, bedType TEXT, maxOccupancy INTEGER, basePrice INTEGER, decor TEXT ) CREATE TABLE Reservations ( Code INTEGER, Room TEXT, CheckIn TEXT, CheckOut TEXT, Rate REAL, LastName TEXT, FirstName TEXT, Adul...
SELECT decor, MIN(basePrice) FROM Rooms GROUP BY decor
nvbench
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) 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, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.formulary_drug_cd = "NADO20" AND lab.fluid = "Pleural"
mimicsql_data
CREATE TABLE table_25584 ( "Rank" real, "Metropolitan area" text, "Principal city" text, "10,000+ places" real, "Densest incorporated place" text, "Density" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the number of rank for stone park
SELECT COUNT("Rank") FROM table_25584 WHERE "Densest incorporated place" = 'Stone Park'
wikisql
CREATE TABLE table_26669939_1 ( year VARCHAR, host_country VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what year was Montenegro the host country?
SELECT year FROM table_26669939_1 WHERE host_country = "Montenegro"
sql_create_context
CREATE TABLE table_1507852_5 ( bubbles VARCHAR, attribute VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's the bubbles with attribute being onpopuphidden
SELECT bubbles FROM table_1507852_5 WHERE attribute = "onpopuphidden"
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 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 WHERE demographic.ethnicity = "WHITE" AND demographic.diagnosis = "LEFT INTERNAL JUGULAR VEIN THROMBOSIS;LEFT ARM EDEMA"
mimicsql_data
CREATE TABLE table_train_260 ( "id" int, "leukocyte_deficiencies" bool, "bleeding" int, "hemoglobin_a1c_hba1c" float, "leukocyte_dysfunction" bool, "renal_disease" bool, "hba1c" float, "serum_creatinine" float, "NOUSE" float ) -- Using valid SQLite, answer the following questions f...
SELECT * FROM table_train_260 WHERE hba1c >= 8 AND hemoglobin_a1c_hba1c <= 12
criteria2sql
CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) 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), CO...
SELECT HIRE_DATE, SUM(SALARY) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY SUM(SALARY) DESC
nvbench
CREATE TABLE table_79684 ( "Call sign" text, "Frequency MHz" real, "City of license" text, "ERP W" real, "Class" text, "FCC info" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total erp w of class c3, which has a frequency mhz less ...
SELECT COUNT("ERP W") FROM table_79684 WHERE "Class" = 'c3' AND "Frequency MHz" < '89.9'
wikisql
CREATE TABLE table_204_14 ( id number, "rank" number, "bib" number, "athlete" text, "country" text, "time" text, "deficit" text, "note" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how long did nicole fessel take ?
SELECT "time" FROM table_204_14 WHERE "athlete" = 'nicole fessel'
squall
CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE TABLE SportsInfo ( StuID INTEGER, SportName VARCHAR(32), HoursPerWeek INTEGER, GamesPlayed INTEGER, ...
SELECT LName, COUNT(LName) FROM SportsInfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.OnScholarship = 'Y' GROUP BY LName ORDER BY LName
nvbench
CREATE TABLE table_70404 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many years did Barclay Nordica Arrows BMW enter with Cosworth v8 engine?
SELECT SUM("Year") FROM table_70404 WHERE "Entrant" = 'barclay nordica arrows bmw' AND "Engine" = 'cosworth v8'
wikisql
CREATE TABLE table_31997 ( "Year" real, "Competition" text, "Date" text, "Location" text, "Score" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the result for harrogate
SELECT "Result" FROM table_31997 WHERE "Location" = 'harrogate'
wikisql
CREATE TABLE resultsdata15 ( sample_pk number, commod text, commtype text, lab text, pestcode text, testclass text, concen number, lod number, conunit text, confmethod text, confmethod2 text, annotate text, quantitate text, mean text, extract text, determi...
SELECT MAX(country) FROM sampledata15
pesticide
CREATE TABLE table_17103566_1 ( man_of_the_match VARCHAR, match_number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is man of the match for match number 5?
SELECT man_of_the_match FROM table_17103566_1 WHERE match_number = 5
sql_create_context
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE patient ( ...
SELECT t3.diagnosisname FROM (SELECT t2.diagnosisname, 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 = 'stroke education given') AS t1 JOIN (SEL...
eicu
CREATE TABLE manager ( Manager_ID int, Name text, Country text, Working_year_starts text, Age int, Level int ) CREATE TABLE railway ( Railway_ID int, Railway text, Builder text, Built text, Wheels text, Location text, ObjectNumber text ) CREATE TABLE railway_manage ...
SELECT Country, COUNT(Country) FROM manager WHERE Age > 50 OR Age < 46 GROUP BY Country
nvbench
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) ...
SELECT SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t2.diagnosistime) > 5 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOI...
eicu
CREATE TABLE table_name_27 ( rebounds VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Can you tell me the Rebounds that has the Name of pom baskets jena?
SELECT rebounds FROM table_name_27 WHERE name = "pom baskets jena"
sql_create_context
CREATE TABLE table_name_52 ( transfer_window VARCHAR, source VARCHAR, moving_from VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the transfer window of the Leeds United source with a move from Motherwell?
SELECT transfer_window FROM table_name_52 WHERE source = "leeds united" AND moving_from = "motherwell"
sql_create_context
CREATE TABLE Projects ( Code Char(4), Name Char(50), Hours int ) CREATE TABLE AssignedTo ( Scientist int, Project char(4) ) CREATE TABLE Scientists ( SSN int, Name Char(30) ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Give me a histogram for ...
SELECT Name, COUNT(*) FROM Projects AS T1 JOIN AssignedTo AS T2 ON T1.Code = T2.Project GROUP BY T1.Name ORDER BY Name DESC
nvbench
CREATE TABLE player ( pid number, pname text, ycard text, hs number ) CREATE TABLE college ( cname text, state text, enr number ) CREATE TABLE tryout ( pid number, cname text, ppos text, decision text ) -- Using valid SQLite, answer the following questions for the tables ...
SELECT T1.pname, T2.cname FROM player AS T1 JOIN tryout AS T2 ON T1.pid = T2.pid WHERE T2.decision = 'yes'
spider
CREATE TABLE table_76823 ( "Game" text, "Date" text, "Home Team" text, "Result" text, "Road Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT IS THE HOME TEAM ON APRIL 25?
SELECT "Home Team" FROM table_76823 WHERE "Date" = 'april 25'
wikisql
CREATE TABLE table_160510_5 ( country VARCHAR, area VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the country for 11,891 area
SELECT country FROM table_160510_5 WHERE area = "11,891"
sql_create_context
CREATE TABLE table_57261 ( "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 attendance for the North Melbourne'...
SELECT "Crowd" FROM table_57261 WHERE "Home team" = 'north melbourne'
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_location = "TRSF WITHIN THIS FACILITY" AND demographic.discharge_location = "DISC-TRAN CANCER/CHLDRN H"
mimicsql_data
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number...
SELECT patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '028-56914' AND STRFTIME('%y', patient.hospitaladmittime) <= '2103' ORDER BY patient.hospitaladmittime DESC LIMIT 1
eicu
CREATE TABLE table_name_15 ( member_countries VARCHAR, area__km²_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which country has an area of 871,980 square km?
SELECT member_countries FROM table_name_15 WHERE area__km²_ = "871,980"
sql_create_context
CREATE TABLE table_40935 ( "Pilot" text, "Original Airdate" text, "Musical Guest/Song performed" text, "YouTube Hero" text, "MySpace Band" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the MySpace Band with an Original Airdate o...
SELECT "MySpace Band" FROM table_40935 WHERE "Original Airdate" = '19 february 2008'
wikisql
CREATE TABLE t_kc22 ( MED_EXP_DET_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, MED_EXP_BILL_ID text, SOC_SRT_DIRE_CD text, SOC_SRT_DIRE_NM text, DIRE_TYPE number, CHA_ITEM_LEV number, MED_INV_ITEM_TYPE text, MED_DIRE_CD text, MED_DIRE_NM text,...
SELECT IN_DIAG_DIS_CD, IN_DIAG_DIS_NM FROM t_kc21 WHERE PERSON_ID = '73506592' AND MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc24 WHERE MED_AMOUT > 2109.01)
css
CREATE TABLE table_name_40 ( finals VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What finals have grant brebner as the name?
SELECT finals FROM table_name_40 WHERE name = "grant brebner"
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 AVG(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_AGE < 15 UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_AGE < 15)
css
CREATE TABLE table_204_443 ( id number, "week" number, "date" text, "opponent" text, "result" text, "game site" text, "attendance" number, "bye" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- team that scored more than 40 points against ...
SELECT "opponent" FROM table_204_443 WHERE "result" > 40 AND "opponent" <> 'miami dolphins'
squall