instruction stringlengths 0 1.06k | input stringlengths 33 7.14k | response stringlengths 2 4.44k | source stringclasses 25
values | text stringlengths 302 8.5k |
|---|---|---|---|---|
how many singles were on the uk singles chart ? | CREATE TABLE table_203_545 (
id number,
"single/ep" text,
"release date" text,
"label" text,
"format(s)" text,
"uk singles chart position" number,
"notes" text
) | SELECT COUNT("single/ep") FROM table_203_545 WHERE NOT "uk singles chart position" IS NULL | 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 singles were on the uk singles chart ? ### Input: CREATE TABLE table_203_545 (
id number,
"single/ep" text,... |
What is the power of the unit built after 1995? | CREATE TABLE table_name_71 (
power__horsepower_ INTEGER,
year_built INTEGER
) | SELECT SUM(power__horsepower_) FROM table_name_71 WHERE year_built > 1995 | 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 power of the unit built after 1995? ### Input: CREATE TABLE table_name_71 (
power__horsepower_ INTEGER,
... |
What is the home of the geust fc basel (asl)? | CREATE TABLE table_49429 (
"Date" text,
"Time" text,
"Home" text,
"Geust" text,
"Result" text
) | SELECT "Home" FROM table_49429 WHERE "Geust" = 'fc basel (asl)' | 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 home of the geust fc basel (asl)? ### Input: CREATE TABLE table_49429 (
"Date" text,
"Time" text,
"H... |
What shows for 2006, when 2013 is 2 4? | CREATE TABLE table_name_64 (
Id VARCHAR
) | SELECT 2006 FROM table_name_64 WHERE 2013 = "2–4" | 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 shows for 2006, when 2013 is 2 4? ### Input: CREATE TABLE table_name_64 (
Id VARCHAR
) ### Response: SELECT 2006 FR... |
What date was the game played at Punt Road Oval? | CREATE TABLE table_name_33 (
date VARCHAR,
venue VARCHAR
) | SELECT date FROM table_name_33 WHERE venue = "punt road oval" | 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 date was the game played at Punt Road Oval? ### Input: CREATE TABLE table_name_33 (
date VARCHAR,
venue VARCHAR... |
what is id of students who registered some courses but the least number of courses in these students? | CREATE TABLE student_course_registrations (
student_id VARCHAR
) | SELECT student_id FROM student_course_registrations GROUP BY student_id ORDER BY COUNT(*) LIMIT 1 | 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 id of students who registered some courses but the least number of courses in these students? ### Input: CREATE TABL... |
Who was the opponent of Anand in the match with 20 moves that opened with E15 Queen's Indian Defence? | CREATE TABLE table_name_87 (
black VARCHAR,
opening VARCHAR,
white VARCHAR,
moves VARCHAR
) | SELECT black FROM table_name_87 WHERE white = "anand" AND moves = 20 AND opening = "e15 queen's indian defence" | 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 was the opponent of Anand in the match with 20 moves that opened with E15 Queen's Indian Defence? ### Input: CREATE TABL... |
june 10-11 when november 3 is 133? | CREATE TABLE table_27593 (
"June 10-11" text,
"March 27-29" text,
"January 15-16" text,
"November 3" text,
"August 21-22" text
) | SELECT "June 10-11" FROM table_27593 WHERE "November 3" = '133' | 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: june 10-11 when november 3 is 133? ### Input: CREATE TABLE table_27593 (
"June 10-11" text,
"March 27-29" text,
... |
What country is the player ho had a To par of +1 and a score of 69-70-72=211 from? | CREATE TABLE table_name_92 (
country VARCHAR,
to_par VARCHAR,
score VARCHAR
) | SELECT country FROM table_name_92 WHERE to_par = "+1" AND score = 69 - 70 - 72 = 211 | 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 country is the player ho had a To par of +1 and a score of 69-70-72=211 from? ### Input: CREATE TABLE table_name_92 (
... |
What was the result of the game before week 3 with an attendance of 53,658? | CREATE TABLE table_66685 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | SELECT "Result" FROM table_66685 WHERE "Week" < '3' AND "Attendance" = '53,658' | 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 result of the game before week 3 with an attendance of 53,658? ### Input: CREATE TABLE table_66685 (
"Week"... |
What is the away team of the game with tie number 31? | CREATE TABLE table_name_33 (
away_team VARCHAR,
tie_no VARCHAR
) | SELECT away_team FROM table_name_33 WHERE tie_no = "31" | 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 away team of the game with tie number 31? ### Input: CREATE TABLE table_name_33 (
away_team VARCHAR,
tie... |
What teachers have courses that fulfill a Other program requirement ? | CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
... | SELECT DISTINCT instructor.name FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN course_offering ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN program_course ON program_course.course_id = course_offering.course_id INN... | 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: What teachers have courses that fulfill a Other program requirement ? ### Input: CREATE TABLE jobs (
job_id int,
job... |
What number corresponds to the quantity of 24? | CREATE TABLE table_62452 (
"Class" text,
"Number(s)" text,
"Quantity" text,
"Year(s) of Manufacture" text,
"Type" text
) | SELECT "Number(s)" FROM table_62452 WHERE "Quantity" = '24' | 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 number corresponds to the quantity of 24? ### Input: CREATE TABLE table_62452 (
"Class" text,
"Number(s)" text,... |
What is the lowest total medals the team with more than 0 bronze, 6 silver, and a rank higher than 3 has? | CREATE TABLE table_35126 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT MIN("Total") FROM table_35126 WHERE "Bronze" > '0' AND "Silver" = '6' AND "Rank" < '3' | 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 lowest total medals the team with more than 0 bronze, 6 silver, and a rank higher than 3 has? ### Input: CREATE ... |
Who was the top goalscorer for season 2001-02? | CREATE TABLE table_2429942_2 (
top_goalscorer VARCHAR,
season VARCHAR
) | SELECT top_goalscorer FROM table_2429942_2 WHERE season = "2001-02" | 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 was the top goalscorer for season 2001-02? ### Input: CREATE TABLE table_2429942_2 (
top_goalscorer VARCHAR,
sea... |
Where are the london borough with the black caribbean population of 17974? | CREATE TABLE table_19149550_7 (
london_borough VARCHAR,
black_caribbean_population VARCHAR
) | SELECT london_borough FROM table_19149550_7 WHERE black_caribbean_population = 17974 | 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: Where are the london borough with the black caribbean population of 17974? ### Input: CREATE TABLE table_19149550_7 (
lo... |
Name the host for john rotz and howard cosell | CREATE TABLE table_22514845_5 (
s_host VARCHAR,
s_analyst VARCHAR
) | SELECT s_host FROM table_22514845_5 WHERE s_analyst = "John Rotz and Howard Cosell" | 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 host for john rotz and howard cosell ### Input: CREATE TABLE table_22514845_5 (
s_host VARCHAR,
s_analyst V... |
Give me the number of patients with diagnoses icd9 code 0389 who had a delta abnormal lab test status. | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "0389" AND lab.flag = "delta" | 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: Give me the number of patients with diagnoses icd9 code 0389 who had a delta abnormal lab test status. ### Input: CREATE TAB... |
For each position, what is the maximum number of hours for students who spent more than 1000 hours training? | CREATE TABLE tryout (
pid number,
cname text,
ppos text,
decision text
)
CREATE TABLE college (
cname text,
state text,
enr number
)
CREATE TABLE player (
pid number,
pname text,
ycard text,
hs number
) | SELECT MAX(T1.hs), ppos FROM player AS T1 JOIN tryout AS T2 ON T1.pid = T2.pid WHERE T1.hs > 1000 GROUP BY T2.ppos | 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: For each position, what is the maximum number of hours for students who spent more than 1000 hours training? ### Input: CREA... |
Return a scatter chart about the correlation between author_id and gender_mf . | CREATE TABLE Courses (
course_id INTEGER,
author_id INTEGER,
subject_id INTEGER,
course_name VARCHAR(120),
course_description VARCHAR(255)
)
CREATE TABLE Students (
student_id INTEGER,
date_of_registration DATETIME,
date_of_latest_logon DATETIME,
login_name VARCHAR(40),
password... | SELECT author_id, gender_mf FROM Course_Authors_and_Tutors ORDER BY personal_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: Return a scatter chart about the correlation between author_id and gender_mf . ### Input: CREATE TABLE Courses (
course_... |
Name the D 42 which has a D 44 of d 44 | CREATE TABLE table_51881 (
"D 41" text,
"D 42" text,
"D 43" text,
"D 44" text,
"D 45" text,
"D 46" text,
"R 54" text,
"R 53" text,
"R 52" text,
"R 51" text
) | SELECT "D 42" FROM table_51881 WHERE "D 44" = 'd 44' | 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 D 42 which has a D 44 of d 44 ### Input: CREATE TABLE table_51881 (
"D 41" text,
"D 42" text,
"D 43" te... |
Find the average of credits of courses that have more than one prerequisite for each title with a bar chart. | CREATE TABLE department (
dept_name varchar(20),
building varchar(15),
budget numeric(12,2)
)
CREATE TABLE instructor (
ID varchar(5),
name varchar(20),
dept_name varchar(20),
salary numeric(8,2)
)
CREATE TABLE prereq (
course_id varchar(8),
prereq_id varchar(8)
)
CREATE TABLE stu... | SELECT title, AVG(credits) FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY title | 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 average of credits of courses that have more than one prerequisite for each title with a bar chart. ### Input: CREA... |
What's Brazil's rank when it has notes of R? | CREATE TABLE table_name_4 (
rank VARCHAR,
notes VARCHAR,
country VARCHAR
) | SELECT COUNT(rank) FROM table_name_4 WHERE notes = "r" AND country = "brazil" | 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's Brazil's rank when it has notes of R? ### Input: CREATE TABLE table_name_4 (
rank VARCHAR,
notes VARCHAR,
... |
Against what opponent did the Wildcats have a record of 5-4? | CREATE TABLE table_3071 (
"Game" real,
"Date" text,
"Opponent" text,
"Result" text,
"Wildcats points" real,
"Opponents" real,
"Record" text
) | SELECT "Opponent" FROM table_3071 WHERE "Record" = '5-4' | 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: Against what opponent did the Wildcats have a record of 5-4? ### Input: CREATE TABLE table_3071 (
"Game" real,
"Date... |
Keystrokes per rep point (lower limit). Ranks users with over 1000 reputation points by how many characters they needed to type to achieve that reputation (counts title and body characters) | CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Comments (
Id number,... | SELECT u.Id AS "user_link", (SUM(COALESCE(DATALENGTH(p.Body), 0)) + SUM(COALESCE(DATALENGTH(p.Title), 0))) AS keystrokes, u.Reputation, (SUM(COALESCE(DATALENGTH(p.Body), 0)) + SUM(COALESCE(DATALENGTH(p.Title), 0))) / u.Reputation AS rate FROM Users AS u, Posts AS p WHERE p.OwnerUserId = u.Id AND u.Reputation >= 1000 GR... | 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: Keystrokes per rep point (lower limit). Ranks users with over 1000 reputation points by how many characters they needed to t... |
Find all users above given reputation with username user*. | CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId numb... | SELECT Id AS "user_link", Reputation, CreationDate, DisplayName, LastAccessDate FROM Users WHERE (Reputation > '##rep##') AND (DisplayName LIKE '%user%') ORDER BY Reputation DESC | 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 all users above given reputation with username user*. ### Input: CREATE TABLE PostNotices (
Id number,
PostId n... |
Name the total number of assists for 77 blocks | CREATE TABLE table_17309500_1 (
assists VARCHAR,
blocks VARCHAR
) | SELECT COUNT(assists) FROM table_17309500_1 WHERE blocks = "77" | 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 assists for 77 blocks ### Input: CREATE TABLE table_17309500_1 (
assists VARCHAR,
blocks VA... |
how many candidates were part of the republican party ? | CREATE TABLE table_203_615 (
id number,
"district" text,
"incumbent" text,
"party" text,
"first\nelected" number,
"result" text,
"candidates" text
) | SELECT COUNT(*) FROM table_203_615 WHERE "party" = 'republican' | 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 candidates were part of the republican party ? ### Input: CREATE TABLE table_203_615 (
id number,
"district... |
A bar chart shows the distribution of date_address_from and the amount of date_address_from bin date_address_from by weekday. | CREATE TABLE Ref_Address_Types (
address_type_code VARCHAR(15),
address_type_description VARCHAR(80)
)
CREATE TABLE Assessment_Notes (
notes_id INTEGER,
student_id INTEGER,
teacher_id INTEGER,
date_of_notes DATETIME,
text_of_notes VARCHAR(255),
other_details VARCHAR(255)
)
CREATE TABLE... | SELECT date_address_from, COUNT(date_address_from) FROM Student_Addresses ORDER BY monthly_rental 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: A bar chart shows the distribution of date_address_from and the amount of date_address_from bin date_address_from by weekday... |
What upper level classes is 550 not mandatory for ? | CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
good_feedback int,
tough_tests int,
heavy_papers int,
cares_for_students int,
heavy_assignments ... | SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite, program_course WHERE NOT COURSE_1.course_id IN (SELECT course_prerequisite.pre_course_id FROM course AS COURSE_0, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.cours... | 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: What upper level classes is 550 not mandatory for ? ### Input: CREATE TABLE course_tags_count (
course_id int,
clear... |
Give me the comparison about Team_ID over the ACC_Regular_Season . | CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | SELECT ACC_Regular_Season, Team_ID FROM basketball_match | 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: Give me the comparison about Team_ID over the ACC_Regular_Season . ### Input: CREATE TABLE basketball_match (
Team_ID in... |
Draft: Users with SkillName in 'AboutMe'. | CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewT... | SELECT DISTINCT u.Id AS "user_link", CONCAT('https://stackoverflow.com/users/', u.Id) AS "profile_link", u.DisplayName, u.Location, u.WebsiteUrl, u.AboutMe, u.Views, u.Reputation, u.UpVotes, u.DownVotes, u.EmailHash FROM Users AS u WHERE UPPER(u.AboutMe) LIKE UPPER('%##SkillName##%') AND UPPER(Location) LIKE UPPER('%##... | 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: Draft: Users with SkillName in 'AboutMe'. ### Input: CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE ... |
Top user with no answers. | CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
Revision... | WITH users_cte AS (SELECT u.Id AS UserId, SUM(CASE WHEN p.PostTypeId = 1 THEN p.Score ELSE 0 END) AS QScore, SUM(CASE WHEN p.PostTypeId = 1 THEN 1 ELSE 0 END) AS QCount, SUM(CASE WHEN p.PostTypeId = 2 THEN p.Score ELSE 0 END) AS AScore, SUM(CASE WHEN p.PostTypeId = 2 THEN 1 ELSE 0 END) AS ACount FROM Users AS u INNER J... | 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 with no answers. ### Input: CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
C... |
Who was the winner of the mechelen > mechelen route? | CREATE TABLE table_name_63 (
winner VARCHAR,
route VARCHAR
) | SELECT winner FROM table_name_63 WHERE route = "mechelen > mechelen" | 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 was the winner of the mechelen > mechelen route? ### Input: CREATE TABLE table_name_63 (
winner VARCHAR,
route V... |
which club in group stage 4 had member association iran | CREATE TABLE table_22994 (
"Pos" real,
"Member Association" text,
"Points (total 500)" real,
"Clubs" real,
"Group stage" real,
"Play-off" real,
"AFC Cup" real
) | SELECT "Clubs" FROM table_22994 WHERE "Group stage" = '4' AND "Member Association" = 'Iran' | 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 club in group stage 4 had member association iran ### Input: CREATE TABLE table_22994 (
"Pos" real,
"Member As... |
In what place(s) did the player(s) with a total less than 282 finish? | CREATE TABLE table_name_33 (
finish VARCHAR,
total INTEGER
) | SELECT finish FROM table_name_33 WHERE total < 282 | 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: In what place(s) did the player(s) with a total less than 282 finish? ### Input: CREATE TABLE table_name_33 (
finish VAR... |
Which digital channel is named Storm Tracker? | CREATE TABLE table_52793 (
"Analog Channel" text,
"Digital Channel" text,
"Call sign" text,
"Name" text,
"Network" text
) | SELECT "Digital Channel" FROM table_52793 WHERE "Name" = 'storm tracker' | 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 digital channel is named Storm Tracker? ### Input: CREATE TABLE table_52793 (
"Analog Channel" text,
"Digital ... |
retrieve the patient ids of the people who were diagnosed with drug abuse nec-in remiss until 2104. | CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABL... | SELECT admissions.subject_id FROM admissions WHERE admissions.hadm_id IN (SELECT diagnoses_icd.hadm_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'drug abuse nec-in remiss') AND STRFTIME('%y', diagnoses_icd.charttime) <= ... | 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: retrieve the patient ids of the people who were diagnosed with drug abuse nec-in remiss until 2104. ### Input: CREATE TABLE ... |
What is the lowest crowd when the away side scores 11.16 (82)? | CREATE TABLE table_4522 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT MIN("Crowd") FROM table_4522 WHERE "Away team score" = '11.16 (82)' | 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 lowest crowd when the away side scores 11.16 (82)? ### Input: CREATE TABLE table_4522 (
"Home team" text,
... |
What are the number of storms where fog is lower than 74, and sunshine is 2 668? | CREATE TABLE table_name_74 (
storms__days_year_ VARCHAR,
fog__days_year_ VARCHAR,
sunshine__hrs_year_ VARCHAR
) | SELECT COUNT(storms__days_year_) FROM table_name_74 WHERE fog__days_year_ < 74 AND sunshine__hrs_year_ = "2 668" | 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 are the number of storms where fog is lower than 74, and sunshine is 2 668? ### Input: CREATE TABLE table_name_74 (
... |
What's the position of the player with a Height of 2.06 and club of Triumph Lyubertsy? | CREATE TABLE table_name_99 (
position VARCHAR,
height VARCHAR,
current_club VARCHAR
) | SELECT position FROM table_name_99 WHERE height = 2.06 AND current_club = "triumph lyubertsy" | 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's the position of the player with a Height of 2.06 and club of Triumph Lyubertsy? ### Input: CREATE TABLE table_name_99... |
What is the nhl team for the position centre and nationality united states? | CREATE TABLE table_3654 (
"Pick #" real,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
) | SELECT "NHL team" FROM table_3654 WHERE "Position" = 'Centre' AND "Nationality" = 'United States' | 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 nhl team for the position centre and nationality united states? ### Input: CREATE TABLE table_3654 (
"Pick #... |
When 1.17 is the production code how many air dates are there? | CREATE TABLE table_20124413_1 (
original_airdate VARCHAR,
prod_code VARCHAR
) | SELECT COUNT(original_airdate) FROM table_20124413_1 WHERE prod_code = "1.17" | 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 1.17 is the production code how many air dates are there? ### Input: CREATE TABLE table_20124413_1 (
original_airda... |
Return a bar chart about the distribution of dept_name and the average of salary , and group by attribute dept_name. | CREATE TABLE instructor (
ID varchar(5),
name varchar(20),
dept_name varchar(20),
salary numeric(8,2)
)
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 prereq (
course_id va... | SELECT dept_name, AVG(salary) FROM instructor GROUP BY dept_name ORDER BY salary | 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 dept_name and the average of salary , and group by attribute dept_name. ### Inp... |
which airlines fly from BOSTON to WASHINGTON DC | CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE aircraft (
aircraft_code varchar,... | SELECT DISTINCT airline.airline_code FROM airline, 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 = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_na... | 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: which airlines fly from BOSTON to WASHINGTON DC ### Input: CREATE TABLE date_day (
month_number int,
day_number int,... |
What options do CS majors have for classes this Fall ? | CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college 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,
admit_term int,... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program, program_course, semester WHERE program_course.course_id = course.course_id AND program_course.course_id = course.course_id AND program.name LIKE '%CS%' AND program.program_id = program_course.program_id AND semester.sem... | 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: What options do CS majors have for classes this Fall ? ### Input: CREATE TABLE requirement (
requirement_id int,
req... |
How many people attended the game whose score was 1-1? | CREATE TABLE table_46372 (
"Game" real,
"Date" text,
"Opponent" text,
"Result" text,
"Score" text,
"Record" text,
"Streak" text,
"Attendance" real
) | SELECT "Attendance" FROM table_46372 WHERE "Record" = '1-1' | 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 attended the game whose score was 1-1? ### Input: CREATE TABLE table_46372 (
"Game" real,
"Date" tex... |
on what date was the last game in which cardiff city f.c. scored 2 goals ? | CREATE TABLE table_203_368 (
id number,
"date" text,
"opponent" text,
"venue" text,
"result" text
) | SELECT "date" FROM table_203_368 WHERE "result" = 2 ORDER BY id DESC LIMIT 1 | 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: on what date was the last game in which cardiff city f.c. scored 2 goals ? ### Input: CREATE TABLE table_203_368 (
id nu... |
What is the lowest crowd seen by the mcg Venue? | CREATE TABLE table_name_84 (
crowd INTEGER,
venue VARCHAR
) | SELECT MIN(crowd) FROM table_name_84 WHERE venue = "mcg" | 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 crowd seen by the mcg Venue? ### Input: CREATE TABLE table_name_84 (
crowd INTEGER,
venue VARCHAR... |
How many games had a score value of 813.5 in post-season play? | CREATE TABLE table_1059743_1 (
play_off VARCHAR,
points VARCHAR
) | SELECT COUNT(play_off) FROM table_1059743_1 WHERE points = "813.5" | 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: How many games had a score value of 813.5 in post-season play? ### Input: CREATE TABLE table_1059743_1 (
play_off VARCHA... |
Which player is associated with Temple? | CREATE TABLE table_32209 (
"Player" text,
"Nationality" text,
"Position" text,
"From" text,
"School/Country" text
) | SELECT "Player" FROM table_32209 WHERE "School/Country" = 'temple' | 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 player is associated with Temple? ### Input: CREATE TABLE table_32209 (
"Player" text,
"Nationality" text,
... |
What is the highest attendance when the opponent is the Los Angeles Rams and the week is less than 11? | CREATE TABLE table_name_82 (
attendance INTEGER,
opponent VARCHAR,
week VARCHAR
) | SELECT MAX(attendance) FROM table_name_82 WHERE opponent = "los angeles rams" AND week < 11 | 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 attendance when the opponent is the Los Angeles Rams and the week is less than 11? ### Input: CREATE TAB... |
If the primary (South) winners is Inter The Bloomfield, what is the season total number? | CREATE TABLE table_23014923_1 (
season VARCHAR,
primary__south__winners VARCHAR
) | SELECT COUNT(season) FROM table_23014923_1 WHERE primary__south__winners = "Inter The Bloomfield" | 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: If the primary (South) winners is Inter The Bloomfield, what is the season total number? ### Input: CREATE TABLE table_23014... |
What draw for 'ljubav jedne ene' with under 153 points? | CREATE TABLE table_54232 (
"Draw" real,
"Artist" text,
"Song" text,
"Points" real,
"Place" real
) | SELECT SUM("Draw") FROM table_54232 WHERE "Song" = 'ljubav jedne žene' AND "Points" < '153' | 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 draw for 'ljubav jedne ene' with under 153 points? ### Input: CREATE TABLE table_54232 (
"Draw" real,
"Artist" ... |
What city and state is the Lancers mascot located? | CREATE TABLE table_11044765_1 (
location VARCHAR,
mascot VARCHAR
) | SELECT location FROM table_11044765_1 WHERE mascot = "Lancers" | 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 city and state is the Lancers mascot located? ### Input: CREATE TABLE table_11044765_1 (
location VARCHAR,
masc... |
What is listed as the Place of birth for the Elector of Soffredo? | CREATE TABLE table_14245 (
"Elector" text,
"Place of birth" text,
"Cardinalatial title" text,
"Elevated" text,
"Elevator" text
) | SELECT "Place of birth" FROM table_14245 WHERE "Elector" = 'soffredo' | 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 listed as the Place of birth for the Elector of Soffredo? ### Input: CREATE TABLE table_14245 (
"Elector" text,
... |
Show the order ids and the number of invoices for each order. | CREATE TABLE Invoices (
invoice_number INTEGER,
order_id INTEGER,
invoice_date DATETIME
)
CREATE TABLE Invoice_Line_Items (
order_item_id INTEGER,
invoice_number INTEGER,
product_id INTEGER,
product_title VARCHAR(80),
product_quantity VARCHAR(50),
product_price DECIMAL(19,4),
de... | SELECT order_id, COUNT(*) FROM Invoices GROUP BY order_id | 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 order ids and the number of invoices for each order. ### Input: CREATE TABLE Invoices (
invoice_number INTEGER,... |
A bar chart about what is minimum hours of the students playing in different position?, list x-axis in asc order. | CREATE TABLE Player (
pID numeric(5,0),
pName varchar(20),
yCard varchar(3),
HS numeric(5,0)
)
CREATE TABLE Tryout (
pID numeric(5,0),
cName varchar(20),
pPos varchar(8),
decision varchar(3)
)
CREATE TABLE College (
cName varchar(20),
state varchar(2),
enr numeric(5,0)
) | SELECT pPos, MIN(T2.HS) FROM Tryout AS T1 JOIN Player AS T2 ON T1.pID = T2.pID GROUP BY pPos ORDER BY pPos | 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: A bar chart about what is minimum hours of the students playing in different position?, list x-axis in asc order. ### Input:... |
What is Partner Tomas Behrend's Score in the final? | CREATE TABLE table_name_48 (
score_in_the_final VARCHAR,
partner VARCHAR
) | SELECT score_in_the_final FROM table_name_48 WHERE partner = "tomas behrend" | 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 Partner Tomas Behrend's Score in the final? ### Input: CREATE TABLE table_name_48 (
score_in_the_final VARCHAR,
... |
what is minimum age of patients whose gender is m and primary disease is chest pain? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | SELECT MIN(demographic.age) FROM demographic WHERE demographic.gender = "M" AND demographic.diagnosis = "CHEST PAIN" | 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: what is minimum age of patients whose gender is m and primary disease is chest pain? ### Input: CREATE TABLE lab (
subje... |
Tell me the highest, lowest, and average cost of procedures. | CREATE TABLE appointment (
appointmentid number,
patient number,
prepnurse number,
physician number,
start time,
end time,
examinationroom text
)
CREATE TABLE affiliated_with (
physician number,
department number,
primaryaffiliation boolean
)
CREATE TABLE medication (
code ... | SELECT MAX(cost), MIN(cost), AVG(cost) FROM procedures | 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: Tell me the highest, lowest, and average cost of procedures. ### Input: CREATE TABLE appointment (
appointmentid number,... |
What is the maximum power of engine code 2e? | CREATE TABLE table_78333 (
"engine name" text,
"engine code(s)" text,
"engine configuration" text,
"displacement" text,
"max. power at rpm" text,
"max. torque at rpm" text,
"production period" text
) | SELECT "max. power at rpm" FROM table_78333 WHERE "engine code(s)" = '2e' | 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 maximum power of engine code 2e? ### Input: CREATE TABLE table_78333 (
"engine name" text,
"engine code(... |
How many patients have had a pleural fluid lab test and a diagnosis for bone marrow replacement by transplantation? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Bone marrow replaced by transplant" AND lab.fluid = "Pleural" | 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 have had a pleural fluid lab test and a diagnosis for bone marrow replacement by transplantation? ### Inpu... |
What is the average of all the years when the notes are electronics brand? | CREATE TABLE table_name_36 (
year INTEGER,
notes VARCHAR
) | SELECT AVG(year) FROM table_name_36 WHERE notes = "electronics brand" | 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 of all the years when the notes are electronics brand? ### Input: CREATE TABLE table_name_36 (
year ... |
count the number of patients admitted before 2131 who had open biospy of soft tissue procedure. | 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 INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2131" AND procedures.short_title = "Open biopsy soft tissue" | 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 admitted before 2131 who had open biospy of soft tissue procedure. ### Input: CREATE TABLE lab ... |
what's the district with first elected being 1938 | CREATE TABLE table_1342292_2 (
district VARCHAR,
first_elected VARCHAR
) | SELECT district FROM table_1342292_2 WHERE first_elected = 1938 | 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's the district with first elected being 1938 ### Input: CREATE TABLE table_1342292_2 (
district VARCHAR,
first_... |
how much does a drug cost, aspirin chew tab 81 mg? | CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'medication' AND cost.eventid IN (SELECT medication.medicationid FROM medication WHERE medication.drugname = 'aspirin chew tab 81 mg') | 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: how much does a drug cost, aspirin chew tab 81 mg? ### Input: CREATE TABLE patient (
uniquepid text,
patienthealthsy... |
Usuarios con votos de cierre. | CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | SELECT DisplayName FROM Users WHERE Reputation >= 3000 | 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: Usuarios con votos de cierre. ### Input: CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
... |
Who was the opposing team for the February 1 game? | CREATE TABLE table_6250 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT "Team" FROM table_6250 WHERE "Date" = 'february 1' | 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 was the opposing team for the February 1 game? ### Input: CREATE TABLE table_6250 (
"Game" real,
"Date" text,
... |
In what year 2000 tournment did Angeles Montolio have a career win-loss record of 2-4? | CREATE TABLE table_79839 (
"Tournament" text,
"2000" text,
"2001" text,
"2002" text,
"Career SR" text,
"Career Win-Loss" text
) | SELECT "Tournament" FROM table_79839 WHERE "2000" = '2-4' | 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: In what year 2000 tournment did Angeles Montolio have a career win-loss record of 2-4? ### Input: CREATE TABLE table_79839 (... |
Which title is 3:38 long? | CREATE TABLE table_name_52 (
title VARCHAR,
length VARCHAR
) | SELECT title FROM table_name_52 WHERE length = "3:38" | 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 title is 3:38 long? ### Input: CREATE TABLE table_name_52 (
title VARCHAR,
length VARCHAR
) ### Response: SELE... |
If 4 went to iran and the amount that survived was less than 12.0 how many were there in 1990? | CREATE TABLE table_72977 (
"Aircraft" text,
"1990" real,
"destroyed" real,
"damaged" real,
"to Iran" real,
"survived" real
) | SELECT COUNT("1990") FROM table_72977 WHERE "to Iran" = '4' AND "survived" < '12.0' | 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: If 4 went to iran and the amount that survived was less than 12.0 how many were there in 1990? ### Input: CREATE TABLE table... |
Return the number of booking end dates for the apartments that have type code 'Duplex' for each year in a bar chart, and sort in descending by the the number of booking start date please. | CREATE TABLE Apartments (
apt_id INTEGER,
building_id INTEGER,
apt_type_code CHAR(15),
apt_number CHAR(10),
bathroom_count INTEGER,
bedroom_count INTEGER,
room_count CHAR(5)
)
CREATE TABLE Apartment_Facilities (
apt_id INTEGER,
facility_code CHAR(15)
)
CREATE TABLE Apartment_Buildi... | SELECT booking_end_date, COUNT(booking_end_date) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = "Duplex" ORDER BY COUNT(booking_start_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: Return the number of booking end dates for the apartments that have type code 'Duplex' for each year in a bar chart, and sor... |
What was the score of the 1998 FIFA World Cup qualification competition? | CREATE TABLE table_60770 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) | SELECT "Score" FROM table_60770 WHERE "Competition" = '1998 fifa world cup qualification' | 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 score of the 1998 FIFA World Cup qualification competition? ### Input: CREATE TABLE table_60770 (
"Date" te... |
what's the election date where electorate is christchurch country | CREATE TABLE table_381 (
"Member" text,
"Electorate" text,
"Province" text,
"MPs term" text,
"Election date" text
) | SELECT "Election date" FROM table_381 WHERE "Electorate" = 'Christchurch Country' | 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's the election date where electorate is christchurch country ### Input: CREATE TABLE table_381 (
"Member" text,
... |
How many people boarded and de-boarded the Amtrak in Linthicum? | CREATE TABLE table_68712 (
"Rank" real,
"Station" text,
"City" text,
"State" text,
"Boardings and deboardings" real
) | SELECT COUNT("Boardings and deboardings") FROM table_68712 WHERE "City" = 'linthicum' | 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 boarded and de-boarded the Amtrak in Linthicum? ### Input: CREATE TABLE table_68712 (
"Rank" real,
"... |
What is the attendance of the game that was played on September 27, 1964? | CREATE TABLE table_name_85 (
attendance INTEGER,
date VARCHAR
) | SELECT MAX(attendance) FROM table_name_85 WHERE date = "september 27, 1964" | 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 attendance of the game that was played on September 27, 1964? ### Input: CREATE TABLE table_name_85 (
attend... |
when did patient 006-133605 have a maximum systemicdiastolic for the last time on this month/27? | CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-133605')) AND NOT vitalperiodic.systemicdiastol... | 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 did patient 006-133605 have a maximum systemicdiastolic for the last time on this month/27? ### Input: CREATE TABLE pat... |
what are the times where the play is 5 | CREATE TABLE table_27733909_1 (
date VARCHAR,
game VARCHAR
) | SELECT date FROM table_27733909_1 WHERE game = 5 | 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 are the times where the play is 5 ### Input: CREATE TABLE table_27733909_1 (
date VARCHAR,
game VARCHAR
) ### R... |
What is Place, when Year is greater than 2006, and when Champion is 'Asvel'? | CREATE TABLE table_name_37 (
place VARCHAR,
year VARCHAR,
champion VARCHAR
) | SELECT place FROM table_name_37 WHERE year > 2006 AND champion = "asvel" | 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 Place, when Year is greater than 2006, and when Champion is 'Asvel'? ### Input: CREATE TABLE table_name_37 (
pla... |
how many third duma and fourth duma for nationalists | CREATE TABLE table_204_599 (
id number,
"party" text,
"first duma" text,
"second duma" text,
"third duma" text,
"fourth duma" text
) | SELECT "third duma" + "fourth duma" FROM table_204_599 WHERE "party" = 'nationalists' | 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 third duma and fourth duma for nationalists ### Input: CREATE TABLE table_204_599 (
id number,
"party" text... |
Who was the incumbent that retired to run for the senate democratic hold? | CREATE TABLE table_name_82 (
incumbent VARCHAR,
result VARCHAR
) | SELECT incumbent FROM table_name_82 WHERE result = "retired to run for the senate democratic hold" | 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 was the incumbent that retired to run for the senate democratic hold? ### Input: CREATE TABLE table_name_82 (
incumb... |
Who had the high rebounds, and how many, when they played Denver? | CREATE TABLE table_8858 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT "High rebounds" FROM table_8858 WHERE "Team" = 'denver' | 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 had the high rebounds, and how many, when they played Denver? ### Input: CREATE TABLE table_8858 (
"Game" real,
... |
What is the average base price of rooms, for each bed type. Plot them as bar chart. | CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adults INTEGER,
Kids INTEGER
)
CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
baseP... | SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType | 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 is the average base price of rooms, for each bed type. Plot them as bar chart. ### Input: CREATE TABLE Reservations (
... |
What district has Riley Joseph Wilson as the incumbent? | CREATE TABLE table_18656 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | SELECT "District" FROM table_18656 WHERE "Incumbent" = 'Riley Joseph Wilson' | 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 district has Riley Joseph Wilson as the incumbent? ### Input: CREATE TABLE table_18656 (
"District" text,
"Incu... |
What college did the Toronto Argonauts draft pick come from? | CREATE TABLE table_3225 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
) | SELECT "College" FROM table_3225 WHERE "CFL Team" = 'Toronto Argonauts' | 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 college did the Toronto Argonauts draft pick come from? ### Input: CREATE TABLE table_3225 (
"Pick #" real,
"CF... |
What is the D43 associated with a D41 of r 21? | CREATE TABLE table_71559 (
"D 48" text,
"D 47" text,
"D 46" text,
"D 45" text,
"D 44" text,
"D 43" text,
"D 42" text,
"D 41" text
) | SELECT "D 43" FROM table_71559 WHERE "D 41" = 'r 21' | 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 D43 associated with a D41 of r 21? ### Input: CREATE TABLE table_71559 (
"D 48" text,
"D 47" text,
"... |
What was the result of the Top 3 episode? | CREATE TABLE table_72296 (
"Episode" text,
"Song choice" text,
"Original artist" text,
"Order #" text,
"Result" text
) | SELECT "Result" FROM table_72296 WHERE "Episode" = 'Top 3' | 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 result of the Top 3 episode? ### Input: CREATE TABLE table_72296 (
"Episode" text,
"Song choice" text,
... |
Pie. how many different professors are there for the different schools? | CREATE TABLE ENROLL (
CLASS_CODE varchar(5),
STU_NUM int,
ENROLL_GRADE varchar(50)
)
CREATE TABLE STUDENT (
STU_NUM int,
STU_LNAME varchar(15),
STU_FNAME varchar(15),
STU_INIT varchar(1),
STU_DOB datetime,
STU_HRS int,
STU_CLASS varchar(2),
STU_GPA float(8),
STU_TRANSFER... | SELECT SCHOOL_CODE, COUNT(*) FROM DEPARTMENT AS T1 JOIN PROFESSOR AS T2 ON T1.DEPT_CODE = T2.DEPT_CODE GROUP BY T1.SCHOOL_CODE | 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: Pie. how many different professors are there for the different schools? ### Input: CREATE TABLE ENROLL (
CLASS_CODE varc... |
Which one has a rank bigger than 2, lane of 1, and is from Hong Kong? | CREATE TABLE table_name_55 (
name VARCHAR,
nationality VARCHAR,
rank VARCHAR,
lane VARCHAR
) | SELECT name FROM table_name_55 WHERE rank > 2 AND lane = 1 AND nationality = "hong kong" | 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 one has a rank bigger than 2, lane of 1, and is from Hong Kong? ### Input: CREATE TABLE table_name_55 (
name VARCH... |
what is the number of patients whose death status is 0 and procedure long title is endovascular (total) embolization or occlusion of head and neck vessels? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.expire_flag = "0" AND procedures.long_title = "Endovascular (total) embolization or occlusion of head and neck vessels" | 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: what is the number of patients whose death status is 0 and procedure long title is endovascular (total) embolization or occl... |
What is the High points with a Date that is january 20? | CREATE TABLE table_39964 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT "High points" FROM table_39964 WHERE "Date" = 'january 20' | 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 High points with a Date that is january 20? ### Input: CREATE TABLE table_39964 (
"Game" real,
"Date" te... |
What is the largest total for a nation with 1 bronze and more than 1 silver? | CREATE TABLE table_name_92 (
total INTEGER,
bronze VARCHAR,
silver VARCHAR
) | SELECT MAX(total) FROM table_name_92 WHERE bronze = 1 AND silver > 1 | 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 largest total for a nation with 1 bronze and more than 1 silver? ### Input: CREATE TABLE table_name_92 (
tot... |
what was the docusate sodium dosage that patient 18678 had been prescribed? | CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location... | SELECT SUM(prescriptions.dose_val_rx) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 18678) AND prescriptions.drug = 'docusate sodium' | 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 was the docusate sodium dosage that patient 18678 had been prescribed? ### Input: CREATE TABLE d_icd_procedures (
r... |
How many laps had a grid of greater than 17 and retired due to collision? | CREATE TABLE table_56101 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | SELECT SUM("Laps") FROM table_56101 WHERE "Grid" > '17' AND "Time/Retired" = 'collision' | 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 laps had a grid of greater than 17 and retired due to collision? ### Input: CREATE TABLE table_56101 (
"Driver"... |
Return a bar chart on how many faculty members does each building have? List the result with the name of the building. | CREATE TABLE Faculty_Participates_in (
FacID INTEGER,
actid INTEGER
)
CREATE TABLE Faculty (
FacID INTEGER,
Lname VARCHAR(15),
Fname VARCHAR(15),
Rank VARCHAR(15),
Sex VARCHAR(1),
Phone INTEGER,
Room VARCHAR(5),
Building VARCHAR(13)
)
CREATE TABLE Activity (
actid INTEGER,
... | SELECT Building, COUNT(*) FROM Faculty GROUP BY Building | 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 on how many faculty members does each building have? List the result with the name of the building. ### I... |
What is the total number of discs where the run time was 4 hours 40 minutes? | CREATE TABLE table_1180228_1 (
num_of_discs VARCHAR,
duration VARCHAR
) | SELECT COUNT(num_of_discs) FROM table_1180228_1 WHERE duration = "4 hours 40 minutes" | 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 discs where the run time was 4 hours 40 minutes? ### Input: CREATE TABLE table_1180228_1 (
n... |
give me the number of patients whose primary disease is hypoxia? | 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 WHERE demographic.diagnosis = "HYPOXIA" | 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: give me the number of patients whose primary disease is hypoxia? ### Input: CREATE TABLE procedures (
subject_id text,
... |
What is the average number of wins for the person who coached from 1951 to 1956 and had less than 174 losses and less than 6 ties? | CREATE TABLE table_name_70 (
wins INTEGER,
ties VARCHAR,
losses VARCHAR,
years VARCHAR
) | SELECT AVG(wins) FROM table_name_70 WHERE losses < 174 AND years = "1951 to 1956" AND ties < 6 | 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 number of wins for the person who coached from 1951 to 1956 and had less than 174 losses and less than 6... |
what is the three most common procedures for patients who are 20s since 5 years ago? | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
... | SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 20 AND 29) AND DATETIME(treatment.treatmenttime) >= DATETIME(CURRENT_TIME(), '-5 yea... | 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 three most common procedures for patients who are 20s since 5 years ago? ### Input: CREATE TABLE lab (
labid... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.