instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_18718 (
"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.
-- How many candidates won the election of john n. sandlin?
| SELECT COUNT("Candidates") FROM table_18718 WHERE "Incumbent" = 'John N. Sandlin' | wikisql |
CREATE TABLE table_14488 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where was the game held on August 20, 2004?
| SELECT "Venue" FROM table_14488 WHERE "Date" = 'august 20, 2004' | wikisql |
CREATE TABLE bdmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZ... | SELECT COUNT(*) FROM wdmzjzjlb WHERE wdmzjzjlb.YLJGDM = '9925374' AND wdmzjzjlb.JZKSRQ BETWEEN '2016-01-06' AND '2020-10-15' AND wdmzjzjlb.ZZBZ > 0 UNION SELECT COUNT(*) FROM bdmzjzjlb WHERE bdmzjzjlb.YLJGDM = '9925374' AND bdmzjzjlb.JZKSRQ BETWEEN '2016-01-06' AND '2020-10-15' AND bdmzjzjlb.ZZBZ > 0 | css |
CREATE TABLE table_name_91 (
year INTEGER,
post VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In what year has a Post of designer?
| SELECT SUM(year) FROM table_name_91 WHERE post = "designer" | sql_create_context |
CREATE TABLE table_56716 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score on April 22?
| SELECT "Score" FROM table_56716 WHERE "Date" = 'april 22' | wikisql |
CREATE TABLE table_43830 (
"Team" text,
"Manager" text,
"Home city" text,
"Stadium" text,
"Capacity" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the team at Stadion Maksimir?
| SELECT "Team" FROM table_43830 WHERE "Stadium" = 'stadion maksimir' | wikisql |
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 t_kc24.t_kc21_MED_ORG_DEPT_CD, t_kc24.t_kc21_MED_ORG_DEPT_NM FROM t_kc24 WHERE t_kc24.t_kc21_MED_SER_ORG_NO = '6679422' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2000-04-05' AND '2005-10-09' GROUP BY t_kc24.t_kc21_MED_ORG_DEPT_CD ORDER BY SUM(t_kc24.OVE_PAY) DESC LIMIT 20 | css |
CREATE TABLE table_name_99 (
silver INTEGER,
rank INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the fewest number of silver medals a nation who ranked below 8 received?
| SELECT MIN(silver) FROM table_name_99 WHERE rank > 8 | sql_create_context |
CREATE TABLE table_773 (
"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 were the candidates when Noble Jones Gregory was incumbent?
| SELECT "Candidates" FROM table_773 WHERE "Incumbent" = 'Noble Jones Gregory' | wikisql |
CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate real
)
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight re... | SELECT Date_of_Birth, Height FROM people | nvbench |
CREATE TABLE table_name_47 (
maximum_fps VARCHAR,
least_compression_at_maximum_fps VARCHAR,
height VARCHAR,
least_compression_at_24_fps VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the maximum fps HDRx with a height larger than 1080 with a ... | SELECT maximum_fps AS HDRx FROM table_name_47 WHERE height > 1080 AND least_compression_at_24_fps = "6:1" AND least_compression_at_maximum_fps = "7:1" | sql_create_context |
CREATE TABLE table_26036 (
"Pos" real,
"No." real,
"Driver" text,
"Team" text,
"Chassis/Engine" text,
"Laps" real,
"Time/Retired" text,
"Grid" real,
"Laps Led" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How man... | SELECT COUNT("No.") FROM table_26036 WHERE "Chassis/Engine" = 'Lola T92/00/ Buick' | wikisql |
CREATE TABLE table_name_44 (
total_time VARCHAR,
margin VARCHAR,
driver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How much time did Coad make when the margin was 04:02?
| SELECT total_time FROM table_name_44 WHERE margin = "04:02" AND driver = "coad" | sql_create_context |
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_... | SELECT DISTINCT ground_service.ground_fare FROM airport, city, ground_service WHERE airport.airport_code = 'BOS' AND city.city_name = 'BOSTON' AND ground_service.airport_code = airport.airport_code AND ground_service.city_code = city.city_code | atis |
CREATE TABLE table_name_14 (
player VARCHAR,
overall INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the player with an Overall larger than 227?
| SELECT player FROM table_name_14 WHERE overall > 227 | sql_create_context |
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "URGENT" AND prescriptions.route = "OU" | mimicsql_data |
CREATE TABLE table_204_256 (
id number,
"position" number,
"club" text,
"played" number,
"points" number,
"wins" number,
"draws" number,
"losses" number,
"goals for" number,
"goals against" number,
"goal difference" number
)
-- Using valid SQLite, answer the following quest... | SELECT "club" FROM table_204_256 ORDER BY "goals for" DESC LIMIT 1 | squall |
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_... | 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, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'WASHINGTON' AND days.day_name = 'WEDNESDAY' AND flight.flight_days = days.days_code... | atis |
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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "LIVER TRANSPLANT" AND procedures.icd9_code = "4575" | mimicsql_data |
CREATE TABLE betfront (
year number,
datetime time,
country text,
competion text,
match text,
home_opening number,
draw_opening number,
away_opening number,
home_closing number,
draw_closing number,
away_closing number
)
CREATE TABLE football_data (
season text,
date... | SELECT * FROM football_data WHERE (fthg + ftag) = 0 | worldsoccerdatabase |
CREATE TABLE table_29445 (
"Episode" text,
"Date" text,
"Official ITV rating (millions)" text,
"Weekly rank" real,
"Share (%)" text,
"Official ITV HD rating (millions)" text,
"Total ITV viewers (millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided... | SELECT "Official ITV rating (millions)" FROM table_29445 WHERE "Total ITV viewers (millions)" = '8.53' | wikisql |
CREATE TABLE table_19960 (
"Election" real,
"Labour" real,
"Conservative" real,
"Liberal" real,
"Social Democratic Party" real,
"Social and Liberal Democrats/ Liberal Democrats" real,
"Independent" real,
"Green" real,
"Other" text,
"Control" text
)
-- Using valid SQLite, answer... | SELECT MIN("Labour") FROM table_19960 WHERE "Social and Liberal Democrats/ Liberal Democrats" = '14' | wikisql |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions... | SELECT prescriptions.drug_type, prescriptions.route FROM prescriptions WHERE prescriptions.drug = "Digoxin" | mimicsql_data |
CREATE TABLE table_19221 (
"Episode" text,
"Broadcast date" text,
"Run time" text,
"Viewers (in millions)" text,
"Archive" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many episodes had a broadcast date and run time of 24:43?
| SELECT COUNT("Broadcast date") FROM table_19221 WHERE "Run time" = '24:43' | wikisql |
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TA... | SELECT NEWID() AS id, p.Id AS qid1, p.Body AS question1, dupes.Id AS qid2, dupes.Body AS question2, 1 AS isDuplicate FROM Posts AS p JOIN PostLinks AS links ON (p.Id = links.RelatedPostId AND LinkTypeId = 3) JOIN Posts AS dupes ON (dupes.Id = links.PostId AND dupes.PostTypeId = 1) WHERE p.Tags LIKE '%java%' AND p.Tags ... | sede |
CREATE TABLE table_48018 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the record of the match against Chris Mounce?
| SELECT "Record" FROM table_48018 WHERE "Opponent" = 'chris mounce' | wikisql |
CREATE TABLE Allergy_Type (
Allergy VARCHAR(20),
AllergyType VARCHAR(20)
)
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... | SELECT Allergy, COUNT(*) FROM Has_Allergy GROUP BY Allergy | nvbench |
CREATE TABLE table_60924 (
"Class" text,
"Introduced" text,
"Number in class" real,
"Number in service" real,
"Power output (kW)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the power output for class 5?
| SELECT "Power output (kW)" FROM table_60924 WHERE "Number in class" = '5' | wikisql |
CREATE TABLE table_39550 (
"Tournament" text,
"1989" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text,
"1997" text,
"Career W\u2013L" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
... | SELECT "1997" FROM table_39550 WHERE "1991" = 'a' AND "Tournament" = 'australian open' | wikisql |
CREATE TABLE table_75075 (
"Rank" real,
"Country/Territory" text,
"Nuestra Belleza Latina" real,
"1st runner-up" real,
"2nd runner-up" real,
"3rd runner-up" real,
"4th runner-up" real,
"5th runner-up" real,
"6th runner-up" real,
"7th runner-up" real,
"8th runner-up" real,
... | SELECT SUM("9th runner-up") FROM table_75075 WHERE "5th runner-up" = '2' AND "Top 18/20/24/30" > '17' | wikisql |
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_code varchar,
minimum_connect_time int
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE airline (
airline_co... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (((((flight.arrival_time < flight.departure_time) AND date_day.day_number = 23 AND date_day.month_number = 4 AND date_day.year = 1991 AND days.da... | atis |
CREATE TABLE table_36485 (
"Name v t e" text,
"Pos." text,
"Height" text,
"Weight" text,
"Club" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the weight of the player from the vk primorac kotor club?
| SELECT "Weight" FROM table_36485 WHERE "Club" = 'vk primorac kotor' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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,
... | SELECT COUNT(*) FROM mzjzjlb WHERE mzjzjlb.JZKSBM = '16206' AND mzjzjlb.JZKSRQ BETWEEN '2000-12-12' AND '2001-10-14' | css |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE T... | SELECT LAST_NAME, DEPARTMENT_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY DEPARTMENT_ID DESC | nvbench |
CREATE TABLE t_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 SUM(t_kc22.AMOUNT) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '韩韵诗' AND t_kc21.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2003-07-31' AND '2013-12-15' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' | css |
CREATE TABLE table_2227 (
"Year" real,
"Fowler" real,
"Stanier, 3 cylinder" real,
"Stanier, 2 cylinder" real,
"Fairburn" real,
"BR Standard" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the Fowler is 16, what is the numb... | SELECT COUNT("Stanier, 3 cylinder") FROM table_2227 WHERE "Fowler" = '16' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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,... | SELECT * FROM person_info JOIN hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jy... | css |
CREATE TABLE catalog_contents (
catalog_entry_name VARCHAR,
height VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the product with the highest height? Give me the catalog entry name.
| SELECT catalog_entry_name FROM catalog_contents ORDER BY height DESC LIMIT 1 | sql_create_context |
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
g... | SELECT DISTINCT course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (course.number = 573 OR course.number = 512) AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_course AS PROGRAM_COURSEalias1 INNER JOIN course AS COURSEalias1 ON ... | advising |
CREATE TABLE table_35374 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text,
"Game Site" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which result happened more recently than week 2, and had a date... | SELECT "Result" FROM table_35374 WHERE "Week" > '2' AND "Date" = 'november 30, 1958' | wikisql |
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.CKZFWXX, jyjgzbb.CKZFWSX FROM mzjzjlb JOIN jybgb JOIN jyjgzbb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE mzjzjlb.JZZDBM = 'H11.754' AND jyjgzbb.JCZBDM = '816429' | css |
CREATE TABLE table_42276 (
"Week" real,
"Date" text,
"Opponent" text,
"Game Site" text,
"Final Score" text,
"Record" text,
"TV Time" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the final score for the game ... | SELECT "Final Score" FROM table_42276 WHERE "Attendance" = '65,309' | wikisql |
CREATE TABLE table_37373 (
"Date" text,
"League position" text,
"Opponents" text,
"Venue" text,
"Result" text,
"Score F\u2013A" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the largest number in attendance at H v... | SELECT MAX("Attendance") FROM table_37373 WHERE "Venue" = 'h' AND "Result" = 'd' AND "Opponents" = 'liverpool' | wikisql |
CREATE TABLE table_56167 (
"Rd #" real,
"Pick #" real,
"Player" text,
"Team (League)" text,
"Reg GP" real,
"Pl GP" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of playoff games played by the Seattle Thunderbirds team w... | SELECT COUNT("Pl GP") FROM table_56167 WHERE "Reg GP" < '5' AND "Team (League)" = 'seattle thunderbirds' AND "Pick #" < '131' | wikisql |
CREATE TABLE journal_committee (
Editor_ID int,
Journal_ID int,
Work_Type text
)
CREATE TABLE journal (
Journal_ID int,
Date text,
Theme text,
Sales int
)
CREATE TABLE editor (
Editor_ID int,
Name text,
Age real
)
-- Using valid SQLite, answer the following questions for the ... | SELECT Name, COUNT(Name) FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID WHERE T3.Sales > 3000 GROUP BY Name | nvbench |
CREATE TABLE table_12275654_1 (
year VARCHAR,
mens_singles VARCHAR,
womens_singles VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many times did Niels Christian Kaldau win the men's single and Pi Hongyan win the women's single in the same year?
| SELECT COUNT(year) FROM table_12275654_1 WHERE mens_singles = "Niels Christian Kaldau" AND womens_singles = "Pi Hongyan" | sql_create_context |
CREATE TABLE table_67943 (
"Date" text,
"Round" text,
"Opponents" text,
"Result F\u2013A" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the opponents for round of round 5
| SELECT "Opponents" FROM table_67943 WHERE "Round" = 'round 5' | wikisql |
CREATE TABLE table_203_157 (
id number,
"year" number,
"film" text,
"role" text,
"language" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how long has neha been acting ?
| SELECT MAX("year") - MIN("year") FROM table_203_157 | squall |
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 COUNT(*) FROM mzjzjlb JOIN hz_info_mzjzjlb JOIN hz_info ON hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.mzjzjlb_id = mzjzjlb.mzjzjlb_id AND hz_info_mzjzjlb.YLJGDM = hz_info.YLJGDM WHERE hz_info.YLJGDM = '06... | css |
CREATE TABLE table_24226 (
"Place" real,
"Athlete" text,
"Long jump" real,
"Javelin" real,
"200 m" real,
"Discus" real,
"1500 m" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the max javelin for 200m for 5
| SELECT MAX("Javelin") FROM table_24226 WHERE "200 m" = '5' | wikisql |
CREATE TABLE table_56852 (
"Team 1" text,
"Agg." text,
"Team 2" text,
"1st leg" text,
"2nd leg" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Team 2 faced Team 1 from Barcelona?
| SELECT "Team 2" FROM table_56852 WHERE "Team 1" = 'barcelona' | 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 demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND lab.label = "Basophils" | mimicsql_data |
CREATE TABLE table_22470 (
"Township" text,
"County" text,
"Pop. (2010)" real,
"Land ( sqmi )" text,
"Water (sqmi)" text,
"Latitude" text,
"Longitude" text,
"GEO ID" real,
"ANSI code" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Wh... | SELECT MAX("GEO ID") FROM table_22470 WHERE "Land ( sqmi )" = '35.999' | wikisql |
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | SELECT JOB_ID, AVG(MANAGER_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY AVG(MANAGER_ID) | nvbench |
CREATE TABLE actor (
actor_id number,
name text,
musical_id number,
character text,
duration text,
age number
)
CREATE TABLE musical (
musical_id number,
name text,
year number,
award text,
category text,
nominee text,
result text
)
-- Using valid SQLite, answer th... | SELECT name FROM actor ORDER BY name | spider |
CREATE TABLE table_5450 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average total with less than 8 bronze, 3 silver, and a Rank smaller than 2?
| SELECT AVG("Total") FROM table_5450 WHERE "Bronze" < '8' AND "Silver" = '3' AND "Rank" < '2' | wikisql |
CREATE TABLE table_name_30 (
quantity INTEGER,
introduced VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of quantity when the introductory year was 1984?
| SELECT SUM(quantity) FROM table_name_30 WHERE introduced = 1984 | sql_create_context |
CREATE TABLE table_48634 (
"Source" text,
"Dates administered" text,
"Democrat: Christine Gregoire" text,
"Republican: Dino Rossi" text,
"Lead Margin" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the percentage for Republican: Dino Rossi ... | SELECT "Republican: Dino Rossi" FROM table_48634 WHERE "Lead Margin" > '7' AND "Democrat: Christine Gregoire" = '53.7%' | wikisql |
CREATE TABLE table_name_8 (
player VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which player has a score of 68-69-73=210
| SELECT player FROM table_name_8 WHERE score = 68 - 69 - 73 = 210 | 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(*) FROM txmzjzjlb WHERE txmzjzjlb.JZKSMC = '小儿耳鼻喉科' AND txmzjzjlb.JZKSRQ BETWEEN '2006-04-21' AND '2010-09-27' UNION SELECT COUNT(*) FROM ftxmzjzjlb WHERE ftxmzjzjlb.JZKSMC = '小儿耳鼻喉科' AND ftxmzjzjlb.JZKSRQ BETWEEN '2006-04-21' AND '2010-09-27' | css |
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 EMAIL, EMPLOYEE_ID FROM employees ORDER BY EMAIL DESC | nvbench |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id numbe... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', transfers.intime)) FROM transfers WHERE transfers.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 7112 AND admissions.dischtime IS NULL)) AND transfers.... | mimic_iii |
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category 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,... | SELECT DISTINCT name, number FROM course WHERE credits = 5 AND department = 'EECS' | advising |
CREATE TABLE table_name_50 (
date VARCHAR,
circuit VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the date for circuit of interlagos
| SELECT date FROM table_name_50 WHERE circuit = "interlagos" | sql_create_context |
CREATE TABLE table_41579 (
"Name" text,
"Japanese" text,
"Date of designation" text,
"Date of reclassification" text,
"Region" text,
"Prefecture" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHich Japanese has a Prefecture of iwate?
| SELECT "Japanese" FROM table_41579 WHERE "Prefecture" = 'iwate' | wikisql |
CREATE TABLE member (
Member_ID int,
Name text,
Membership_card text,
Age int,
Time_of_purchase int,
Level_of_membership int,
Address text
)
CREATE TABLE happy_hour_member (
HH_ID int,
Member_ID int,
Total_amount real
)
CREATE TABLE shop (
Shop_ID int,
Address text,
... | SELECT Address, COUNT(*) FROM member GROUP BY Address ORDER BY COUNT(*) | nvbench |
CREATE TABLE table_29213 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What college did Jim Bennett attend?
| SELECT "College" FROM table_29213 WHERE "Player" = 'Jim Bennett' | wikisql |
CREATE TABLE table_name_9 (
surface VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what Surface was the match against Ilija Bozoljac played?
| SELECT surface FROM table_name_9 WHERE opponent = "ilija bozoljac" | sql_create_context |
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE offering_instructor (
... | SELECT DISTINCT advisory_requirement, enforced_requirement, name FROM course WHERE department = 'EECS' AND number = 438 | advising |
CREATE TABLE table_name_35 (
week INTEGER,
result VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number week with a result of w 40 62?
| SELECT SUM(week) FROM table_name_35 WHERE result = "w 40–62" | sql_create_context |
CREATE TABLE table_15887683_16 (
hdtv VARCHAR,
television_service VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many values of HDTV apply when television service is elite shopping tv?
| SELECT COUNT(hdtv) FROM table_15887683_16 WHERE television_service = "Elite Shopping TV" | sql_create_context |
CREATE TABLE table_25096 (
"Post" real,
"Horse name" text,
"Trainer" text,
"Jockey" text,
"Opening Odds" text,
"Starting Odds" text,
"Finishing Pos." real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the jockey with opening odds of 4-1?... | SELECT "Jockey" FROM table_25096 WHERE "Opening Odds" = '4-1' | wikisql |
CREATE TABLE table_52834 (
"Year" real,
"Award" text,
"Category" text,
"Nominee" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Award is the winner for Outstanding Revival of a Musical given?
| SELECT "Award" FROM table_52834 WHERE "Category" = 'outstanding revival of a musical' | wikisql |
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
... | SELECT AVG(Users."count") FROM (SELECT COUNT(*) AS "count" FROM Users GROUP BY DATE(CreationDate)) AS users | sede |
CREATE TABLE table_9489 (
"Outcome" text,
"Date" real,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents in the final" text,
"Score in the final" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Opponents In The Final, when... | SELECT "Opponents in the final" FROM table_9489 WHERE "Partner" = 'jiří novák' | wikisql |
CREATE TABLE table_38560 (
"Position" real,
"Pilot" text,
"Country" text,
"Glider" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the smallest position with less than 7 points piloted by Didier Hauss?
| SELECT MIN("Position") FROM table_38560 WHERE "Points" < '7' AND "Pilot" = 'didier hauss' | wikisql |
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.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_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 = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.J... | css |
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate tim... | SELECT Text FROM Comments WHERE LOWER(Text) LIKE '%islamic state%' | sede |
CREATE TABLE table_59131 (
"Name" text,
"Pos." text,
"Height" text,
"Weight" text,
"Date of Birth" text,
"Club" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name when weight shows head coach: Aleksandr Kabanov?
| SELECT "Name" FROM table_59131 WHERE "Weight" = 'head coach: aleksandr kabanov' | wikisql |
CREATE TABLE table_510 (
"Institution" text,
"Main Campus Location" text,
"Founded" real,
"Mascot" text,
"School Colors" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the institution with the mascot of blue devils?
| SELECT "Institution" FROM table_510 WHERE "Mascot" = 'Blue Devils' | wikisql |
CREATE TABLE table_73252 (
"Conference" text,
"Regular Season Winner" text,
"Conference Player of the Year" text,
"Conference Tournament" text,
"Tournament Venue (City)" text,
"Tournament Winner" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Wh... | SELECT "Tournament Venue (City)" FROM table_73252 WHERE "Conference Tournament" = '2000 MWC Men''s Basketball Tournament' | wikisql |
CREATE TABLE table_name_78 (
actor_in_london VARCHAR,
_2002 VARCHAR,
shipwreck VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the actor in London in 2002 with the shipwreck of Leonty Ibayev?
| SELECT actor_in_london, _2002 FROM table_name_78 WHERE shipwreck = "leonty ibayev" | sql_create_context |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime 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 wdmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZ... | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM person_info JOIN hz_info JOIN wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZ... | 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 prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | SELECT MAX(demographic.age) FROM demographic WHERE demographic.diagnosis = "HYPERGLYCEMIA" AND demographic.dod_year < "2131.0" | mimicsql_data |
CREATE TABLE table_name_75 (
points VARCHAR,
against VARCHAR,
points_diff VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- I want the total number of points for against of 753 and points diff more than -114
| SELECT COUNT(points) FROM table_name_75 WHERE against = 753 AND points_diff > -114 | sql_create_context |
CREATE TABLE table_30101 (
"Branding" text,
"Callsign" text,
"Frequency" text,
"Power kW" text,
"Coverage" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the frequency for 103.7 energy fm dipolog*
| SELECT "Frequency" FROM table_30101 WHERE "Branding" = '103.7 Energy FM Dipolog*' | wikisql |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_items (
row_id num... | SELECT SUM(prescriptions.dose_val_rx) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 95986 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) AND prescriptions.drug = 'dapsone' | mimic_iii |
CREATE TABLE table_76985 (
"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 Place of the Player with Money greater than 300 and a Score of 71-69-70... | SELECT "Place" FROM table_76985 WHERE "Money ( $ )" > '300' AND "Score" = '71-69-70-70=280' | wikisql |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "ABDOMINAL PAIN" AND demographic.days_stay > "3" | mimicsql_data |
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_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_NM = '许浩歌' AND t_kc21.MED_SER_ORG_NO = '8126391' AND NOT t_kc21.IN_DIAG_DIS_NM LIKE '%肺%' | css |
CREATE TABLE person_info_hz_info (
RYBH text,
KH number,
KLX number,
YLJGDM number
)
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... | SELECT mzjzjlb.SG, mzjzjlb.TZ FROM hz_info JOIN mzjzjlb 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 person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND person_info_hz_info.YLJGDM = hz_info.YLJGDM... | css |
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label te... | SELECT COUNT(*) FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'gastroenterostomy nec') AND DATETIME(procedures_icd.charttime) <= DATETIME(CURRENT_TIME(), '-2 year') | mimic_iii |
CREATE TABLE table_23224961_1 (
season VARCHAR,
oberpfalz VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When spvgg vohenstrau is the oberpfalz what is the season?
| SELECT season FROM table_23224961_1 WHERE oberpfalz = "SpVgg Vohenstrauß" | sql_create_context |
CREATE TABLE table_204_743 (
id number,
"pos" text,
"no" number,
"driver" text,
"constructor" text,
"laps" number,
"time/retired" text,
"grid" number,
"points" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many drivers did not... | SELECT COUNT("driver") FROM table_204_743 WHERE "laps" < 56 | squall |
CREATE TABLE table_72519 (
"School" text,
"Winners" real,
"Finalists" real,
"Total Finals" real,
"Year of last win" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In what year was the total finals at 10?
| SELECT "Year of last win" FROM table_72519 WHERE "Total Finals" = '10' | wikisql |
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE Tags (
Id number,
TagName text,
Cou... | SELECT t.Name, COUNT(*) FROM Posts AS p JOIN PostTypes AS t ON p.PostTypeId = t.Id WHERE OwnerUserId = @userId AND CreationDate >= @startDate GROUP BY t.Name | sede |
CREATE TABLE table_44965 (
"Pollutant" text,
"Type" text,
"Standard" text,
"Averaging Time" text,
"Regulatory Citation" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the averaging time when the regulatory citation is 40 cfr 50.4(b)?
| SELECT "Averaging Time" FROM table_44965 WHERE "Regulatory Citation" = '40 cfr 50.4(b)' | wikisql |
CREATE TABLE table_67081 (
"Rank" real,
"Lane" real,
"Name" text,
"Nationality" text,
"Time" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest numbered lane of Sue Rolph with a rank under 5?
| SELECT MIN("Lane") FROM table_67081 WHERE "Name" = 'sue rolph' AND "Rank" < '5' | wikisql |
CREATE TABLE table_15599 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which is the highest Gold that has a total smaller than 4 and a silver of 1, and a bronze sm... | SELECT MAX("Gold") FROM table_15599 WHERE "Total" < '4' AND "Silver" = '1' AND "Bronze" < '2' AND "Rank" = '13' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.