instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_60656 (
"Season" text,
"League" text,
"Finish" text,
"Wins" text,
"Losses" text,
"Pct." text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many wins when the pct, is .848?
| SELECT "Wins" FROM table_60656 WHERE "Pct." = '.848' | wikisql |
CREATE TABLE table_43878 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( \u00a3 )" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is T5 Place Vijay Singh's To par?
| SELECT "To par" FROM table_43878 WHERE "Place" = 't5' AND "Player" = 'vijay singh' | wikisql |
CREATE TABLE table_name_46 (
time_retired VARCHAR,
laps VARCHAR,
grid VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the time/retired associated with a grid of 5 and under 73 laps?
| SELECT time_retired FROM table_name_46 WHERE laps < 73 AND grid = 5 | sql_create_context |
CREATE TABLE table_train_158 (
"id" int,
"systolic_blood_pressure_sbp" int,
"hemoglobin_a1c_hba1c" float,
"moca_score" int,
"diastolic_blood_pressure_dbp" int,
"body_mass_index_bmi" float,
"age" float,
"NOUSE" float
)
-- Using valid SQLite, answer the following questions for the tables... | SELECT * FROM table_train_158 WHERE moca_score <= 26 | criteria2sql |
CREATE TABLE Things (
thing_id INTEGER,
organization_id INTEGER,
Type_of_Thing_Code CHAR(15),
service_type_code CHAR(10),
service_details VARCHAR(255)
)
CREATE TABLE Customers (
customer_id INTEGER,
customer_details VARCHAR(255)
)
CREATE TABLE Organizations (
organization_id INTEGER,
... | SELECT customer_details, COUNT(customer_details) FROM Customers GROUP BY customer_details ORDER BY COUNT(customer_details) | nvbench |
CREATE TABLE table_68965 (
"Draw" real,
"Country" text,
"Language" text,
"Artist" text,
"Song" text,
"English translation" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the result for linn nyg rd
| SELECT "Result" FROM table_68965 WHERE "Artist" = 'linn nygård' | wikisql |
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE transfers (
row_id... | SELECT AVG(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 12410)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.lab... | mimic_iii |
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.admission_type = "ELECTIVE" AND demographic.age < "70" | mimicsql_data |
CREATE TABLE table_24362 (
"Type of Record" text,
"Attendance" real,
"Date/Year" text,
"Stadium" text,
"Result/Games" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What record was set when the result/game was montreal 20 @ ottawa 10?
| SELECT "Type of Record" FROM table_24362 WHERE "Result/Games" = 'Montreal 20 @ Ottawa 10' | wikisql |
CREATE TABLE party (
Party_ID int,
Year real,
Party text,
Governor text,
Lieutenant_Governor text,
Comptroller text,
Attorney_General text,
US_Senate text
)
CREATE TABLE election (
Election_ID int,
Counties_Represented text,
District int,
Delegate text,
Party int,
... | SELECT Committee, COUNT(Committee) FROM election GROUP BY Committee ORDER BY Committee | nvbench |
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
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,
JO... | SELECT HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY SUM(EMPLOYEE_ID) | nvbench |
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes nu... | SELECT RAND('##seed:int##') | sede |
CREATE TABLE table_179174_2 (
launcher VARCHAR,
flights VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What launcher had spacecrafts that did 37 orbital flights?
| SELECT launcher FROM table_179174_2 WHERE flights = "37 Orbital" | 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 COUNT(*) FROM t_kc21 JOIN t_kc22 JOIN t_kc21_t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc22.MED_CLINIC_ID AND t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID WHERE t_kc21.PERSON_NM = '蒋光耀' AND t_kc22.STA_DATE BETWEEN '2001-07-23' AND '2007-04-15' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC LIMIT ... | css |
CREATE TABLE table_name_36 (
division VARCHAR,
tms VARCHAR,
pos VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the division in the season with 13 tms and pos smaller than 8?
| SELECT COUNT(division) FROM table_name_36 WHERE tms = 13 AND pos < 8 | sql_create_context |
CREATE TABLE table_204_952 (
id number,
"rank" number,
"player" text,
"county" text,
"tally" text,
"total" number,
"opposition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who was the top ranked player in a single game ?
| SELECT "player" FROM table_204_952 WHERE "rank" = 1 | squall |
CREATE TABLE table_name_19 (
song VARCHAR,
artist VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Song is by the Artist 'mor ve tesi'?
| SELECT song FROM table_name_19 WHERE artist = "mor ve ötesi" | sql_create_context |
CREATE TABLE table_17355408_9 (
high_points VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who had the high points on April 8?
| SELECT high_points FROM table_17355408_9 WHERE date = "April 8" | sql_create_context |
CREATE TABLE table_21091157_1 (
game VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the game for record 1-0
| SELECT game FROM table_21091157_1 WHERE record = "1-0" | sql_create_context |
CREATE TABLE table_55948 (
"Year" real,
"Title" text,
"Role" text,
"Studio" text,
"Director" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the studio for The Hard Way in 1943?
| SELECT "Studio" FROM table_55948 WHERE "Year" = '1943' AND "Title" = 'the hard way' | wikisql |
CREATE TABLE table_name_20 (
opened INTEGER,
venue VARCHAR,
established VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When is the earliest year opened for huff hall that was established after 1974?
| SELECT MIN(opened) FROM table_name_20 WHERE venue = "huff hall" AND established > 1974 | sql_create_context |
CREATE TABLE table_16034882_4 (
loses VARCHAR,
goals_conceded VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the total number of losses for the team who has conceded 22?
| SELECT COUNT(loses) FROM table_16034882_4 WHERE goals_conceded = 22 | sql_create_context |
CREATE TABLE table_name_41 (
condition VARCHAR,
bleeding_time VARCHAR,
platelet_count VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- I want the condition that has a prolonged bleeding time and a platelet count of decreased or unaffected
| SELECT condition FROM table_name_41 WHERE bleeding_time = "prolonged" AND platelet_count = "decreased or unaffected" | sql_create_context |
CREATE TABLE Addresses (
Address_ID VARCHAR(100),
Line_1 VARCHAR(255),
Line_2 VARCHAR(255),
City_Town VARCHAR(255),
State_County VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Order_Items (
Order_Item_ID INTEGER,
Order_ID INTEGER,
Product_ID INTEGER,
Order_Quantity VARC... | SELECT Product_Name, AVG(Product_Price) FROM Products GROUP BY Product_Name ORDER BY Product_Name | nvbench |
CREATE TABLE table_12376 (
"Team" text,
"Wins" text,
"Losses" text,
"Points" text,
"WPct." text,
"G.F." text,
"G.A." text,
"Assists" text,
"Penalties" text,
"P.I.M." text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many penalti... | SELECT "Penalties" FROM table_12376 WHERE "G.F." = '40' | wikisql |
CREATE TABLE table_203_865 (
id number,
"place" number,
"athlete" text,
"nation" text,
"best mark" text,
"throw 1" number,
"throw 2" number,
"throw 3" number,
"throw 4" number,
"throw 5" number,
"throw 6" number
)
-- Using valid SQLite, answer the following questions for th... | SELECT "athlete" FROM table_203_865 WHERE "best mark" > (SELECT "best mark" FROM table_203_865 WHERE "athlete" = 'renate culmberger') | squall |
CREATE TABLE table_23466 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real,
"U.S. viewers (millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided a... | SELECT COUNT("No. in season") FROM table_23466 WHERE "U.S. viewers (millions)" = '8.69' | wikisql |
CREATE TABLE table_72973 (
"Segment description" text,
"Date opened" text,
"Line(s)" text,
"Endpoints" text,
"# of new stations" text,
"Length (miles)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lenth (miles) of endpoints westlak... | SELECT "Length (miles)" FROM table_72973 WHERE "Endpoints" = 'Westlake/MacArthur Park to Wilshire/Western' | wikisql |
CREATE TABLE table_name_50 (
director VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the director for 1957
| SELECT director FROM table_name_50 WHERE year = 1957 | sql_create_context |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT AVG(demographic.age) FROM demographic WHERE demographic.ethnicity = "BLACK/AFRICAN AMERICAN" AND demographic.dod_year < "2154.0" | mimicsql_data |
CREATE TABLE table_57775 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many laps for a Time/Retired of tyre, and a Grid larger than 10?
| SELECT COUNT("Laps") FROM table_57775 WHERE "Time/Retired" = 'tyre' AND "Grid" > '10' | wikisql |
CREATE TABLE table_25214321_1 (
season VARCHAR,
third_place VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In what season did Raquel Pacheco finish in third place?
| SELECT season FROM table_25214321_1 WHERE third_place = "Raquel Pacheco" | sql_create_context |
CREATE TABLE table_name_14 (
round INTEGER,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Round is the highest one that has a Position of running back?
| SELECT MAX(round) FROM table_name_14 WHERE position = "running back" | sql_create_context |
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 WHERE demographic.age < "67" AND demographic.dod_year <= "2122.0" | mimicsql_data |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "SYNCOPE;TELEMETRY" AND demographic.admityear < "2137" | mimicsql_data |
CREATE TABLE county (
County_Id int,
County_name text,
Population real,
Zip_code text
)
CREATE TABLE election (
Election_ID int,
Counties_Represented text,
District int,
Delegate text,
Party int,
First_Elected real,
Committee text
)
CREATE TABLE party (
Party_ID int,
... | SELECT Comptroller, COUNT(Comptroller) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 OR T1.District = 2 GROUP BY Comptroller | nvbench |
CREATE TABLE table_204_630 (
id number,
"no" number,
"date" text,
"race" text,
"track" text,
"winner" text,
"reports" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the total number of races in this series ?
| SELECT COUNT("race") FROM table_204_630 | squall |
CREATE TABLE table_53545 (
"D 50 \u221a" text,
"D 49 \u221a" text,
"D 48 \u221a" text,
"D 47 \u221a" text,
"D 46 \u221a" text,
"D 45 \u221a" text,
"D 44 \u221a" text,
"D 43 \u221a" text,
"D 42 \u221a" text,
"D 41 \u221a" text
)
-- Using valid SQLite, answer the following questi... | SELECT "D 49 \u221a" FROM table_53545 WHERE "D 41 \u221a" = 'd 61 √' | wikisql |
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test... | SELECT DISTINCT course.name, course.number, semester.semester, semester.year FROM course, course_offering, semester WHERE ((semester.semester = 'FA' AND semester.year = 2016) OR (semester.semester = 'FA' AND semester.year = 2017) OR (semester.semester = 'FA' AND semester.year = 2018) OR (semester.semester = 'WN' AND se... | advising |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE patient (
... | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'mechanical ventilation' AND STRFTIME('%y', treatment.treatmenttime) <= '2... | eicu |
CREATE TABLE list (
lastname text,
firstname text,
grade number,
classroom number
)
CREATE TABLE teachers (
lastname text,
firstname text,
classroom number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Report the first name and last name of all... | SELECT DISTINCT firstname, lastname FROM teachers | spider |
CREATE TABLE host (
Host_ID int,
Name text,
Nationality text,
Age text
)
CREATE TABLE party_host (
Party_ID int,
Host_ID int,
Is_Main_in_Charge bool
)
CREATE TABLE party (
Party_ID int,
Party_Theme text,
Location text,
First_year text,
Last_year text,
Number_of_host... | SELECT Last_year, COUNT(Last_year) FROM party WHERE Party_Theme = "Spring" OR Party_Theme = "Teqnology" ORDER BY COUNT(Last_year) | nvbench |
CREATE TABLE table_15881 (
"Year" real,
"Tournaments played" real,
"Cuts made*" real,
"Wins" real,
"2nd" real,
"Top 10s" real,
"Best finish" text,
"Earnings ($)" real,
"Money list rank" text,
"Scoring average" text,
"Scoring rank" text
)
-- Using valid SQLite, answer the fo... | SELECT "2nd" FROM table_15881 WHERE "Best finish" = 'T69' | wikisql |
CREATE TABLE table_name_64 (
artist VARCHAR,
year VARCHAR,
format VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the artist after 2012 with CD, LP as the format?
| SELECT artist FROM table_name_64 WHERE year > 2012 AND format = "cd, lp" | 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 * FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '2609401' AND gwyjzb.IN_HOSP_DATE BETWEEN '2006-07-02' AND '2021-01-28' UNION SELECT * FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '2609401' AND fgwyjzb.IN_HOSP_DATE BETWEEN '2006-07-02' AND '2021-01-28' EXCEPT SELECT * FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '260940... | css |
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress ... | SELECT u.Id AS "user_link", SUM(CASE WHEN p.PostTypeId = 1 THEN p.Score ELSE 0 END) AS "question_score", SUM(CASE WHEN p.PostTypeId = 1 THEN 1 ELSE 0 END) AS "question_count", SUM(CASE WHEN p.PostTypeId = 2 THEN p.Score ELSE 0 END) AS "answer_score", SUM(CASE WHEN p.PostTypeId = 2 THEN 1 ELSE 0 END) AS "answer_count" F... | sede |
CREATE TABLE table_38570 (
"Call sign" text,
"Frequency MHz" real,
"City of license" text,
"ERP W" real,
"Class" text,
"FCC info" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Frequency MHz that has a ERP W larger than 205, and a Call sig... | SELECT MAX("Frequency MHz") FROM table_38570 WHERE "ERP W" > '205' AND "Call sign" = 'k230ap' | wikisql |
CREATE TABLE t_kc21 (
MED_CLINIC_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
COMP_ID text,
PERSON_ID text,
PERSON_NM text,
IDENTITY_CARD text,
SOC_SRT_CARD text,
PERSON_SEX number,
PERSON_AGE number,
IN_HOSP_DATE time,
OUT_HOSP_DATE time,
DIFF_PLACE_FLG numb... | SELECT CHA_ITEM_LEV FROM t_kc22 WHERE MED_CLINIC_ID = '82581255235' AND SOC_SRT_DIRE_NM = '汉防己甲素片(薄膜衣)' | css |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Ac/chr syst/dia hrt fail" AND prescriptions.route = "TP" | mimicsql_data |
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Dementia w/o behav dist" AND lab.fluid = "Cerebrospinal Fluid (CSF)" | mimicsql_data |
CREATE TABLE station (
station_id number,
name text,
annual_entry_exit number,
annual_interchanges number,
total_passengers number,
location text,
main_services text,
number_of_platforms number
)
CREATE TABLE train (
train_id number,
name text,
time text,
service text
)
... | SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id WHERE T3.name = "Ananthapuri Express" INTERSECT SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train... | spider |
CREATE TABLE table_33254 (
"City" text,
"Country" text,
"IATA" text,
"ICAO" text,
"Airport" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Angola's airport and ICAO of fnsa?
| SELECT "Airport" FROM table_33254 WHERE "Country" = 'angola' AND "ICAO" = 'fnsa' | wikisql |
CREATE TABLE table_name_34 (
chassis VARCHAR,
entrant VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- I want the chassis for entrant of ecurie lutetia
| SELECT chassis FROM table_name_34 WHERE entrant = "ecurie lutetia" | sql_create_context |
CREATE TABLE table_name_59 (
country VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What country is Craig Parry from?
| SELECT country FROM table_name_59 WHERE player = "craig parry" | sql_create_context |
CREATE TABLE table_name_94 (
album VARCHAR,
year VARCHAR,
label VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Album had a year less than 2005 with a Label by Ministry of Sound?
| SELECT album FROM table_name_94 WHERE year < 2005 AND label = "ministry of sound" | sql_create_context |
CREATE TABLE table_name_8 (
english_meaning VARCHAR,
how_other_tamils_say_it VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the english meaning for engey poringo
| SELECT english_meaning FROM table_name_8 WHERE how_other_tamils_say_it = "engey poringo" | sql_create_context |
CREATE TABLE table_33240 (
"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 at Hawthorn?
| SELECT "Away team score" FROM table_33240 WHERE "Home team" = 'hawthorn' | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
... | SELECT AVG(demographic.days_stay) FROM demographic WHERE demographic.admission_location = "TRANSFER FROM HOSP/EXTRAM" | mimicsql_data |
CREATE TABLE table_27324 (
"Region" text,
"Vehicle" text,
"Automatic washing machine" text,
"Refrigerator" text,
"Water heater" text,
"Fixed telephone line" text,
"Mobile phone" text,
"Cable/Sat. TV connection" text
)
-- Using valid SQLite, answer the following questions for the tables... | SELECT "Fixed telephone line" FROM table_27324 WHERE "Vehicle" = '25.6%' | wikisql |
CREATE TABLE table_name_59 (
general_classification VARCHAR,
points_classification VARCHAR,
stage VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the general classification at stage 18 that has a points classification of Tony Rominger?
| SELECT general_classification FROM table_name_59 WHERE points_classification = "tony rominger" AND stage = "18" | sql_create_context |
CREATE TABLE table_14141 (
"Pick" real,
"Team" text,
"Player" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the position of the player from florida?
| SELECT "Position" FROM table_14141 WHERE "College" = 'florida' | wikisql |
CREATE TABLE table_1341577_10 (
incumbent VARCHAR,
district VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what's incumbent with district being florida 5
| SELECT incumbent FROM table_1341577_10 WHERE district = "Florida 5" | sql_create_context |
CREATE TABLE Residents (
resident_id INTEGER,
property_id INTEGER,
date_moved_in DATETIME,
date_moved_out DATETIME,
other_details VARCHAR(255)
)
CREATE TABLE Customers (
customer_id INTEGER,
customer_details VARCHAR(255)
)
CREATE TABLE Customer_Events (
Customer_Event_ID INTEGER,
c... | SELECT customer_details, COUNT(customer_details) FROM Customers GROUP BY customer_details ORDER BY COUNT(customer_details) DESC | nvbench |
CREATE TABLE driver (
Id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many drivers are there?
| SELECT COUNT(*) FROM driver | sql_create_context |
CREATE TABLE table_5274 (
"Club" text,
"Sport" text,
"League" text,
"Titles" real,
"Founded" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Founded has a Club of tri-city storm and a Titles larger than 1?
| SELECT SUM("Founded") FROM table_5274 WHERE "Club" = 'tri-city storm' AND "Titles" > '1' | wikisql |
CREATE TABLE table_name_37 (
company VARCHAR,
incorporated_in VARCHAR,
type VARCHAR,
principal_activities VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which company's type is joint venture, and has principle activities listed as Cargo Airline and a... | SELECT company FROM table_name_37 WHERE type = "joint venture" AND principal_activities = "cargo airline" AND incorporated_in = "china" | 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 INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.formulary_drug_cd = "LIDO2/5J" AND lab.fluid = "Cerebrospinal Fluid (CSF)" | 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 MAX(demographic.days_stay) FROM demographic WHERE demographic.age >= "68" | mimicsql_data |
CREATE TABLE table_203_741 (
id number,
"season" text,
"competition" text,
"round" text,
"opponent" text,
"home" text,
"away" text,
"aggregate" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which opponent is listed the most on this char... | SELECT "opponent" FROM table_203_741 GROUP BY "opponent" ORDER BY COUNT(*) DESC LIMIT 1 | squall |
CREATE TABLE table_28162 (
"Village" text,
"Area km\u00b2" text,
"Population (2000 census )" real,
"Region" text,
"Pop. Density" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many places named mongmong-toto-maite?
| SELECT COUNT("Region") FROM table_28162 WHERE "Village" = 'Mongmong-Toto-Maite' | wikisql |
CREATE TABLE table_40017 (
"Name" text,
"Height (cm)" real,
"Weight (kg)" real,
"Birthdate" text,
"Birthplace" text,
"1963\u20131964 Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the birthplace of the player who was part of the B... | SELECT "Birthplace" FROM table_40017 WHERE "1963\u20131964 Team" = 'blind river hockey club' | wikisql |
CREATE TABLE table_2668329_18 (
candidates VARCHAR,
incumbent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the candidates for felix walker
| SELECT candidates FROM table_2668329_18 WHERE incumbent = "Felix Walker" | sql_create_context |
CREATE TABLE table_29640 (
"Season" text,
"Episodes" real,
"Timeslot ( EST )" text,
"Season premiere" text,
"Season finale" text,
"TV season" text,
"Rank" text,
"Viewers (in millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What ... | SELECT MAX("Episodes") FROM table_29640 WHERE "Viewers (in millions)" = '14.41' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.insurance = "Private" AND lab.label = "Parathyroid Hormone" | mimicsql_data |
CREATE TABLE table_6429 (
"Make/ Model" text,
"length" text,
"Year" real,
"Numbers (Quantity Ordered)" text,
"Fuel Propulsion" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Numbers (Quantity Ordered) have a Make/ Model of eldorado national pa... | SELECT "Numbers (Quantity Ordered)" FROM table_6429 WHERE "Make/ Model" = 'eldorado national passport' | wikisql |
CREATE TABLE fgwyjzb (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | SELECT gwyjzb.MED_CLINIC_ID, gwyjzb.PERSON_ID, gwyjzb.PERSON_NM, gwyjzb.IDENTITY_CARD, gwyjzb.PERSON_SEX, gwyjzb.PERSON_AGE FROM gwyjzb JOIN t_kc24 ON gwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc24.MED_AMOUT = (SELECT t_kc24.MED_AMOUT FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID = '03425240816') UNION SELECT fgwyjz... | css |
CREATE TABLE table_42433 (
"Outcome" text,
"Date (Final)" text,
"Tournament" text,
"Surface" text,
"Opponent in the final" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the outcome of the match on February 17, 2003?
| SELECT "Outcome" FROM table_42433 WHERE "Date (Final)" = 'february 17, 2003' | wikisql |
CREATE TABLE classroom (
building varchar(15),
room_number varchar(7),
capacity numeric(4,0)
)
CREATE TABLE student (
ID varchar(5),
name varchar(20),
dept_name varchar(20),
tot_cred numeric(3,0)
)
CREATE TABLE course (
course_id varchar(8),
title varchar(50),
dept_name varchar... | SELECT title, SUM(credits) FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY title ORDER BY title | nvbench |
CREATE TABLE table_6265 (
"Tournament" text,
"Wins" real,
"Top-5" real,
"Top-10" real,
"Top-25" real,
"Events" real,
"Cuts made" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the least cuts for top-5 more than 2 with top 25 less than 6... | SELECT MIN("Cuts made") FROM table_6265 WHERE "Top-10" < '11' AND "Top-5" > '2' AND "Top-25" < '6' | 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 WHERE demographic.admission_type = "ELECTIVE" AND demographic.days_stay > "9" | mimicsql_data |
CREATE TABLE table_15838081_3 (
series__number INTEGER,
writer_s_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the most series number for giula sandler
| SELECT MAX(series__number) FROM table_15838081_3 WHERE writer_s_ = "Giula Sandler" | 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 t_kc21.OUT_DIAG_DOC_CD, t_kc21.OUT_DIAG_DOC_NM FROM t_kc21 WHERE t_kc21.PERSON_NM = '苗乐悦' AND t_kc21.IN_HOSP_DATE BETWEEN '2000-07-19' AND '2000-09-22' GROUP BY t_kc21.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC LIMIT 1 | css |
CREATE TABLE table_15484 (
"Name" text,
"Tenure" text,
"Courtesy title" text,
"Court Rank" text,
"revenues" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the courtesy title of the person whose tenure goes from 1766 1794?
| SELECT "Courtesy title" FROM table_15484 WHERE "Tenure" = '1766–1794' | wikisql |
CREATE TABLE CLASS (
CLASS_CODE varchar(5),
CRS_CODE varchar(10),
CLASS_SECTION varchar(2),
CLASS_TIME varchar(20),
CLASS_ROOM varchar(8),
PROF_NUM int
)
CREATE TABLE PROFESSOR (
EMP_NUM int,
DEPT_CODE varchar(10),
PROF_OFFICE varchar(50),
PROF_EXTENSION varchar(4),
PROF_HIG... | SELECT DEPT_CODE, COUNT(*) FROM CLASS AS T1 JOIN COURSE AS T2 ON T1.CRS_CODE = T2.CRS_CODE GROUP BY DEPT_CODE | nvbench |
CREATE TABLE table_4511 (
"STAPLE:" text,
"Maize / Corn [A ]" text,
"Rice [B ]" text,
"Wheat [C ]" text,
"Potato [D ]" text,
"Cassava [E ]" text,
"Soybean (Green) [F ]" text,
"Sweet potato [G ]" text,
"Yam [Y ]" text
)
-- Using valid SQLite, answer the following questions for the t... | SELECT "Sweet potato [G ]" FROM table_4511 WHERE "Soybean (Green) [F ]" = '1.65' | wikisql |
CREATE TABLE genre (
genreid number,
name text
)
CREATE TABLE playlisttrack (
playlistid number,
trackid number
)
CREATE TABLE album (
albumid number,
title text,
artistid number
)
CREATE TABLE invoiceline (
invoicelineid number,
invoiceid number,
trackid number,
unitprice... | SELECT T2.invoicedate FROM customer AS T1 JOIN invoice AS T2 ON T1.customerid = T2.customerid WHERE T1.firstname = "Astrid" AND lastname = "Gruber" | spider |
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length int,
weight int,
capacity int,
pay_load int,
cruising_speed int,
range_... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'MONTREAL' AND CITY_1.country_name = 'CANADA' AND date_day.day_number = 2... | atis |
CREATE TABLE table_28286776_12 (
cap_s_ VARCHAR,
club_s_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many items are listed under caps when burnley is the club team?
| SELECT COUNT(cap_s_) FROM table_28286776_12 WHERE club_s_ = "Burnley" | sql_create_context |
CREATE TABLE table_68344 (
"Rank" real,
"Team" text,
"Country" text,
"Value ($M)" real,
"Debt as % of value" real,
"% change on year" text,
"Revenue ($M)" real,
"Operating income ($m)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name ... | SELECT "Country" FROM table_68344 WHERE "Debt as % of value" < '86' AND "% change on year" = '21' | wikisql |
CREATE TABLE table_9638 (
"Morse Taper number" real,
"Taper" text,
"B (max)" real,
"C (max)" real,
"D (max)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- With a Morse Taper number less than 3 and a C (max) of 59.5 what is the total of D (max)?
| SELECT COUNT("D (max)") FROM table_9638 WHERE "Morse Taper number" < '3' AND "C (max)" = '59.5' | wikisql |
CREATE TABLE table_43780 (
"City" text,
"Country" text,
"IATA" text,
"ICAO" text,
"Airport" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Country, when City is 'Zamboanga'?
| SELECT "Country" FROM table_43780 WHERE "City" = 'zamboanga' | wikisql |
CREATE TABLE tracks (
id number,
name text,
album_id number,
media_type_id number,
genre_id number,
composer text,
milliseconds number,
bytes number,
unit_price number
)
CREATE TABLE playlists (
id number,
name text
)
CREATE TABLE invoices (
id number,
customer_id n... | SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id GROUP BY T1.id HAVING COUNT(T1.id) > 10 | spider |
CREATE TABLE table_50699 (
"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 was spain's score?
| SELECT "Score" FROM table_50699 WHERE "Country" = 'spain' | wikisql |
CREATE TABLE table_2869843_1 (
bi_tone VARCHAR,
model VARCHAR,
olive_drab VARCHAR,
caliber VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- are there bi-tone is there's no olive drab and the caliber is 9 19mm parabellum and model is xdm 5.25 competitio... | SELECT bi_tone FROM table_2869843_1 WHERE olive_drab = "No" AND caliber = "9×19mm Parabellum" AND model = "XDM 5.25 Competition" | sql_create_context |
CREATE TABLE table_1344 (
"Num" real,
"Team" text,
"W" real,
"L" real,
"PCT" text,
"PF" real,
"PA" real,
"Last appearance" real,
"Last championship" real,
"HOME games" real,
"Home wins" real,
"Home losses" real,
"Home Win Pct." text,
"ROAD games" real,
"Road w... | SELECT "PCT" FROM table_1344 WHERE "Team" = 'Green Bay Packers' | wikisql |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartr... | SELECT t1.celllabel FROM (SELECT intakeoutput.celllabel, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM intakeoutput WHERE intakeoutput.cellpath LIKE '%intake%' AND STRFTIME('%y', intakeoutput.intakeoutputtime) = '2104' GROUP BY intakeoutput.celllabel) AS t1 WHERE t1.c1 <= 4 | eicu |
CREATE TABLE table_test_12 (
"id" int,
"serum_potassium" float,
"left_ventricular_ejection_fraction_lvef" int,
"systolic_blood_pressure_sbp" int,
"haemoglobin" float,
"consent" bool,
"hemoglobin_a1c_hba1c" float,
"heart_disease" bool,
"renal_disease" bool,
"anaemia" bool,
"cr... | SELECT * FROM table_test_12 WHERE left_ventricular_ejection_fraction_lvef > 30 | criteria2sql |
CREATE TABLE EMPLOYEE (
EMP_NUM int,
EMP_LNAME varchar(15),
EMP_FNAME varchar(12),
EMP_INITIAL varchar(1),
EMP_JOBCODE varchar(5),
EMP_HIREDATE datetime,
EMP_DOB datetime
)
CREATE TABLE CLASS (
CLASS_CODE varchar(5),
CRS_CODE varchar(10),
CLASS_SECTION varchar(2),
CLASS_TIME... | SELECT DEPT_CODE, SUM(STU_HRS) FROM STUDENT GROUP BY DEPT_CODE ORDER BY SUM(STU_HRS) DESC | nvbench |
CREATE TABLE table_name_25 (
snatch INTEGER,
bodyweight VARCHAR,
clean_ VARCHAR,
_jerk VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Snatch has a Clean & Jerk of 180, and a Bodyweight smaller than 69.83?
| SELECT MIN(snatch) FROM table_name_25 WHERE clean_ & _jerk = 180 AND bodyweight < 69.83 | sql_create_context |
CREATE TABLE table_name_65 (
class_aAAAA VARCHAR,
class_aAA VARCHAR,
atlanta VARCHAR,
class_aA VARCHAR,
weimar VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where Class AAA is Atlanta and Class AA is Weimar, what is Class AAAAA?
| SELECT class_aAAAA FROM table_name_65 WHERE class_aAA = atlanta AND class_aA = weimar | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.