instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_75 (
outcome VARCHAR,
opponent_in_the_final VARCHAR,
surface VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the outcome of the match against Sylvia Hanika on a hard (i) surface?
| SELECT outcome FROM table_name_75 WHERE opponent_in_the_final = "sylvia hanika" AND surface = "hard (i)" | sql_create_context |
CREATE TABLE table_name_48 (
prominence__m_ INTEGER,
peak VARCHAR,
elevation__m_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average prominence in m of pietrosul rodnei peak, which has an elevation less than 2,303?
| SELECT AVG(prominence__m_) FROM table_name_48 WHERE peak = "pietrosul rodnei" AND elevation__m_ < 2 OFFSET 303 | sql_create_context |
CREATE TABLE table_203_743 (
id number,
"version" text,
"date" text,
"development cycle" text,
"size (in kb)" number,
"download" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- the download at the top of the chart
| SELECT "download" FROM table_203_743 WHERE id = 1 | squall |
CREATE TABLE table_name_96 (
points INTEGER,
opponent VARCHAR,
game VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Points have an Opponent of new york islanders, and a Game smaller than 65?
| SELECT SUM(points) FROM table_name_96 WHERE opponent = "new york islanders" AND game < 65 | sql_create_context |
CREATE TABLE table_37061 (
"Driver" text,
"Entries" real,
"Points" real,
"Average points per race entered" real,
"Average pre-2010" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest amount of points driver Romain Grosjean, who has an... | SELECT MIN("Points") FROM table_37061 WHERE "Driver" = 'romain grosjean' AND "Average pre-2010" < '0' | wikisql |
CREATE TABLE table_name_99 (
country VARCHAR,
city VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What country has the city, Sydney?
| SELECT country FROM table_name_99 WHERE city = "sydney" | sql_create_context |
CREATE TABLE table_11900773_5 (
first_day_cover_cancellation VARCHAR,
theme VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the first day cover cancellation for the University of Saskatchewan themed stamp?
| SELECT first_day_cover_cancellation FROM table_11900773_5 WHERE theme = "University of Saskatchewan" | sql_create_context |
CREATE TABLE table_name_5 (
team VARCHAR,
race_name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What team won the Tour de Santa Catarina?
| SELECT team FROM table_name_5 WHERE race_name = "tour de santa catarina" | sql_create_context |
CREATE TABLE table_49718 (
"Year" real,
"U.S." text,
"U.S. R&B" text,
"U.S. Rap" text,
"Album" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the U.S. rap rank for the song with a U.S. R&B 23 rank?
| SELECT "U.S. Rap" FROM table_49718 WHERE "U.S. R&B" = '23' | wikisql |
CREATE TABLE table_57280 (
"Last" text,
"First" text,
"Year" real,
"Sport" text,
"Country" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the sport for canada in 2004
| SELECT "Sport" FROM table_57280 WHERE "Country" = 'canada' AND "Year" = '2004' | wikisql |
CREATE TABLE table_name_92 (
rank VARCHAR,
season VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the rank of the team during season 2006/07?
| SELECT rank FROM table_name_92 WHERE season = "2006/07" | sql_create_context |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | SELECT jybgb.BGDH FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN person_info_hz_info JOIN person_info 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 AND person_info_hz_info.KH = hz_info.KH AND pers... | css |
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additio... | SELECT DISTINCT name, number FROM course WHERE department = 'EECS' AND has_lab = 'N' AND number < 400 + 100 AND number >= 400 | advising |
CREATE TABLE table_78222 (
"Subframe #" real,
"Page #" text,
"Name" text,
"Word #" real,
"Bits" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average word count with crs and subframes lesser than 2?
| SELECT AVG("Word #") FROM table_78222 WHERE "Name" = 'crs' AND "Subframe #" < '2' | wikisql |
CREATE TABLE fires (
fire_year number,
discovery_date number,
discovery_doy number,
discovery_time text,
stat_cause_code number,
stat_cause_descr text,
cont_date text,
cont_doy text,
cont_time text,
fire_size number,
fire_size_class text,
latitude number,
longitude nu... | SELECT discovery_time FROM fires GROUP BY discovery_time ORDER BY COUNT(*) DESC LIMIT 1 | uswildfires |
CREATE TABLE table_33427 (
"State" text,
"Born/Died" text,
"Active service" text,
"Chief Judge" text,
"Senior status" text,
"Appointed by" text,
"Reason for termination" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What were the years of s... | SELECT "Senior status" FROM table_33427 WHERE "Active service" = '1972–1995' | wikisql |
CREATE TABLE table_65901 (
"Date" text,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponent in the final" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What opponent in the final has October 9, 2005 as the date?
| SELECT "Opponent in the final" FROM table_65901 WHERE "Date" = 'october 9, 2005' | wikisql |
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | SELECT All_Road, ACC_Percent FROM basketball_match ORDER BY ACC_Percent DESC | nvbench |
CREATE TABLE reservations (
code number,
room text,
checkin text,
checkout text,
rate number,
lastname text,
firstname text,
adults number,
kids number
)
CREATE TABLE rooms (
roomid text,
roomname text,
beds number,
bedtype text,
maxoccupancy number,
basepric... | SELECT decor, COUNT(*) FROM rooms WHERE baseprice > 120 GROUP BY decor | spider |
CREATE TABLE table_45713 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Record for April 15?
| SELECT "Record" FROM table_45713 WHERE "Date" = 'april 15' | 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 COUNT(*) FROM t_kc21 WHERE PERSON_NM = '袁项明' AND IN_HOSP_DATE BETWEEN '2020-10-22' AND '2021-08-10' AND CLINIC_TYPE = '住院' | css |
CREATE TABLE table_68076 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the total number of year for chassis of kurtis kraft 4000 and points more than 2
| SELECT COUNT("Year") FROM table_68076 WHERE "Chassis" = 'kurtis kraft 4000' AND "Points" > '2' | wikisql |
CREATE TABLE table_name_53 (
score VARCHAR,
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what team has a score of 2
| SELECT score FROM table_name_53 WHERE points = 2 | sql_create_context |
CREATE TABLE table_28181401_4 (
attendance INTEGER,
round VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When semi final (2nd leg) is the round what is the highest attendance?
| SELECT MAX(attendance) FROM table_28181401_4 WHERE round = "Semi Final (2nd leg)" | sql_create_context |
CREATE TABLE table_name_97 (
opponent VARCHAR,
tournament VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the opponent for the tournament of taranto?
| SELECT opponent FROM table_name_97 WHERE tournament = "taranto" | sql_create_context |
CREATE TABLE table_name_76 (
silver VARCHAR,
nation VARCHAR,
bronze VARCHAR,
total VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which silver has a Bronze of 1, a Total of 4, and a Nation of slovakia?
| SELECT silver FROM table_name_76 WHERE bronze = "1" AND total = "4" AND nation = "slovakia" | sql_create_context |
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 lab ON demographic.hadm_id = lab.hadm_id WHERE lab.itemid = "51257" AND lab.flag = "abnormal" | mimicsql_data |
CREATE TABLE table_15489 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the score on august 21, 2007
| SELECT "Score" FROM table_15489 WHERE "Date" = 'august 21, 2007' | wikisql |
CREATE TABLE table_56039 (
"Date" text,
"Venue" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" real,
"Series" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the most that attendend when the venue was ... | SELECT MAX("Attendance") FROM table_56039 WHERE "Venue" = 'td banknorth garden' AND "Series" = 'montreal leads 3-1' | wikisql |
CREATE TABLE table_72300 (
"Election" real,
"# of candidates nominated" real,
"# of seats won" real,
"# of total votes" real,
"% of popular vote" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the # of seats one for the election in 1974?
| SELECT "# of seats won" FROM table_72300 WHERE "Election" = '1974' | 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_MED_SER_ORG_NO = '9250851' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC LIMIT 10 | css |
CREATE TABLE table_name_82 (
attendance INTEGER,
result VARCHAR,
week VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest attendance that has l 42-35 as the result, with a week less than 13?
| SELECT MIN(attendance) FROM table_name_82 WHERE result = "l 42-35" AND week < 13 | sql_create_context |
CREATE TABLE table_55309 (
"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 "Date" FROM table_55309 WHERE "Game" = '23' | wikisql |
CREATE TABLE table_23308178_5 (
game VARCHAR,
opponent VARCHAR,
location VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many different games against Florida Panthers were played in Verizon Center?
| SELECT COUNT(game) FROM table_23308178_5 WHERE opponent = "Florida Panthers" AND location = "Verizon Center" | sql_create_context |
CREATE TABLE table_75229 (
"Year" real,
"Class" text,
"Team" text,
"Machine" text,
"Points" real,
"Rank" text,
"Wins" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which team had a year over 1995, machine of RS125R, and ranked 1st?
| SELECT "Team" FROM table_75229 WHERE "Year" > '1995' AND "Machine" = 'rs125r' AND "Rank" = '1st' | wikisql |
CREATE TABLE table_25270 (
"City" text,
"County" text,
"Region" text,
"Local authority" text,
"Type" text,
"Population" real,
"Urban area" real,
"Metropolitan area" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total members... | SELECT MAX("Metropolitan area") FROM table_25270 WHERE "City" = 'Manchester' | wikisql |
CREATE TABLE table_name_18 (
team VARCHAR,
location_attendance VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which team played in the Boston Garden when the final score was L 118-130?
| SELECT team FROM table_name_18 WHERE location_attendance = "boston garden" AND score = "l 118-130" | sql_create_context |
CREATE TABLE table_name_85 (
finish VARCHAR,
to_par VARCHAR,
year_s__won VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Finish, when To Par is less than 14, and when Year(s) Won is '1952 , 1963'?
| SELECT finish FROM table_name_85 WHERE to_par < 14 AND year_s__won = "1952 , 1963" | sql_create_context |
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC... | SELECT COUNT(hz_info.RYBH) FROM hz_info JOIN zzmzjzjlb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX WHERE zzmzjzjlb.ZZYSGH = '59407914' AND zzmzjzjlb.JZKSRQ BETWEEN '2007-04-22' AND '2019-12-24' UNION SELECT COUNT(hz_info.RYBH) FROM hz_info JOIN fzzmzjzjlb ON hz_inf... | css |
CREATE TABLE DEPARTMENT (
DEPT_CODE varchar(10),
DEPT_NAME varchar(30),
SCHOOL_CODE varchar(8),
EMP_NUM int,
DEPT_ADDRESS varchar(20),
DEPT_EXTENSION varchar(4)
)
CREATE TABLE CLASS (
CLASS_CODE varchar(5),
CRS_CODE varchar(10),
CLASS_SECTION varchar(2),
CLASS_TIME varchar(20),
... | SELECT SCHOOL_CODE, COUNT(DISTINCT DEPT_ADDRESS) FROM DEPARTMENT | nvbench |
CREATE TABLE table_name_99 (
remarks VARCHAR,
class_from_1928 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What were the remarks for the coach having a class from 1928 of Cid-21B?
| SELECT remarks FROM table_name_99 WHERE class_from_1928 = "cid-21b" | sql_create_context |
CREATE TABLE table_33130 (
"Team" text,
"Manager" text,
"Captain" text,
"Kit maker" text,
"Shirt sponsor" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What team does Carlsberg sponsor?
| SELECT "Team" FROM table_33130 WHERE "Shirt sponsor" = 'carlsberg' | wikisql |
CREATE TABLE mzjzjlb (
YLJGDM text,
JZLSH text,
KH text,
KLX number,
MJZH text,
HZXM text,
NLS number,
NLY number,
ZSEBZ number,
JZZTDM number,
JZZTMC text,
JZJSSJ time,
TXBZ number,
ZZBZ number,
WDBZ number,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
... | SELECT person_info.JGDM, person_info.JGMC, COUNT(person_info.RYBH) FROM person_info JOIN hz_info JOIN mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE mzjzjlb.JZZDBM = 'T31.744' GROUP BY person_info.JGDM | css |
CREATE TABLE table_203_622 (
id number,
"date" text,
"team" text,
"name" text,
"position" text,
"years in nba" number,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many years in the nba did mark madsen play ?
| SELECT "years in nba" FROM table_203_622 WHERE "name" = 'mark madsen' | squall |
CREATE TABLE table_name_4 (
h___a VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the H/A on 29 july 1992?
| SELECT h___a FROM table_name_4 WHERE date = "29 july 1992" | sql_create_context |
CREATE TABLE table_3434 (
"Series #" real,
"Season #" real,
"Title" text,
"Director" text,
"Writer(s)" text,
"Airdate" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who directed the episode that aired on September 25, 1967?
| SELECT "Director" FROM table_3434 WHERE "Airdate" = 'September 25, 1967' | wikisql |
CREATE TABLE table_name_36 (
goals VARCHAR,
transfer_window VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many goals for Kenton have a transfer window of Summer?
| SELECT COUNT(goals) FROM table_name_36 WHERE transfer_window = "summer" AND name = "kenton" | sql_create_context |
CREATE TABLE table_19805130_3 (
rating VARCHAR,
viewers__millions_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If the amount of viewers is 5.14 million and the rating/share is 2.0/6, what is the ranking?
| SELECT rating FROM table_19805130_3 WHERE rating / SHARE(18 - 49) = 2.0 / 6 AND viewers__millions_ = "5.14" | sql_create_context |
CREATE TABLE table_name_42 (
laps INTEGER,
time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average laps for the +50.653 time?
| SELECT AVG(laps) FROM table_name_42 WHERE time = "+50.653" | sql_create_context |
CREATE TABLE table_12379297_1 (
power__kw_ VARCHAR,
ch__number VARCHAR,
callsign VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the power when ch# is tv-26 and dyfj-tv?
| SELECT power__kw_ FROM table_12379297_1 WHERE ch__number = "TV-26" AND callsign = "DYFJ-TV" | sql_create_context |
CREATE TABLE table_203_484 (
id number,
"member" text,
"party" text,
"electorate" text,
"state" text,
"first elected" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- alan bird and billy davies were both elected to the house of representatives as ... | SELECT "party" FROM table_203_484 WHERE "member" = 'alan bird' | squall |
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fa... | SELECT DISTINCT airport_service.miles_distant FROM airport, airport_service, city WHERE airport.airport_code = 'DFW' AND airport.airport_code = airport_service.airport_code AND city.city_code = airport_service.city_code AND city.city_name = 'DALLAS' | atis |
CREATE TABLE table_name_76 (
nat VARCHAR,
app_l_c_e_ VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Nationality of the player named Yahaya, who has as App(L/C/E) of 0 (0/0/0)?
| SELECT nat FROM table_name_76 WHERE app_l_c_e_ = "0 (0/0/0)" AND name = "yahaya" | sql_create_context |
CREATE TABLE table_name_80 (
winning_team VARCHAR,
winning_driver VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Winning Team with Rick Mears' and Kraco Twin 125 (R1)?
| SELECT winning_team FROM table_name_80 WHERE winning_driver = "rick mears" AND name = "kraco twin 125 (r1)" | sql_create_context |
CREATE TABLE table_45724 (
"Year" real,
"Category" text,
"President" text,
"Nominee" text,
"Film" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the category of Richard Nixon as President in a year prior to 2009?
| SELECT "Category" FROM table_45724 WHERE "President" = 'richard nixon' AND "Year" < '2009' | wikisql |
CREATE TABLE table_75803 (
"Name" text,
"Novelty" text,
"Status" text,
"Authors" text,
"Location" text,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the Notes of the dinosaur, whose Status is nomen dubium, and whose Location i... | SELECT "Notes" FROM table_75803 WHERE "Status" = 'nomen dubium' AND "Location" = 'china' | wikisql |
CREATE TABLE table_11793221_2 (
killed VARCHAR,
commander VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many where killed under Major-General Jean Victor de Constant Rebecque's command?
| SELECT killed FROM table_11793221_2 WHERE commander = "Major-General Jean Victor de Constant Rebecque" | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_location = "TRSF WITHIN THIS FACILITY" AND lab.itemid = "51301" | mimicsql_data |
CREATE TABLE table_49346 (
"Municipalities of the city" text,
"Area km\u00b2" text,
"Population censo 2007(hab)" text,
"Population under 1 year-old Censo 2007(hab)" text,
"Households (2007)" text,
"Density (hab/ km\u00b2 )" text,
"Elevation msnm" text
)
-- Using valid SQLite, answer the fo... | SELECT "Elevation msnm" FROM table_49346 WHERE "Population censo 2007(hab)" = '77.392*' | wikisql |
CREATE TABLE table_53418 (
"Team" text,
"Games Played" real,
"Wins" real,
"Losses" real,
"Ties" real,
"Goals For" real,
"Goals Against" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the sum of games played when the losses is less th... | SELECT SUM("Games Played") FROM table_53418 WHERE "Losses" < '7' AND "Wins" = '6' AND "Goals For" > '76' | wikisql |
CREATE TABLE table_name_96 (
team VARCHAR,
circuit VARCHAR,
winner VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Team, when Circuit is Queensland Raceway, and when Winner is Garth Tander?
| SELECT team FROM table_name_96 WHERE circuit = "queensland raceway" AND winner = "garth tander" | sql_create_context |
CREATE TABLE table_65362 (
"Lane" real,
"Athlete" text,
"Nationality" text,
"Time" text,
"React" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What the time of Paul Hession with more than an 0.187 react?
| SELECT "Time" FROM table_65362 WHERE "React" > '0.187' AND "Athlete" = 'paul hession' | wikisql |
CREATE TABLE table_57100 (
"Pos." real,
"Driver" text,
"Time" text,
"Best time" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What position is associated with a Time of 20:39.171?
| SELECT AVG("Pos.") FROM table_57100 WHERE "Time" = '20:39.171' | wikisql |
CREATE TABLE table_18267 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who are all the candidates vying for Henry B. Gonzalez' seat?
| SELECT "Candidates" FROM table_18267 WHERE "Incumbent" = 'Henry B. Gonzalez' | wikisql |
CREATE TABLE Customers (
customer_id INTEGER,
customer_type_code VARCHAR(20),
address_line_1 VARCHAR(80),
address_line_2 VARCHAR(80),
town_city VARCHAR(80),
state VARCHAR(80),
email_address VARCHAR(255),
phone_number VARCHAR(80)
)
CREATE TABLE Complaints (
complaint_id INTEGER,
... | SELECT product_category_code, AVG(product_price) FROM Products GROUP BY product_category_code ORDER BY product_category_code | nvbench |
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 t_kc22 WHERE t_kc22.t_kc21_PERSON_ID = '65683500' AND t_kc22.STA_DATE BETWEEN '2004-07-13' AND '2012-06-26' AND t_kc22.SELF_PAY_AMO > 6686.51 | css |
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE flight_stop (
flight_id int,
stop_n... | SELECT DISTINCT aircraft_code FROM aircraft WHERE aircraft_code = 'M80' | atis |
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, Team_ID FROM basketball_match GROUP BY All_Home, ACC_Road | nvbench |
CREATE TABLE table_12383 (
"School" text,
"Location (Population)" text,
"Nickname(s)" text,
"Colors" text,
"Years Member" text,
"Enrollment (2013/14)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the nickname with an enrollment (2013/1... | SELECT "Nickname(s)" FROM table_12383 WHERE "Enrollment (2013/14)" = '160' | wikisql |
CREATE TABLE table_name_65 (
entrant VARCHAR,
pts VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the entrant that has 0 points?
| SELECT entrant FROM table_name_65 WHERE pts = "0" | sql_create_context |
CREATE TABLE table_6254 (
"Year" real,
"Class" text,
"Team" text,
"Chassis" text,
"Tyre" text,
"Laps" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of Laps that's got a Year less than 1987?
| SELECT SUM("Laps") FROM table_6254 WHERE "Year" < '1987' | wikisql |
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 text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2182" AND prescriptions.drug_type = "ADDITIVE" | mimicsql_data |
CREATE TABLE table_15938543_1 (
title VARCHAR,
production_code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Whats the title of the episode with production code 109
| SELECT title FROM table_15938543_1 WHERE production_code = 109 | sql_create_context |
CREATE TABLE table_name_12 (
opponent VARCHAR,
loss VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What opponent has a loss of Trachsel (10-11)?
| SELECT opponent FROM table_name_12 WHERE loss = "trachsel (10-11)" | sql_create_context |
CREATE TABLE table_24766 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"U.S. viewers (millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the title o... | SELECT "Title" FROM table_24766 WHERE "U.S. viewers (millions)" = '18.15' | wikisql |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "74" AND diagnoses.long_title = "Nonspecific elevation of levels of transaminase or lactic acid dehydrogenase [LDH]" | mimicsql_data |
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.diagnosis = "BRAIN MASS;INTRACRANIAL HEMORRHAGE" AND demographic.age < "61" | mimicsql_data |
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE requirement (
... | SELECT DISTINCT course.department, course.name, course.number, program_course.workload FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE area.area LIKE '%computational science%' AND program_course.workload < (SELECT MIN(PROGRA... | advising |
CREATE TABLE table_21014 (
"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 "GPU frequency" FROM table_21014 WHERE "TDP" = '3.6 W' AND "Part number(s)" = 'CY80632007221AB' | wikisql |
CREATE TABLE table_6366 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the date of the game with more than 16,015 in attendance wi... | SELECT "Date" FROM table_6366 WHERE "Attendance" > '16,015' AND "Visitor" = 'colorado' | wikisql |
CREATE TABLE table_name_51 (
grid VARCHAR,
time VARCHAR,
laps VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of Grid, when Time is +43.191, and when Laps is less than 22?
| SELECT COUNT(grid) FROM table_name_51 WHERE time = "+43.191" AND laps < 22 | sql_create_context |
CREATE TABLE table_9403 (
"Player" text,
"Round" real,
"Pick" real,
"Position" text,
"NFL Club" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the largest pick by the Baltimore Colts in a round later than 10?
| SELECT MAX("Pick") FROM table_9403 WHERE "NFL Club" = 'baltimore colts' AND "Round" > '10' | wikisql |
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 text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.label = "WBC, Joint Fluid" | mimicsql_data |
CREATE TABLE table_name_62 (
round INTEGER,
event VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many rounds did the match go for the Bellator 72 event?
| SELECT SUM(round) FROM table_name_62 WHERE event = "bellator 72" | sql_create_context |
CREATE TABLE table_name_97 (
opposing_team VARCHAR,
against VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Opposing Team has an Against of 3, and a Date of 11 february 1950?
| SELECT opposing_team FROM table_name_97 WHERE against = 3 AND date = "11 february 1950" | sql_create_context |
CREATE TABLE table_3778 (
"Game" real,
"January" real,
"Opponent" text,
"Score" text,
"Decision" text,
"Location/Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If the game was on January 21, which game was it?
| SELECT MAX("Game") FROM table_3778 WHERE "January" = '21' | wikisql |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "URGENT" AND lab.itemid = "50805" | mimicsql_data |
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
... | SELECT t1.startdate FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'docusate sodium' AND admissions.subject_id = 73423 AND DATETIME(prescriptions.startdate) >= DATETIME(CURRENT_TIME(), '-162 month'))... | mimic_iii |
CREATE TABLE manager_award_vote (
award_id TEXT,
year INTEGER,
league_id TEXT,
player_id TEXT,
points_won INTEGER,
points_max INTEGER,
votes_first INTEGER
)
CREATE TABLE pitching_postseason (
player_id TEXT,
year INTEGER,
round TEXT,
team_id TEXT,
league_id TEXT,
w I... | SELECT year, COUNT(year) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' ORDER BY year DESC | nvbench |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TI... | SELECT HIRE_DATE, SUM(DEPARTMENT_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY SUM(DEPARTMENT_ID) | nvbench |
CREATE TABLE table_299121_2 (
tv_season VARCHAR,
season VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What TV season was the 1st season?
| SELECT tv_season FROM table_299121_2 WHERE season = "1st" | sql_create_context |
CREATE TABLE table_train_49 (
"id" int,
"consent" bool,
"palliative_treatment" bool,
"acute_mesenteric_ischemia" bool,
"receiving_vasopressor" bool,
"septic_shock" bool,
"NOUSE" float
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- palliative trea... | SELECT * FROM table_train_49 WHERE palliative_treatment = 1 | criteria2sql |
CREATE TABLE table_name_24 (
crowd INTEGER,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Can you tell me the lowest Crowd that has the Away team of melbourne tigers?
| SELECT MIN(crowd) FROM table_name_24 WHERE away_team = "melbourne tigers" | sql_create_context |
CREATE TABLE table_38251 (
"Election" text,
"D\u00e1il" text,
"Share of votes" text,
"Seats" real,
"Government" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number of the dail with 61 seats?
| SELECT "D\u00e1il" FROM table_38251 WHERE "Seats" = '61' | wikisql |
CREATE TABLE table_39758 (
"Office" text,
"Democratic ticket" text,
"Republican ticket" text,
"Law Preservation ticket" text,
"Socialist ticket" text,
"Socialist Labor ticket" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Office has a Rep... | SELECT "Office" FROM table_39758 WHERE "Republican ticket" = 'daniel h. conway' | wikisql |
CREATE TABLE city (
city VARCHAR,
regional_population INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Please give me a list of cities whose regional population is over 10000000.
| SELECT city FROM city WHERE regional_population > 10000000 | sql_create_context |
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal... | SELECT PHONE_NUMBER, MANAGER_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY PHONE_NUMBER DESC | nvbench |
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | SELECT t_kc24.REF_SLT_FLG FROM t_kc24 JOIN t_kc21_t_kc24 JOIN t_kc21 ON t_kc21_t_kc24.MED_SAFE_PAY_ID = t_kc24.MED_SAFE_PAY_ID AND t_kc21_t_kc24.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '25516669958' | css |
CREATE TABLE table_20061872_1 (
original_title VARCHAR,
film_title_used_in_nomination VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the original title of The New Land?
| SELECT original_title FROM table_20061872_1 WHERE film_title_used_in_nomination = "The New Land" | sql_create_context |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.age < "44" AND demographic.admityear < "2152" | mimicsql_data |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.