instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_name_33 ( constructor VARCHAR, laps VARCHAR, driver VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who is the constructor when the laps is more than 72 and the driver is eddie irvine?
SELECT constructor FROM table_name_33 WHERE laps > 72 AND driver = "eddie irvine"
sql_create_context
CREATE TABLE table_name_88 ( total INTEGER, silver VARCHAR, bronze VARCHAR, gold VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average total for teams with under 34 bronzes, 0 silver, and under 14 gold?
SELECT AVG(total) FROM table_name_88 WHERE bronze < 34 AND gold < 14 AND silver < 0
sql_create_context
CREATE TABLE table_15405 ( "Year" real, "Team" text, "Chassis" text, "Engine" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the highest points with a Chassis of gordini t16, and a Year smaller than 1954?
SELECT MAX("Points") FROM table_15405 WHERE "Chassis" = 'gordini t16' AND "Year" < '1954'
wikisql
CREATE TABLE table_29318 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text, "U.S. viewers (million)" text ) -- Using valid SQLite, answer the following questions for the tables provided ab...
SELECT "Written by" FROM table_29318 WHERE "U.S. viewers (million)" = '7.70'
wikisql
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.long_title = "Other B-complex deficiencies"
mimicsql_data
CREATE TABLE table_68185 ( "Season" real, "Overall" text, "Slalom" text, "Giant Slalom" text, "Super G" text, "Downhill" text, "Combined" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What super g was before 1998, had 2 giant slaloms and 24...
SELECT "Super G" FROM table_68185 WHERE "Season" < '1998' AND "Giant Slalom" = '2' AND "Downhill" = '24'
wikisql
CREATE TABLE table_name_40 ( pick VARCHAR, round VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which pick's round was 5 when Kellen Davis was a player?
SELECT pick FROM table_name_40 WHERE round = "5" AND player = "kellen davis"
sql_create_context
CREATE TABLE t_kc21_t_kc24 ( MED_CLINIC_ID text, MED_SAFE_PAY_ID number ) 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...
SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.IN_DIAG_DIS_NM = '癫痫性精神病'
css
CREATE TABLE table_23117208_5 ( title VARCHAR, written_by VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the episode that was written by Michael Rauch?
SELECT title FROM table_23117208_5 WHERE written_by = "Michael Rauch"
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 zyjybgb.JYKSBM, zyjybgb.JYKSMC FROM zyjybgb WHERE zyjybgb.JZLSH = '04419107006' UNION SELECT mzjybgb.JYKSBM, mzjybgb.JYKSMC FROM mzjybgb WHERE mzjybgb.JZLSH = '04419107006'
css
CREATE TABLE gwyjzb ( 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.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_NM = '范升荣' AND gwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT > 5540.22) UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '范升荣' AND fgwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22...
css
CREATE TABLE table_32413 ( "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 away team score when the home team ...
SELECT "Away team score" FROM table_32413 WHERE "Home team" = 'carlton'
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 gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.MED_SER_ORG_NO = '7265817' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY SUM(t_kc22.AMOUNT) DESC LIMIT 24 UNION SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM fgwyjzb JOIN t_k...
css
CREATE TABLE table_21323 ( "Rank" real, "1-year peak" text, "5-year peak" text, "10-year peak" text, "15-year peak" text, "20-year peak" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is every 5-year peak when Emanuel Lasker, 2847 is the 10...
SELECT "5-year peak" FROM table_21323 WHERE "10-year peak" = 'Emanuel Lasker, 2847'
wikisql
CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId numb...
SELECT u.Id AS "user_link", u.Id, u.CreationDate FROM Users AS u WHERE u.CreationDate < '2011-08-30 00:00:00.00'
sede
CREATE TABLE Has_Allergy ( StuID INTEGER, Allergy VARCHAR(20) ) 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 Allergy_Type ( Allergy VARCHAR(20), ...
SELECT Age, COUNT(*) FROM Student GROUP BY Age
nvbench
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) 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 departments ( DEPARTMENT_ID decimal...
SELECT HIRE_DATE, DEPARTMENT_ID FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY HIRE_DATE DESC
nvbench
CREATE TABLE table_40605 ( "Rank" real, "Name" text, "Team" text, "Games" real, "Rebounds" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of Games, when Rank is less than 4, and when Rebounds is less than 102?
SELECT COUNT("Games") FROM table_40605 WHERE "Rank" < '4' AND "Rebounds" < '102'
wikisql
CREATE TABLE table_39930 ( "Date" text, "Centerfold model" text, "Interview subject" text, "20 Questions" text, "Pictorials" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Pictorials has a 20 Questions of eva longoria?
SELECT "Pictorials" FROM table_39930 WHERE "20 Questions" = 'eva longoria'
wikisql
CREATE TABLE table_name_18 ( film_title_used_in_nomination VARCHAR, original_title VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the nomination title used for the original film, Monsieur Hawarden?
SELECT film_title_used_in_nomination FROM table_name_18 WHERE original_title = "monsieur hawarden"
sql_create_context
CREATE TABLE table_name_74 ( net_capacity VARCHAR, gross_capacity VARCHAR, unit VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the net capacity with a gross capacity of 1,126 mw, and a Unit of tianwan-4?
SELECT net_capacity FROM table_name_74 WHERE gross_capacity = "1,126 mw" AND unit = "tianwan-4"
sql_create_context
CREATE TABLE table_5084 ( "7:00" text, "7:30" text, "8:00" text, "8:30" text, "9:00" text, "10:00" text, "10:30" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the 10:30 for 8:00 of charmed
SELECT "10:30" FROM table_5084 WHERE "8:00" = 'charmed'
wikisql
CREATE TABLE table_204_655 ( id number, "year" number, "winner" text, "album" text, "other finalists" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was the last winner 's album name ?
SELECT "album" FROM table_204_655 ORDER BY "year" DESC LIMIT 1
squall
CREATE TABLE table_80452 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many Silver medals were won in total by all those with more than 3 bronze and exactly 16...
SELECT SUM("Silver") FROM table_80452 WHERE "Bronze" > '3' AND "Gold" = '16'
wikisql
CREATE TABLE table_21021 ( "Model number" text, "sSpec number" text, "Frequency" text, "GPU frequency" text, "L2 cache" text, "I/O bus" text, "Memory" text, "Voltage" text, "TDP" text, "Socket" text, "Release date" text, "Part number(s)" text, "Release price ( USD )" ...
SELECT "Memory" FROM table_21021 WHERE "Frequency" = '1.6 GHz'
wikisql
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_items ( ...
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, COUNT(procedures_icd.charttime) AS c1 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 512...
mimic_iii
CREATE TABLE table_name_86 ( competition VARCHAR, season VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Competition for Season 2002 03, and the Opponent was zenit st. petersburg?
SELECT competition FROM table_name_86 WHERE season = "2002–03" AND opponent = "zenit st. petersburg"
sql_create_context
CREATE TABLE table_name_75 ( name VARCHAR, apparent_magnitude VARCHAR, ra___j2000__ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Name has Apparent Magnitude smaller than 11.4, and R.A. (J2000) of 04h17m35.8s?
SELECT name FROM table_name_75 WHERE apparent_magnitude < 11.4 AND ra___j2000__ = "04h17m35.8s"
sql_create_context
CREATE TABLE table_name_19 ( area__km²_ INTEGER, density___km²_ VARCHAR, official_website VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of the area values for districts having density over 462 and websites of http://krishna.nic.in/?
SELECT SUM(area__km²_) FROM table_name_19 WHERE density___km²_ > 462 AND official_website = "http://krishna.nic.in/"
sql_create_context
CREATE TABLE table_name_17 ( wins INTEGER, ties VARCHAR, win__percentage VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Wins have a Win % smaller than 0.8270000000000001, and a Name of rick mirer, and Ties smaller than 1?
SELECT SUM(wins) FROM table_name_17 WHERE win__percentage < 0.8270000000000001 AND name = "rick mirer" AND ties < 1
sql_create_context
CREATE TABLE table_55784 ( "Ordinary income rate" text, "Long-term capital gain rate" text, "Short-term capital gain rate" text, "Long-term gain on commercial buildings*" text, "Long-term gain on collectibles" text ) -- Using valid SQLite, answer the following questions for the tables provided abo...
SELECT "Long-term capital gain rate" FROM table_55784 WHERE "Long-term gain on commercial buildings*" = '25%' AND "Long-term gain on collectibles" = '28%' AND "Short-term capital gain rate" = '33%'
wikisql
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 AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM txmzjzjlb JOIN jybgb JOIN jyjgzbb ON txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE txmzjzjlb.JZZDSM = '牙列缺失' AND jyjgzbb.JCZBDM = '492...
css
CREATE TABLE table_20200 ( "Player" text, "No." real, "Nationality" text, "Position" text, "Years in Orlando" text, "School/Club Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the number of the player who attended Delta State?
SELECT MAX("No.") FROM table_20200 WHERE "School/Club Team" = 'Delta State'
wikisql
CREATE TABLE table_48568 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( $ )" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the to par of the player with more than $4,100 and a score of 69-67-72-70=2...
SELECT "To par" FROM table_48568 WHERE "Money ( $ )" > '4,100' AND "Score" = '69-67-72-70=278'
wikisql
CREATE TABLE employee ( eid number(9,0), name varchar2(30), salary number(10,2) ) CREATE TABLE aircraft ( aid number(9,0), name varchar2(30), distance number(6,0) ) CREATE TABLE certificate ( eid number(9,0), aid number(9,0) ) CREATE TABLE flight ( flno number(4,0), origin var...
SELECT name, distance FROM aircraft ORDER BY distance
nvbench
CREATE TABLE table_21530474_1 ( region_s_ VARCHAR, chassis_code VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the regions for usf45
SELECT region_s_ FROM table_21530474_1 WHERE chassis_code = "USF45"
sql_create_context
CREATE TABLE table_name_18 ( laps VARCHAR, driver VARCHAR, grid VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many laps for robin montgomerie-charrington, and a Grid smaller than 15?
SELECT COUNT(laps) FROM table_name_18 WHERE driver = "robin montgomerie-charrington" AND grid < 15
sql_create_context
CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE state ( state_code text, ...
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 = 'SAN FRANCISCO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = ...
atis
CREATE TABLE table_name_17 ( driver VARCHAR, engine VARCHAR, chassis VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who is the driver with the engine era 1.5 l6 s and the chassis is era b?
SELECT driver FROM table_name_17 WHERE engine = "era 1.5 l6 s" AND chassis = "era b"
sql_create_context
CREATE TABLE table_name_8 ( crowd INTEGER, home_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average crowd size for games with hawthorn as the home side?
SELECT AVG(crowd) FROM table_name_8 WHERE home_team = "hawthorn"
sql_create_context
CREATE TABLE table_43573 ( "Result" text, "TUF Competitor" text, "Opponent" text, "Method" text, "Event" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who is the opponent when the method is tko (punches) at 4:26 of round 1?
SELECT "Opponent" FROM table_43573 WHERE "Method" = 'tko (punches) at 4:26 of round 1'
wikisql
CREATE TABLE table_11271 ( "Draw" real, "Artist" text, "Song" text, "Points" real, "Place" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the sum of draw for artist hari mata hari with less than 70 points?
SELECT SUM("Draw") FROM table_11271 WHERE "Artist" = 'hari mata hari' AND "Points" < '70'
wikisql
CREATE TABLE church ( Church_ID int, Name text, Organized_by text, Open_Date int, Continuation_of text ) CREATE TABLE wedding ( Church_ID int, Male_ID int, Female_ID int, Year int ) CREATE TABLE people ( People_ID int, Name text, Country text, Is_Male text, Age ...
SELECT Name, Age FROM people WHERE Is_Male = 'T' AND NOT People_ID IN (SELECT Male_ID FROM wedding) ORDER BY Name
nvbench
CREATE TABLE table_15226 ( "Pick" real, "Player" text, "Team" text, "Position" text, "School" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What number pick was the player for the Oakland Athletics who plays the 1B position?
SELECT "Pick" FROM table_15226 WHERE "Position" = '1b' AND "Team" = 'oakland athletics'
wikisql
CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE fare_basis ( fare_basis_cod...
SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'WESTCHESTER COUNTY' AND ground_service.city_code = city.city_code
atis
CREATE TABLE table_50265 ( "Game" real, "Date" text, "Team" 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. -- What w...
SELECT "High assists" FROM table_50265 WHERE "Game" < '60'
wikisql
CREATE TABLE table_58443 ( "Date of Issue" text, "Denomination" text, "Design" text, "Paper Type" text, "First Day Cover Cancellation" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What stamp design has a denomination of $1.18?
SELECT "Design" FROM table_58443 WHERE "Denomination" = '$1.18'
wikisql
CREATE TABLE journalist ( journalist_id number, name text, nationality text, age text, years_working number ) CREATE TABLE event ( event_id number, date text, venue text, name text, event_attendance number ) CREATE TABLE news_report ( journalist_id number, event_id numb...
SELECT nationality, age FROM journalist
spider
CREATE TABLE table_34003 ( "Rank" text, "Runs" text, "Player" text, "Opponent" text, "Venue" text, "Season" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where did Jack Badcock play?
SELECT "Venue" FROM table_34003 WHERE "Player" = 'jack badcock'
wikisql
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
SELECT hz_info.person_info_JGDM, hz_info.person_info_JGMC, COUNT(hz_info.RYBH) FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE mzjzjlb.JZZDSM = '慢性咽炎' GROUP BY hz_info.person_info_JGDM
css
CREATE TABLE t_kc24 ( MED_SAFE_PAY_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, REF_SLT_FLG number, CLINIC_SLT_DATE time, COMP_ID text, PERSON_ID text, FLX_MED_ORG_ID text, INSU_TYPE text, MED_AMOUT number, PER_ACC_PAY number, OVE_PAY numb...
SELECT AVG(MED_AMOUT) FROM t_kc21 WHERE MED_ORG_DEPT_CD = '1791' AND IN_HOSP_DATE BETWEEN '2006-04-24' AND '2007-04-05' AND IN_DIAG_DIS_NM = '前列腺增生' AND CLINIC_TYPE = '住院'
css
CREATE TABLE table_17100 ( "Year" text, "Player" text, "School" text, "Hometown" text, "College" text, "NBA Draft" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the player who's college is listed as direct to nba, school is st. vincent ...
SELECT "Player" FROM table_17100 WHERE "College" = 'Direct to NBA' AND "School" = 'St. Vincent – St. Mary High School' AND "Year" = '2001-2002'
wikisql
CREATE TABLE table_name_13 ( laps INTEGER, class VARCHAR, entrant VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the highest amount of laps when the class was v8 and the entrant was diet-coke racing?
SELECT MAX(laps) FROM table_name_13 WHERE class = "v8" AND entrant = "diet-coke racing"
sql_create_context
CREATE TABLE table_27277284_28 ( order_part_number VARCHAR, mult_1 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the oder part number for the model with 10x mult. 1?
SELECT order_part_number FROM table_27277284_28 WHERE mult_1 = "10x"
sql_create_context
CREATE TABLE table_57262 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the score of the home team that played a...
SELECT "Home team score" FROM table_57262 WHERE "Crowd" > '12,000' AND "Venue" = 'brunswick street oval'
wikisql
CREATE TABLE table_46736 ( "Letter" text, "IPv6 address" text, "AS-number" text, "Operator" text, "Location #sites (global/local)" text, "Software" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the location for the software of BIND and ...
SELECT "Location #sites (global/local)" FROM table_46736 WHERE "Software" = 'bind' AND "IPv6 address" = '2001:503:c27::2:30'
wikisql
CREATE TABLE table_name_98 ( grid VARCHAR, time_retired VARCHAR, laps VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many grids have a Time/Retired of gearbox, and Laps smaller than 3?
SELECT COUNT(grid) FROM table_name_98 WHERE time_retired = "gearbox" AND laps < 3
sql_create_context
CREATE TABLE table_15555 ( "Year" real, "Award" text, "Category" text, "Recipient(s)" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Joe Jonas' result at the Kids' Choice Awards Mexico?
SELECT "Result" FROM table_15555 WHERE "Recipient(s)" = 'joe jonas' AND "Award" = 'kids'' choice awards mexico'
wikisql
CREATE TABLE table_191105_4 ( first_aired VARCHAR, performed_by VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the date for the episode performed by Sue Manchester?
SELECT first_aired FROM table_191105_4 WHERE performed_by = "Sue Manchester"
sql_create_context
CREATE TABLE table_11829 ( "State" text, "Preliminaries" real, "Interview" real, "Swimsuit" real, "Evening Gown" real, "Average" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the evening gown score of the contestant from the District of...
SELECT COUNT("Evening Gown") FROM table_11829 WHERE "Preliminaries" < '8.647' AND "State" = 'district of columbia'
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 jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '潘德运' AND jybg...
css
CREATE TABLE table_25367 ( "Game" real, "Date" text, "Team" 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. -- List t...
SELECT COUNT("Location Attendance") FROM table_25367 WHERE "Game" = '7'
wikisql
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE chartevents ( row_id number, subject_id number, ...
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, COUNT(procedures_icd.charttime) AS c1 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 258...
mimic_iii
CREATE TABLE journalist ( Nationality VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show the most common nationality for journalists.
SELECT Nationality FROM journalist GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1
sql_create_context
CREATE TABLE table_8815 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Country scored 72-65-73=210?
SELECT "Country" FROM table_8815 WHERE "Score" = '72-65-73=210'
wikisql
CREATE TABLE table_48615 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the Result of the game after Week 9 with an Attendance of 69,714?
SELECT "Result" FROM table_48615 WHERE "Week" > '9' AND "Attendance" = '69,714'
wikisql
CREATE TABLE table_15675 ( "Artist" text, "Country of origin" text, "Period active" text, "Release-year of first charted record" real, "Genre" text, "Claimed sales" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the genre of Queen (an a...
SELECT "Genre" FROM table_15675 WHERE "Country of origin" = 'united kingdom' AND "Artist" = 'queen'
wikisql
CREATE TABLE table_203_683 ( id number, "season" text, "league" text, "gold" text, "silver" text, "bronze" text, "winning manager" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- previous to the tippeligaen , what was the league called ?
SELECT "league" FROM table_203_683 WHERE "season" < (SELECT "season" FROM table_203_683 WHERE "league" = 'tippeligaen') ORDER BY "season" DESC LIMIT 1
squall
CREATE TABLE table_32927 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the attendance during the week 1 match?
SELECT "Attendance" FROM table_32927 WHERE "Week" = '1'
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 labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, value...
SELECT t2.drug FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE admissions.subject_id = 63676 AND diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'gstr/d...
mimic_iii
CREATE TABLE Courses ( course_id INTEGER, author_id INTEGER, subject_id INTEGER, course_name VARCHAR(120), course_description VARCHAR(255) ) CREATE TABLE Students ( student_id INTEGER, date_of_registration DATETIME, date_of_latest_logon DATETIME, login_name VARCHAR(40), password...
SELECT personal_name, gender_mf FROM Course_Authors_and_Tutors ORDER BY personal_name
nvbench
CREATE TABLE table_18018214_3 ( wins INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the highest number of wins for any team?
SELECT MAX(wins) FROM table_18018214_3
sql_create_context
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId numb...
SELECT diff1 AS hoursToClose, COUNT(*) FROM (SELECT CAST((JULIANDAY(ClosedDate) - JULIANDAY(d.CreationDate)) * 24.0 AS INT) AS "diff1", TIME_TO_STR(d.CreationDate, '%y-%m') AS "date1", TIME_TO_STR(d.ClosedDate, '%y-%m') AS "date2", (d.Id) AS id FROM Posts AS d LEFT JOIN PostHistory AS ph ON ph.PostId = d.Id LEFT JOIN P...
sede
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "SINGLE" AND lab.label = "Hyaline Casts"
mimicsql_data
CREATE TABLE table_14723382_1 ( division INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the largest numbered?
SELECT MAX(division) FROM table_14723382_1
sql_create_context
CREATE TABLE table_name_46 ( laps INTEGER, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many Laps were there in 2010?
SELECT SUM(laps) FROM table_name_46 WHERE year = 2010
sql_create_context
CREATE TABLE table_name_54 ( husband_dates VARCHAR, date_married VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the husband date that was married in 1858?
SELECT husband_dates FROM table_name_54 WHERE date_married = "1858"
sql_create_context
CREATE TABLE table_65892 ( "Name" text, "Position" text, "League Apps" text, "League Goals" real, "FA Cup Apps" text, "FA Cup Goals" real, "League Cup Apps" real, "League Cup Goals" real, "Total Apps" text, "Total Goals" real ) -- Using valid SQLite, answer the following questi...
SELECT MAX("FA Cup Goals") FROM table_65892 WHERE "League Cup Apps" > '0' AND "Name" = 'trevor cherry'
wikisql
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number,...
SELECT COUNT(DISTINCT Posts.Id) FROM Posts WHERE Posts.CreationDate >= CURRENT_TIMESTAMP() - @numDays
sede
CREATE TABLE table_48102 ( "Class" text, "Team" text, "Driver" text, "Chassis \u2013 Engine" text, "Laps" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the class of team liqui moly equipe, which has less than 71 laps?
SELECT "Class" FROM table_48102 WHERE "Laps" < '71' AND "Team" = 'liqui moly equipe'
wikisql
CREATE TABLE table_23060 ( "Team" text, "Division Titles" real, "Playoff Berths" real, "AFL Titles" real, "AFC Championships" real, "Super Bowl Championships" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If the playoff berth is 17, what is the...
SELECT "AFC Championships" FROM table_23060 WHERE "Playoff Berths" = '17'
wikisql
CREATE TABLE table_11254821_2 ( finishing_position VARCHAR, points_awarded__platinum_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the range of finishing position for 15 awarded platinum points?
SELECT finishing_position FROM table_11254821_2 WHERE points_awarded__platinum_ = 15
sql_create_context
CREATE TABLE table_70615 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the attendance number for December 2, 1979?
SELECT SUM("Attendance") FROM table_70615 WHERE "Date" = 'december 2, 1979'
wikisql
CREATE TABLE table_name_54 ( shuttle_run__sec_ VARCHAR, points VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many seconds is a shuttle run that give 2 points?
SELECT shuttle_run__sec_ FROM table_name_54 WHERE points = 2
sql_create_context
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 gwyjzb.MED_ORG_DEPT_NM, gwyjzb.IN_DIAG_DIS_NM, AVG(gwyjzb.PERSON_AGE) FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '6110651' GROUP BY gwyjzb.MED_ORG_DEPT_NM, gwyjzb.IN_DIAG_DIS_NM UNION SELECT fgwyjzb.MED_ORG_DEPT_NM, fgwyjzb.IN_DIAG_DIS_NM, AVG(fgwyjzb.PERSON_AGE) FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '61106...
css
CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description...
SELECT Id AS "post_link", Id, CreationDate, AnswerCount, CommentCount, rate.TagId FROM Posts, PostTags, (SELECT COUNT(PostId) AS Rate, TagId FROM Tags, PostTags, Posts WHERE Tags.Id = PostTags.TagId AND Posts.Id = PostId AND Posts.CreationDate < '2019-03-01' AND Posts.CreationDate > '2019-01-01' GROUP BY TagId, TagName...
sede
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
SELECT mzjzjlb.JZLSH 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 NOT mzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ >= '2009-10-09')
css
CREATE TABLE table_name_13 ( place VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what place is the player with a score of 72-66-75=213?
SELECT place FROM table_name_13 WHERE score = 72 - 66 - 75 = 213
sql_create_context
CREATE TABLE table_38827 ( "Game" real, "Date" text, "Team" 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. -- What i...
SELECT "Location Attendance" FROM table_38827 WHERE "Record" = '27-22'
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 demographic (...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "URGENT" AND procedures.short_title = "Colonoscopy"
mimicsql_data
CREATE TABLE table_name_32 ( assists INTEGER, club VARCHAR, points VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the amount of assists for richmond kickers and points larger than 24
SELECT SUM(assists) FROM table_name_32 WHERE club = "richmond kickers" AND points > 24
sql_create_context
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE patient ( uniquep...
SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 40 AND 49) GROUP BY treatment.treatmentname) AS t1 WHERE t1.c1 <= 4
eicu
CREATE TABLE table_name_27 ( republican VARCHAR, green VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the Republican when the green was Harold Burbank?
SELECT republican FROM table_name_27 WHERE green = "harold burbank"
sql_create_context
CREATE TABLE table_26375 ( "Province (ashkharh)" text, "Armenian name" text, "Area (km\u00b2)" real, "Number of cantons (gavars)" real, "Center" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How big (in km2) is Persarmenia?
SELECT "Area (km\u00b2)" FROM table_26375 WHERE "Province (ashkharh)" = 'Persarmenia'
wikisql
CREATE TABLE table_name_55 ( score VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the score March 27?
SELECT score FROM table_name_55 WHERE date = "march 27"
sql_create_context
CREATE TABLE t_kc24 ( MED_SAFE_PAY_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, REF_SLT_FLG number, CLINIC_SLT_DATE time, COMP_ID text, PERSON_ID text, FLX_MED_ORG_ID text, INSU_TYPE text, MED_AMOUT number, PER_ACC_PAY number, OVE_PAY numb...
SELECT IN_DIAG_DIS_CD, IN_DIAG_DIS_NM FROM t_kc21 WHERE PERSON_ID = '70307655' AND IN_HOSP_DATE BETWEEN '2005-10-21' AND '2021-08-18' GROUP BY IN_DIAG_DIS_CD ORDER BY COUNT(*) DESC LIMIT 1
css
CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CRE...
SELECT * FROM Users WHERE Location LIKE '%Nigeria' ORDER BY Reputation DESC LIMIT 10
sede
CREATE TABLE table_name_50 ( points_for VARCHAR, club VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many pints does the Cambrian Welfare RFC have?
SELECT points_for FROM table_name_50 WHERE club = "cambrian welfare rfc"
sql_create_context
CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_CLINIC_ID text, MED_DIRE_CD tex...
SELECT COUNT(*) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_ID = '65683500' AND t_kc22.STA_DATE BETWEEN '2004-07-13' AND '2012-06-26' AND t_kc22.SELF_PAY_AMO > 6686.51 UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE fgwy...
css
CREATE TABLE table_35105 ( "Sanskrit \u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d" text, "Tamil \u0ba4\u0bae\u0bbf\u0bb4\u0bcd" text, "Telugu \u0c24\u0c46\u0c32\u0c41\u0c17\u0c41" text, "Kannada \u0c95\u0ca8\u0ccd\u0ca8\u0ca1" text, "Malayalam \u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02" text, ...
SELECT "Sanskrit \u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d" FROM table_35105 WHERE "Kannada \u0c95\u0ca8\u0ccd\u0ca8\u0ca1" = 'uttara ಉತ್ತರಾ'
wikisql