instruction stringlengths 0 1.06k | input stringlengths 33 7.14k | response stringlengths 2 4.44k | source stringclasses 25
values | text stringlengths 302 8.5k |
|---|---|---|---|---|
what flights are available from DALLAS to ATLANTA with one way economy fares | 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 city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varc... | 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, fare, fare_basis, flight, flight_fare WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA' AND fare_basis.economy = 'YES' AND fare.fare_basi... | atis | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what flights are available from DALLAS to ATLANTA with one way economy fares ### Input: CREATE TABLE airport (
airport_c... |
Which Ipsos 5/16/09 has a TNS-Sofres 5/28/09 of 2.5%? | CREATE TABLE table_54442 (
"Party" text,
"Results 2004" text,
"CSA 5/14/09" text,
"Viavoice 5/15/09" text,
"Ifop- La Croix 5/15/09" text,
"Ipsos 5/16/09" text,
"OpinionWay 5/18/09" text,
"CSA 5/20/09" text,
"Ipsos 5/25/09" text,
"TNS-Sofres 5/26/09" text,
"OpinionWay 5/28/09"... | SELECT "Ipsos 5/16/09" FROM table_54442 WHERE "TNS-Sofres 5/28/09" = '2.5%' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Ipsos 5/16/09 has a TNS-Sofres 5/28/09 of 2.5%? ### Input: CREATE TABLE table_54442 (
"Party" text,
"Results 2... |
What is the name of the building that was the tallest from 1990 1997 in Frankfurt? | CREATE TABLE table_name_78 (
name VARCHAR,
city VARCHAR,
years_as_tallest VARCHAR
) | SELECT name FROM table_name_78 WHERE city = "frankfurt" AND years_as_tallest = "1990–1997" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the name of the building that was the tallest from 1990 1997 in Frankfurt? ### Input: CREATE TABLE table_name_78 (
... |
AA flights from CINCINNATI to SALT LAKE CITY | CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'SALT LAKE CITY' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name =... | atis | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: AA flights from CINCINNATI to SALT LAKE CITY ### Input: CREATE TABLE airport_service (
city_code varchar,
airport_co... |
Are there any courses in Synthesis and Characterization that satisfy the ULCS requirement ? | CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
sc... | SELECT DISTINCT course.department, course.name, course.number 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 '%Synthesis and Characterization%' OR course.description LIKE '%Synthesis and Characterization%' O... | advising | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Are there any courses in Synthesis and Characterization that satisfy the ULCS requirement ? ### Input: CREATE TABLE semester... |
Show the average age of heads of departments born in each state with a bar chart, list by the X-axis in desc. | CREATE TABLE department (
Department_ID int,
Name text,
Creation text,
Ranking int,
Budget_in_Billions real,
Num_Employees real
)
CREATE TABLE head (
head_ID int,
name text,
born_state text,
age real
)
CREATE TABLE management (
department_ID int,
head_ID int,
tempor... | SELECT born_state, AVG(age) FROM head GROUP BY born_state ORDER BY born_state DESC | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show the average age of heads of departments born in each state with a bar chart, list by the X-axis in desc. ### Input: CRE... |
How many people were present at the July 10 game? | CREATE TABLE table_24619 (
"Week" real,
"Date" text,
"Opponent" text,
"Location" text,
"Final Score" text,
"Attendance" real,
"Record" text
) | SELECT "Attendance" FROM table_24619 WHERE "Date" = 'July 10' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many people were present at the July 10 game? ### Input: CREATE TABLE table_24619 (
"Week" real,
"Date" text,
... |
How many total wins does Ballarat FL of East point have when the against is greater than 1000? | CREATE TABLE table_7309 (
"Ballarat FL" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
) | SELECT COUNT("Wins") FROM table_7309 WHERE "Ballarat FL" = 'east point' AND "Against" > '1000' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many total wins does Ballarat FL of East point have when the against is greater than 1000? ### Input: CREATE TABLE table... |
What is the issue date of the volume with the minimum weeks on top? | CREATE TABLE artist (
artist_id number,
artist text,
age number,
famous_title text,
famous_release_date text
)
CREATE TABLE volume (
volume_id number,
volume_issue text,
issue_date text,
weeks_on_top number,
song text,
artist_id number
)
CREATE TABLE music_festival (
id... | SELECT issue_date FROM volume ORDER BY weeks_on_top LIMIT 1 | spider | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the issue date of the volume with the minimum weeks on top? ### Input: CREATE TABLE artist (
artist_id number,
... |
WHAT WAS THE FINISH NUMBER WITH A START SMALLER THAN 20 IN 1969? | CREATE TABLE table_58849 (
"Year" real,
"Manufacturer" text,
"Start" real,
"Finish" real,
"Team" text
) | SELECT COUNT("Finish") FROM table_58849 WHERE "Start" < '20' AND "Year" = '1969' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: WHAT WAS THE FINISH NUMBER WITH A START SMALLER THAN 20 IN 1969? ### Input: CREATE TABLE table_58849 (
"Year" real,
... |
Find the number of different products that are produced by companies at different headquarter cities Plot them as bar chart, and could you order by the Y-axis in desc please? | CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | SELECT Headquarter, COUNT(DISTINCT T1.Name) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code ORDER BY COUNT(DISTINCT T1.Name) DESC | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find the number of different products that are produced by companies at different headquarter cities Plot them as bar chart,... |
Tell me the differences between ARABIC 600 and ARABIC 101 . | CREATE TABLE gsi (
course_offering_id int,
student_id int
)
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_id varchar
)
CREATE TABLE requirement (... | SELECT DISTINCT department, description, number FROM course WHERE (department = 'ARABIC' AND number = 600) OR (department = 'ARABIC' AND number = 101) | advising | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Tell me the differences between ARABIC 600 and ARABIC 101 . ### Input: CREATE TABLE gsi (
course_offering_id int,
st... |
calculate the number of times patient 007-2498 had a surgical drain, tube output: drainage bag-closed s until 265 days ago. | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE vitalperiodic (
vitalperiodici... | SELECT COUNT(*) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '007-2498')) AND intakeoutput.cellpath LIKE '%output%' AND intakeoutput.cel... | eicu | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: calculate the number of times patient 007-2498 had a surgical drain, tube output: drainage bag-closed s until 265 days ago. ... |
For those records from the products and each product's manufacturer, show me about the distribution of name and manufacturer , and group by attribute headquarter in a bar chart. | CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those records from the products and each product's manufacturer, show me about the distribution of name and manufacturer... |
Show writers who have published a book with price more than 4000000. | CREATE TABLE publication (
Book_ID VARCHAR,
Price INTEGER
)
CREATE TABLE book (
Writer VARCHAR,
Book_ID VARCHAR
) | SELECT T1.Writer FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID WHERE T2.Price > 4000000 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show writers who have published a book with price more than 4000000. ### Input: CREATE TABLE publication (
Book_ID VARCH... |
tell me the number of urgent hospital admission patients who have been diagnosed with retained plastic fragments. | 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 WHERE demographic.admission_type = "URGENT" AND diagnoses.long_title = "Retained plastic fragments" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: tell me the number of urgent hospital admission patients who have been diagnosed with retained plastic fragments. ### Input:... |
Which Rank has a Total larger than 30, and a Bronze of 14? | CREATE TABLE table_9297 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT AVG("Rank") FROM table_9297 WHERE "Total" > '30' AND "Bronze" = '14' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Rank has a Total larger than 30, and a Bronze of 14? ### Input: CREATE TABLE table_9297 (
"Rank" real,
"Nation... |
How many points for did Bridgend Athletic RFC score? | CREATE TABLE table_69523 (
"Club" text,
"Played" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text
) | SELECT "Points for" FROM table_69523 WHERE "Club" = 'bridgend athletic rfc' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many points for did Bridgend Athletic RFC score? ### Input: CREATE TABLE table_69523 (
"Club" text,
"Played" tex... |
What school did the linebacker who was drafted after round 8 come from? | CREATE TABLE table_name_36 (
school_club_team VARCHAR,
round VARCHAR,
position VARCHAR
) | SELECT school_club_team FROM table_name_36 WHERE round > 8 AND position = "linebacker" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What school did the linebacker who was drafted after round 8 come from? ### Input: CREATE TABLE table_name_36 (
school_c... |
How many times was the game 39? | CREATE TABLE table_17299 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT COUNT("Record") FROM table_17299 WHERE "Game" = '39' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many times was the game 39? ### Input: CREATE TABLE table_17299 (
"Game" real,
"Date" text,
"Team" text,
... |
What turbo has a L2 cache of 4 256 kb, a release date of June 2013, and a Model number of core i7-4770s? | CREATE TABLE table_14170 (
"Model number" text,
"sSpec number" text,
"Cores" text,
"Frequency" text,
"Turbo" text,
"L2 cache" text,
"L3 cache" text,
"GPU model" text,
"GPU frequency" text,
"Socket" text,
"I/O bus" text,
"Release date" text,
"Release price ( USD )" tex... | SELECT "Turbo" FROM table_14170 WHERE "L2 cache" = '4 × 256 kb' AND "Release date" = 'june 2013' AND "Model number" = 'core i7-4770s' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What turbo has a L2 cache of 4 256 kb, a release date of June 2013, and a Model number of core i7-4770s? ### Input: CREATE T... |
calculate the probability of survival for four year among the patients diagnosed with upper respiratory obstruction - due to tumor. | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost numbe... | SELECT SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t2.diagnosistime) > 4 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOI... | eicu | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: calculate the probability of survival for four year among the patients diagnosed with upper respiratory obstruction - due to... |
Return a bar chart about the distribution of All_Games and School_ID , list by the School_ID in descending. | CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | SELECT All_Games, School_ID FROM basketball_match ORDER BY School_ID DESC | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Return a bar chart about the distribution of All_Games and School_ID , list by the School_ID in descending. ### Input: CREAT... |
what is the one year survival rate for a patient with facial bone fracture - maxillary fracture? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtim... | SELECT SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t2.diagnosistime) > 1 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOI... | eicu | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the one year survival rate for a patient with facial bone fracture - maxillary fracture? ### Input: CREATE TABLE dia... |
what were the top five diagnoses that had the highest one year mortality rate? | CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,... | SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t4.icd9_code FROM (SELECT t3.icd9_code, DENSE_RANK() OVER (ORDER BY t3.c1 DESC) AS c2 FROM (SELECT t2.icd9_code, 100 - SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t2.chartt... | mimic_iii | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what were the top five diagnoses that had the highest one year mortality rate? ### Input: CREATE TABLE d_items (
row_id ... |
WHat is the number for the player whose height is 2.01? | CREATE TABLE table_12962773_12 (
player VARCHAR,
height VARCHAR
) | SELECT COUNT(player) FROM table_12962773_12 WHERE height = "2.01" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: WHat is the number for the player whose height is 2.01? ### Input: CREATE TABLE table_12962773_12 (
player VARCHAR,
... |
What is the tournament surface at Aptos? | CREATE TABLE table_56308 (
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent in the final" text,
"Score" text
) | SELECT "Surface" FROM table_56308 WHERE "Tournament" = 'aptos' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the tournament surface at Aptos? ### Input: CREATE TABLE table_56308 (
"Date" text,
"Tournament" text,
"... |
What season did School/Club Team, East have an Acquisition via of trade? | CREATE TABLE table_43173 (
"Name" text,
"Position" text,
"Number" text,
"School/Club Team" text,
"Season" text,
"Acquisition via" text
) | SELECT "Season" FROM table_43173 WHERE "Acquisition via" = 'trade' AND "School/Club Team" = 'east' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What season did School/Club Team, East have an Acquisition via of trade? ### Input: CREATE TABLE table_43173 (
"Name" te... |
What is the position of the player from Fort Lauderdale, Florida? | CREATE TABLE table_name_3 (
position VARCHAR,
hometown VARCHAR
) | SELECT position FROM table_name_3 WHERE hometown = "fort lauderdale, florida" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the position of the player from Fort Lauderdale, Florida? ### Input: CREATE TABLE table_name_3 (
position VARCHA... |
Who wrote 'episode 10'? | CREATE TABLE table_22285 (
"No. overall" real,
"No. in series" real,
"Title" text,
"Director" text,
"Writer" text,
"Original air date" text,
"Production code" real
) | SELECT "Writer" FROM table_22285 WHERE "Title" = 'Episode 10' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who wrote 'episode 10'? ### Input: CREATE TABLE table_22285 (
"No. overall" real,
"No. in series" real,
"Title" ... |
What call sign is licensed in soledad, california? | CREATE TABLE table_name_65 (
call_sign VARCHAR,
city_of_license VARCHAR
) | SELECT call_sign FROM table_name_65 WHERE city_of_license = "soledad, california" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What call sign is licensed in soledad, california? ### Input: CREATE TABLE table_name_65 (
call_sign VARCHAR,
city_o... |
On what circuit was the GTU winning team #59 Brumos Porsche - Audi in round 5? | CREATE TABLE table_848 (
"Rnd" real,
"Circuit" text,
"GTO Winning Team" text,
"GTU Winning Team" text,
"TO Winning Team" text,
"TU Winning Team" text,
"Results" text
) | SELECT "Circuit" FROM table_848 WHERE "Rnd" = '5' AND "GTU Winning Team" = '#59 Brumos Porsche - Audi' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: On what circuit was the GTU winning team #59 Brumos Porsche - Audi in round 5? ### Input: CREATE TABLE table_848 (
"Rnd"... |
What was the attendance on the bye week? | CREATE TABLE table_33089 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | SELECT "Attendance" FROM table_33089 WHERE "Date" = 'bye' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the attendance on the bye week? ### Input: CREATE TABLE table_33089 (
"Week" real,
"Date" text,
"Oppone... |
Find the first names of professors who are not playing Canoeing or Kayaking. | CREATE TABLE faculty (
lname VARCHAR,
rank VARCHAR
)
CREATE TABLE Faculty (
lname VARCHAR,
facID VARCHAR
)
CREATE TABLE activity (
activity_name VARCHAR
)
CREATE TABLE Faculty_participates_in (
facID VARCHAR,
actid VARCHAR
) | SELECT lname FROM faculty WHERE rank = 'Professor' EXCEPT SELECT DISTINCT T1.lname FROM faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking' | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find the first names of professors who are not playing Canoeing or Kayaking. ### Input: CREATE TABLE faculty (
lname VAR... |
What is the season that has fewer than 5 total seasons and is in Ottawa, Ontario? | CREATE TABLE table_name_49 (
seasons VARCHAR,
total_seasons VARCHAR,
city VARCHAR
) | SELECT seasons FROM table_name_49 WHERE total_seasons < 5 AND city = "ottawa, ontario" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the season that has fewer than 5 total seasons and is in Ottawa, Ontario? ### Input: CREATE TABLE table_name_49 (
... |
What is the total number for November, larger than 8.53 in February, 20.21 in March, and less than 7.9 in September? | CREATE TABLE table_41567 (
"Year" real,
"January" real,
"February" real,
"March" real,
"April" real,
"June" real,
"July" real,
"August" real,
"September" real,
"October" real,
"November" real,
"December" real,
"Annual Additions(in millions)" real,
"Average Monthly... | SELECT COUNT("November") FROM table_41567 WHERE "February" > '8.53' AND "March" = '20.21' AND "September" < '7.9' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the total number for November, larger than 8.53 in February, 20.21 in March, and less than 7.9 in September? ### Inp... |
For those records from the products and each product's manufacturer, return a bar chart about the distribution of headquarter and the sum of manufacturer , and group by attribute headquarter, list in desc by the Y. | CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) | SELECT Headquarter, SUM(Manufacturer) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY SUM(Manufacturer) DESC | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those records from the products and each product's manufacturer, return a bar chart about the distribution of headquarte... |
What language is Sky Cinema Passion television service n. 308? | CREATE TABLE table_15887683_5 (
language VARCHAR,
television_service VARCHAR,
n° VARCHAR
) | SELECT language FROM table_15887683_5 WHERE television_service = "Sky Cinema Passion" AND n° = "308" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What language is Sky Cinema Passion television service n. 308? ### Input: CREATE TABLE table_15887683_5 (
language VARCH... |
Visualize the relationship between Team_ID and ACC_Percent , and group by attribute All_Road. | CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | SELECT Team_ID, ACC_Percent FROM basketball_match GROUP BY All_Road | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Visualize the relationship between Team_ID and ACC_Percent , and group by attribute All_Road. ### Input: CREATE TABLE univer... |
For those employees who was hired before 2002-06-21, find job_id and the sum of employee_id , and group by attribute job_id, and visualize them by a bar chart, and sort y-axis from high to low order please. | 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 JOB_ID, SUM(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY SUM(EMPLOYEE_ID) DESC | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who was hired before 2002-06-21, find job_id and the sum of employee_id , and group by attribute job_id,... |
I want to take a 16 -credit course on Cinema and the Francophone World . | CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
... | SELECT DISTINCT department, name, number FROM course WHERE (description LIKE '%Cinema and the Francophone World%' OR name LIKE '%Cinema and the Francophone World%') AND credits = 16 | advising | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: I want to take a 16 -credit course on Cinema and the Francophone World . ### Input: CREATE TABLE area (
course_id int,
... |
Name the proto-austrronesian for *pine, *papine | CREATE TABLE table_15568886_14 (
proto_austronesian VARCHAR,
proto_oceanic VARCHAR
) | SELECT proto_austronesian FROM table_15568886_14 WHERE proto_oceanic = "*pine, *papine" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the proto-austrronesian for *pine, *papine ### Input: CREATE TABLE table_15568886_14 (
proto_austronesian VARCHAR,
... |
Which countries has the most number of airlines whose active status is 'Y'? | CREATE TABLE airports (
apid number,
name text,
city text,
country text,
x number,
y number,
elevation number,
iata text,
icao text
)
CREATE TABLE airlines (
alid number,
name text,
iata text,
icao text,
callsign text,
country text,
active text
)
CREATE ... | SELECT country FROM airlines WHERE active = 'Y' GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1 | spider | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which countries has the most number of airlines whose active status is 'Y'? ### Input: CREATE TABLE airports (
apid numb... |
What was the minimum area in square kilometers that produced 3,200,000 (12th) bbl/day? | CREATE TABLE table_20922 (
"Country" text,
"Region" text,
"Joined OPEC" real,
"Population (July 2012)" real,
"Area (km\u00b2)" real,
"Production ( bbl /day)" text
) | SELECT MIN("Area (km\u00b2)") FROM table_20922 WHERE "Production ( bbl /day)" = '3,200,000 (12th)' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the minimum area in square kilometers that produced 3,200,000 (12th) bbl/day? ### Input: CREATE TABLE table_20922 (... |
What notes did the creature comforts film have? | CREATE TABLE table_35179 (
"Year" real,
"Title" text,
"Director" text,
"Writer" text,
"Notes" text
) | SELECT "Notes" FROM table_35179 WHERE "Title" = 'creature comforts' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What notes did the creature comforts film have? ### Input: CREATE TABLE table_35179 (
"Year" real,
"Title" text,
... |
calculate five year survival probability of patients who were prescribed lactulose after having been diagnosed with digestive neoplasm nos? | CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE chartevents... | SELECT SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t4.charttime) > 5 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.subject_id, t2.charttime FROM (SELECT t1.subject_id, t1.charttime FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd... | mimic_iii | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: calculate five year survival probability of patients who were prescribed lactulose after having been diagnosed with digestiv... |
How many documents are created in each day? Bin the document date by year interval with a line chart, and show by the x axis in descending please. | CREATE TABLE Projects (
Project_ID INTEGER,
Project_Details VARCHAR(255)
)
CREATE TABLE Accounts (
Account_ID INTEGER,
Statement_ID INTEGER,
Account_Details VARCHAR(255)
)
CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_Type_Name VARCHAR(255),
Document_Type_Desc... | SELECT Document_Date, COUNT(Document_Date) FROM Ref_Document_Types AS T1 JOIN Documents AS T2 ON T1.Document_Type_Code = T2.Document_Type_Code ORDER BY Document_Date DESC | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many documents are created in each day? Bin the document date by year interval with a line chart, and show by the x axis... |
What is Name, when Length Meters is greater than 66.4, and when Km From Kingston is 138.8? | CREATE TABLE table_name_54 (
name VARCHAR,
length_meters VARCHAR,
km_from_kingston VARCHAR
) | SELECT name FROM table_name_54 WHERE length_meters > 66.4 AND km_from_kingston = 138.8 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is Name, when Length Meters is greater than 66.4, and when Km From Kingston is 138.8? ### Input: CREATE TABLE table_nam... |
when was the last time that patient 003-7849 was prescribed dextrose 50% abboject and glucose-vitamin c 4-0.006 g po chew until 34 months ago at the same time? | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE microlab (
microlabid number,
... | SELECT t1.drugstarttime FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'glucose-vitamin c 4-0.006 g po chew' AND patient.uniquepid = '003-7849' AND DATETIME(medication.drugstarttime) <= DATETIM... | eicu | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: when was the last time that patient 003-7849 was prescribed dextrose 50% abboject and glucose-vitamin c 4-0.006 g po chew un... |
What is shown for ends lost when pa is 44? | CREATE TABLE table_25689740_2 (
Ends VARCHAR,
pa VARCHAR
) | SELECT Ends AS lost FROM table_25689740_2 WHERE pa = 44 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is shown for ends lost when pa is 44? ### Input: CREATE TABLE table_25689740_2 (
Ends VARCHAR,
pa VARCHAR
) ###... |
Visualize a bar chart for how many tracks does each genre have and what are the names of the top 5? | CREATE TABLE albums (
id INTEGER,
title VARCHAR(160),
artist_id INTEGER
)
CREATE TABLE genres (
id INTEGER,
name VARCHAR(120)
)
CREATE TABLE employees (
id INTEGER,
last_name VARCHAR(20),
first_name VARCHAR(20),
title VARCHAR(30),
reports_to INTEGER,
birth_date TIMESTAMP,
... | SELECT T1.name, COUNT(*) FROM genres AS T1 JOIN tracks AS T2 ON T2.genre_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 5 | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Visualize a bar chart for how many tracks does each genre have and what are the names of the top 5? ### Input: CREATE TABLE ... |
What is the total number of Points that Peter Whitehead earned in a Ferrari 125? | CREATE TABLE table_name_42 (
points INTEGER,
entrant VARCHAR,
chassis VARCHAR
) | SELECT SUM(points) FROM table_name_42 WHERE entrant = "peter whitehead" AND chassis = "ferrari 125" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the total number of Points that Peter Whitehead earned in a Ferrari 125? ### Input: CREATE TABLE table_name_42 (
... |
Name the US dance when the year is more than 1985 | CREATE TABLE table_name_89 (
us_dance VARCHAR,
year INTEGER
) | SELECT us_dance FROM table_name_89 WHERE year > 1985 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the US dance when the year is more than 1985 ### Input: CREATE TABLE table_name_89 (
us_dance VARCHAR,
year INT... |
Top User Of a Peticular Tag in Iran. | CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CRE... | WITH USER_BY_TAG AS (SELECT ROW_NUMBER() OVER (ORDER BY COUNT(*) DESC) AS Rank, u.Id AS "user_link", TagName, COUNT(*) AS UpVotes FROM Tags AS t INNER JOIN PostTags AS pt ON pt.TagId = t.Id INNER JOIN Posts AS p ON p.ParentId = pt.PostId INNER JOIN Votes AS v ON v.PostId = p.Id AND VoteTypeId = 2 INNER JOIN Users AS u ... | sede | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Top User Of a Peticular Tag in Iran. ### Input: CREATE TABLE Users (
Id number,
Reputation number,
CreationDate ... |
Show the comparison of the total number of the home city of all drivers with a bar chart, I want to rank in descending by the bars. | CREATE TABLE school (
School_ID int,
Grade text,
School text,
Location text,
Type text
)
CREATE TABLE school_bus (
School_ID int,
Driver_ID int,
Years_Working int,
If_full_time bool
)
CREATE TABLE driver (
Driver_ID int,
Name text,
Party text,
Home_city text,
Ag... | SELECT Home_city, COUNT(Home_city) FROM driver GROUP BY Home_city ORDER BY Home_city DESC | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show the comparison of the total number of the home city of all drivers with a bar chart, I want to rank in descending by th... |
Which tests have 'Pass' results? Return the dates when the tests were taken, and count them by a bar chart, order by the Y in asc. | CREATE TABLE Student_Course_Enrolment (
registration_id INTEGER,
student_id INTEGER,
course_id INTEGER,
date_of_enrolment DATETIME,
date_of_completion DATETIME
)
CREATE TABLE Courses (
course_id INTEGER,
author_id INTEGER,
subject_id INTEGER,
course_name VARCHAR(120),
course_des... | SELECT date_test_taken, COUNT(date_test_taken) FROM Student_Tests_Taken WHERE test_result = "Pass" GROUP BY date_test_taken ORDER BY COUNT(date_test_taken) | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which tests have 'Pass' results? Return the dates when the tests were taken, and count them by a bar chart, order by the Y i... |
What is the site where the game was held in the city of Delaware? | CREATE TABLE table_47860 (
"Date" text,
"Time" text,
"Opponent" text,
"Site" text,
"City" text
) | SELECT "Site" FROM table_47860 WHERE "City" = 'delaware' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the site where the game was held in the city of Delaware? ### Input: CREATE TABLE table_47860 (
"Date" text,
... |
Find the number of courses provided in each year with a group line chart that groups by semester, and I want to show in desc by the X. | CREATE TABLE course (
course_id varchar(8),
title varchar(50),
dept_name varchar(20),
credits numeric(2,0)
)
CREATE TABLE takes (
ID varchar(5),
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0),
grade varchar(2)
)
CREATE TABLE section (
course... | SELECT year, COUNT(*) FROM section GROUP BY semester ORDER BY year DESC | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find the number of courses provided in each year with a group line chart that groups by semester, and I want to show in desc... |
What is the sum of To Par, when Player is 'Bob Rosburg'? | CREATE TABLE table_45573 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" real
) | SELECT SUM("To par") FROM table_45573 WHERE "Player" = 'bob rosburg' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the sum of To Par, when Player is 'Bob Rosburg'? ### Input: CREATE TABLE table_45573 (
"Place" text,
"Player... |
What is the title of episode 10? | CREATE TABLE table_74389 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real
) | SELECT "Title" FROM table_74389 WHERE "No. in season" = '10' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the title of episode 10? ### Input: CREATE TABLE table_74389 (
"No. in series" real,
"No. in season" real,
... |
Find questions only tagged with one thing, that isn't also in the title. | CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
RevisionGUID other
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId nu... | SELECT Id AS "post_link", Tags FROM Posts WHERE Tags LIKE '<gimp>' AND NOT Title LIKE '%gimp%' | sede | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find questions only tagged with one thing, that isn't also in the title. ### Input: CREATE TABLE SuggestedEdits (
Id num... |
What week were there 56,023 people in attendance? | CREATE TABLE table_62056 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) | SELECT COUNT("Week") FROM table_62056 WHERE "Attendance" = '56,023' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What week were there 56,023 people in attendance? ### Input: CREATE TABLE table_62056 (
"Week" real,
"Date" text,
... |
tell me the number of times he finished above 10th place . | CREATE TABLE table_204_609 (
id number,
"year" number,
"car" number,
"start" number,
"qual" number,
"rank" number,
"finish" number,
"laps" number,
"led" number,
"retired" text
) | SELECT COUNT(*) FROM table_204_609 WHERE "finish" < 10 | squall | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: tell me the number of times he finished above 10th place . ### Input: CREATE TABLE table_204_609 (
id number,
"year"... |
Who were all the candidates in elections in which Steve Chabot was a candidate? | CREATE TABLE table_1805191_36 (
candidates VARCHAR,
incumbent VARCHAR
) | SELECT candidates FROM table_1805191_36 WHERE incumbent = "Steve Chabot" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who were all the candidates in elections in which Steve Chabot was a candidate? ### Input: CREATE TABLE table_1805191_36 (
... |
What is the lowest bronze a team with 9 silvers, a total larger than 13, and more than 13 gold medals has? | CREATE TABLE table_name_58 (
bronze INTEGER,
gold VARCHAR,
silver VARCHAR,
total VARCHAR
) | SELECT MIN(bronze) FROM table_name_58 WHERE silver = 9 AND total > 13 AND gold > 13 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the lowest bronze a team with 9 silvers, a total larger than 13, and more than 13 gold medals has? ### Input: CREATE... |
Which Silver has a Rank of 1, and a Total smaller than 11? | CREATE TABLE table_48309 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT SUM("Silver") FROM table_48309 WHERE "Rank" = '1' AND "Total" < '11' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Silver has a Rank of 1, and a Total smaller than 11? ### Input: CREATE TABLE table_48309 (
"Rank" text,
"Natio... |
count the number of patients whose drug route is both eyes. | 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 INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.route = "BOTH EYES" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: count the number of patients whose drug route is both eyes. ### Input: CREATE TABLE procedures (
subject_id text,
ha... |
What is the highest crowd number for the home team Richmond? | CREATE TABLE table_name_5 (
crowd INTEGER,
home_team VARCHAR
) | SELECT MAX(crowd) FROM table_name_5 WHERE home_team = "richmond" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the highest crowd number for the home team Richmond? ### Input: CREATE TABLE table_name_5 (
crowd INTEGER,
h... |
how many more people live in dennery than the forest reserve ? | CREATE TABLE table_203_212 (
id number,
"#" number,
"district" text,
"land area (km2)" number,
"population\n(2010 census)" number,
"density (persons/km2)" number
) | SELECT (SELECT "population\n(2010 census)" FROM table_203_212 WHERE "district" = 'dennery') - (SELECT "population\n(2010 census)" FROM table_203_212 WHERE "district" = 'forest reserve') | squall | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many more people live in dennery than the forest reserve ? ### Input: CREATE TABLE table_203_212 (
id number,
"#... |
what are the top four prescribed drugs among patients with age 60 or above since 2101? | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
treatmenti... | SELECT t1.drugname FROM (SELECT medication.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age >= 60) AND STRFTIME('%y', medication.drugstarttime) >= '2101' GROUP BY medication.drugname) AS t1 W... | eicu | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what are the top four prescribed drugs among patients with age 60 or above since 2101? ### Input: CREATE TABLE lab (
lab... |
What is the lowest Digital PSIP for channels over 29 with callsign CFTU-DT? | CREATE TABLE table_name_81 (
digital_psip INTEGER,
call_sign VARCHAR,
broadcast_channel VARCHAR
) | SELECT MIN(digital_psip) FROM table_name_81 WHERE call_sign = "cftu-dt" AND broadcast_channel > 29 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the lowest Digital PSIP for channels over 29 with callsign CFTU-DT? ### Input: CREATE TABLE table_name_81 (
digi... |
Name the opponent with record of 12-18 | CREATE TABLE table_68894 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Record" text
) | SELECT "Opponent" FROM table_68894 WHERE "Record" = '12-18' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the opponent with record of 12-18 ### Input: CREATE TABLE table_68894 (
"Date" text,
"Opponent" text,
"Scor... |
Can SAC 440 be taken by me in Spring-Summer 2001 ? | CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as varchar,
admi... | SELECT COUNT(*) > 0 FROM (SELECT course_id FROM student_record WHERE earn_credit = 'Y' AND student_id = 1) AS DERIVED_TABLEalias0, course AS COURSEalias0, course_offering AS COURSE_OFFERINGalias0, semester AS SEMESTERalias0 WHERE COURSEalias0.course_id = COURSE_OFFERINGalias0.course_id AND NOT COURSEalias0.course_id IN... | advising | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Can SAC 440 be taken by me in Spring-Summer 2001 ? ### Input: CREATE TABLE program (
program_id int,
name varchar,
... |
What is the total amount of points that Christy has in the years before 1954? | CREATE TABLE table_name_59 (
points INTEGER,
entrant VARCHAR,
year VARCHAR
) | SELECT SUM(points) FROM table_name_59 WHERE entrant = "christy" AND year < 1954 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the total amount of points that Christy has in the years before 1954? ### Input: CREATE TABLE table_name_59 (
po... |
What is the saturated fat with 28g of polyunsaturated fat? | CREATE TABLE table_63508 (
"Total fat" text,
"Saturated fat" text,
"Monounsaturated fat" text,
"Polyunsaturated fat" text,
"Smoke point" text
) | SELECT "Saturated fat" FROM table_63508 WHERE "Polyunsaturated fat" = '28g' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the saturated fat with 28g of polyunsaturated fat? ### Input: CREATE TABLE table_63508 (
"Total fat" text,
"... |
What is the control type which was founded in 1818? | CREATE TABLE table_23906 (
"School" text,
"Location(s)" text,
"Control" text,
"Type" text,
"Accreditation" text,
"Founded" text,
"Enrollment" text
) | SELECT "Control" FROM table_23906 WHERE "Founded" = '1818' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the control type which was founded in 1818? ### Input: CREATE TABLE table_23906 (
"School" text,
"Location(s... |
Name the total number of round for wide receiver for kent state | CREATE TABLE table_name_51 (
round VARCHAR,
position VARCHAR,
college VARCHAR
) | SELECT COUNT(round) FROM table_name_51 WHERE position = "wide receiver" AND college = "kent state" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the total number of round for wide receiver for kent state ### Input: CREATE TABLE table_name_51 (
round VARCHAR,
... |
Bring the list of patients younger than 41 years of age who had a blood lab test done. | 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.age < "41" AND lab.fluid = "Blood" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Bring the list of patients younger than 41 years of age who had a blood lab test done. ### Input: CREATE TABLE demographic (... |
What are all the different zip codes that have a maximum dew point that was always below 70? | CREATE TABLE weather (
date text,
max_temperature_f number,
mean_temperature_f number,
min_temperature_f number,
max_dew_point_f number,
mean_dew_point_f number,
min_dew_point_f number,
max_humidity number,
mean_humidity number,
min_humidity number,
max_sea_level_pressure_inc... | SELECT DISTINCT zip_code FROM weather EXCEPT SELECT DISTINCT zip_code FROM weather WHERE max_dew_point_f >= 70 | spider | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are all the different zip codes that have a maximum dew point that was always below 70? ### Input: CREATE TABLE weather... |
Which podiums have a final placing of 10th? | CREATE TABLE table_15852257_1 (
podiums VARCHAR,
final_placing VARCHAR
) | SELECT podiums FROM table_15852257_1 WHERE final_placing = "10th" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which podiums have a final placing of 10th? ### Input: CREATE TABLE table_15852257_1 (
podiums VARCHAR,
final_placin... |
What is the name of person that scored 10 goals? | CREATE TABLE table_16901 (
"number" real,
"date of debut" text,
"name" text,
"date of birth" text,
"number of caps" real,
"number of goals" real,
"date of death\u2020" text
) | SELECT "name" FROM table_16901 WHERE "number of goals" = '10' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the name of person that scored 10 goals? ### Input: CREATE TABLE table_16901 (
"number" real,
"date of debut... |
All swift-related questions in 2015. | CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE SuggestedEdits (
Id number,
PostId numb... | SELECT Id, PostTypeId, Body, ParentId, CreationDate, Score FROM Posts AS p WHERE p.ParentId IN (SELECT Id FROM Posts AS q WHERE (q.Tags LIKE '%<swift>%' OR q.Tags LIKE '%<swift2>%' OR q.Tags LIKE '%<swift-playground>%' OR q.Tags LIKE '%<swift-json>%' OR q.Tags LIKE '%<swift-generics>%' OR q.Tags LIKE '%<swift-extension... | sede | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: All swift-related questions in 2015. ### Input: CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
... |
When the rank is less than 4, and has a second quarter of exxon mobil 341,140.3, what is the fourth quarter? | CREATE TABLE table_name_27 (
fourth_quarter VARCHAR,
rank VARCHAR,
second_quarter VARCHAR
) | SELECT fourth_quarter FROM table_name_27 WHERE rank < 4 AND second_quarter = "exxon mobil 341,140.3" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When the rank is less than 4, and has a second quarter of exxon mobil 341,140.3, what is the fourth quarter? ### Input: CREA... |
how much dose of lactated ringers did patient 24894 receive on 11/29/2100? | 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 cost (
row_id number,
subject_id number,
hadm_id nu... | SELECT SUM(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 = 24894)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.lab... | mimic_iii | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how much dose of lactated ringers did patient 24894 receive on 11/29/2100? ### Input: CREATE TABLE icustays (
row_id num... |
What are the titles and ids for albums containing tracks with unit price greater than 1, could you order by the y axis in asc? | CREATE TABLE Customer (
CustomerId integer,
FirstName varchar(40),
LastName varchar(20),
Company varchar(80),
Address varchar(70),
City varchar(40),
State varchar(40),
Country varchar(40),
PostalCode varchar(10),
Phone varchar(24),
Fax varchar(24),
Email varchar(60),
... | SELECT T1.Title, T1.AlbumId FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId WHERE T2.UnitPrice > 1 ORDER BY T1.AlbumId | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the titles and ids for albums containing tracks with unit price greater than 1, could you order by the y axis in as... |
What is the average rank of the airport with a 9.3% annual change? | CREATE TABLE table_name_59 (
rank INTEGER,
annual_change VARCHAR
) | SELECT AVG(rank) FROM table_name_59 WHERE annual_change = "9.3%" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the average rank of the airport with a 9.3% annual change? ### Input: CREATE TABLE table_name_59 (
rank INTEGER,... |
count the number of patients whose admission year is less than 2154 and diagnoses long title is congestive heart failure, unspecified? | 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 prescriptions... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2154" AND diagnoses.long_title = "Congestive heart failure, unspecified" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: count the number of patients whose admission year is less than 2154 and diagnoses long title is congestive heart failure, un... |
count the number of patients whose age is less than 81 and drug code is metd10? | 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.age < "81" AND prescriptions.formulary_drug_cd = "METD10" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: count the number of patients whose age is less than 81 and drug code is metd10? ### Input: CREATE TABLE procedures (
sub... |
what is the week when the finalist is marcelo r os? | CREATE TABLE table_9220 (
"Tournament" text,
"Surface" text,
"Week" text,
"Winner and score" text,
"Finalist" text,
"Semifinalists" text
) | SELECT "Week" FROM table_9220 WHERE "Finalist" = 'marcelo ríos' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the week when the finalist is marcelo r os? ### Input: CREATE TABLE table_9220 (
"Tournament" text,
"Surface... |
how many medals did france get in total ? | CREATE TABLE table_204_261 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
) | SELECT "total" FROM table_204_261 WHERE "nation" = 'france' | squall | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many medals did france get in total ? ### Input: CREATE TABLE table_204_261 (
id number,
"rank" number,
"nat... |
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, draw a bar chart about the distribution of hire_date and the sum of salary bin hire_date by time. | 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 HIRE_DATE, SUM(SALARY) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not ... |
What is the average Total with a Nation of ethiopia (eth) and a Rank that is larger than 9? | CREATE TABLE table_75839 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT AVG("Total") FROM table_75839 WHERE "Nation" = 'ethiopia (eth)' AND "Rank" > '9' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the average Total with a Nation of ethiopia (eth) and a Rank that is larger than 9? ### Input: CREATE TABLE table_75... |
When was William Kennedy first elected? | CREATE TABLE table_3618 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" text,
"Result" text,
"Candidates" text
) | SELECT "First elected" FROM table_3618 WHERE "Incumbent" = 'William Kennedy' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When was William Kennedy first elected? ### Input: CREATE TABLE table_3618 (
"District" text,
"Incumbent" text,
... |
How many students are enrolled in colleges that have student accepted during tryouts, and in which states are those colleges? | CREATE TABLE college (
cname text,
state text,
enr number
)
CREATE TABLE player (
pid number,
pname text,
ycard text,
hs number
)
CREATE TABLE tryout (
pid number,
cname text,
ppos text,
decision text
) | SELECT DISTINCT T1.state, T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cname = T2.cname WHERE T2.decision = 'yes' | spider | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many students are enrolled in colleges that have student accepted during tryouts, and in which states are those colleges... |
which category did both warren beatty and jeremy pikser each won together ? | CREATE TABLE table_202_75 (
id number,
"award" text,
"category" text,
"recipients and nominees" text,
"result" text
) | SELECT "category" FROM table_202_75 WHERE "recipients and nominees" = 'warren beatty' AND "result" = 'won' INTERSECT SELECT "category" FROM table_202_75 WHERE "recipients and nominees" = 'jeremy pikser' AND "result" = 'won' | squall | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: which category did both warren beatty and jeremy pikser each won together ? ### Input: CREATE TABLE table_202_75 (
id nu... |
Name the record with opponent of christian nielson | CREATE TABLE table_name_71 (
record VARCHAR,
opponent VARCHAR
) | SELECT record FROM table_name_71 WHERE opponent = "christian nielson" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the record with opponent of christian nielson ### Input: CREATE TABLE table_name_71 (
record VARCHAR,
opponent ... |
how many patients whose ethnicity is white and drug route is replace? | 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 prescriptions... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "WHITE" AND prescriptions.route = "REPLACE" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients whose ethnicity is white and drug route is replace? ### Input: CREATE TABLE diagnoses (
subject_id tex... |
Find all Bars in Dallas | CREATE TABLE category (
id int,
business_id varchar,
category_name varchar
)
CREATE TABLE review (
rid int,
business_id varchar,
user_id varchar,
rating float,
text longtext,
year int,
month varchar
)
CREATE TABLE business (
bid int,
business_id varchar,
name varcha... | SELECT business.name FROM business, category WHERE business.city = 'Dallas' AND category.business_id = business.business_id AND category.category_name = 'Bars' | yelp | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find all Bars in Dallas ### Input: CREATE TABLE category (
id int,
business_id varchar,
category_name varchar
)
... |
What is the New Zealand Kennel Club Toy Group with papillon as the Australian National Kennel Council Toy Dogs Group breed? | CREATE TABLE table_38761 (
"The Kennel Club (UK) Toy Group" text,
"Canadian Kennel Club Toy Dogs Group" text,
"American Kennel Club Toy Group" text,
"Australian National Kennel Council Toy Dogs Group" text,
"New Zealand Kennel Club Toy Group" text
) | SELECT "New Zealand Kennel Club Toy Group" FROM table_38761 WHERE "Australian National Kennel Council Toy Dogs Group" = 'papillon' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the New Zealand Kennel Club Toy Group with papillon as the Australian National Kennel Council Toy Dogs Group breed? ... |
What is the smallest sales area (m ) that has 4,094/m and more than 2 stores? | CREATE TABLE table_name_20 (
sales_area__m²_ INTEGER,
sales_per_area VARCHAR,
no_of_stores VARCHAR
) | SELECT MIN(sales_area__m²_) FROM table_name_20 WHERE sales_per_area = "€4,094/m²" AND no_of_stores > 2 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the smallest sales area (m ) that has 4,094/m and more than 2 stores? ### Input: CREATE TABLE table_name_20 (
sa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.