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 is the total number of patients who had allo hem stem ct w/o pur and died in or before the year 2138? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dod_year <= "2138.0" AND procedures.short_title = "Allo hem stem ct w/o pur" | 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 total number of patients who had allo hem stem ct w/o pur and died in or before the year 2138? ### Input: CREATE... |
What is the lowest of Episode Number that has a Air Date on 20 july 2007? | CREATE TABLE table_7631 (
"Episode Number" real,
"Air Date" text,
"Guest Host" text,
"Musical Guest (Song performed)" text,
"\"Coat of Cash\" Wearing Celebrity" text
) | SELECT MIN("Episode Number") FROM table_7631 WHERE "Air Date" = '20 july 2007' | 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 of Episode Number that has a Air Date on 20 july 2007? ### Input: CREATE TABLE table_7631 (
"Episode ... |
what are the event details of the services that have the type code 'Marriage'? | CREATE TABLE Services (
Service_ID VARCHAR,
Service_Type_Code VARCHAR
)
CREATE TABLE EVENTS (
event_details VARCHAR,
Service_ID VARCHAR
) | SELECT T1.event_details FROM EVENTS AS T1 JOIN Services AS T2 ON T1.Service_ID = T2.Service_ID WHERE T2.Service_Type_Code = 'Marriage' | 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 event details of the services that have the type code 'Marriage'? ### Input: CREATE TABLE Services (
Servic... |
What is the 1st leg of bp. honv d team #2? | CREATE TABLE table_name_62 (
team__number2 VARCHAR
) | SELECT 1 AS st_leg FROM table_name_62 WHERE team__number2 = "bp. honvéd" | 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 1st leg of bp. honv d team #2? ### Input: CREATE TABLE table_name_62 (
team__number2 VARCHAR
) ### Response:... |
Name the total number of scoring average for money list rank of 174 | CREATE TABLE table_17943 (
"Year" real,
"Starts" real,
"Wins (Majors)" text,
"2nd" real,
"3rd" real,
"Earnings ($)" real,
"Money list rank" text,
"Scoring average" text
) | SELECT COUNT("Scoring average") FROM table_17943 WHERE "Money list rank" = '174' | 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 total number of scoring average for money list rank of 174 ### Input: CREATE TABLE table_17943 (
"Year" real,
... |
Which gc37-01 v10 engine has the fewest points? | CREATE TABLE table_name_23 (
points INTEGER,
engine VARCHAR
) | SELECT MIN(points) FROM table_name_23 WHERE engine = "gc37-01 v10" | 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 gc37-01 v10 engine has the fewest points? ### Input: CREATE TABLE table_name_23 (
points INTEGER,
engine VARCH... |
What are the ids and details of events that have more than one participants Visualize by bar chart, and I want to show in ascending by the Y. | CREATE TABLE Participants (
Participant_ID INTEGER,
Participant_Type_Code CHAR(15),
Participant_Details VARCHAR(255)
)
CREATE TABLE Services (
Service_ID INTEGER,
Service_Type_Code CHAR(15)
)
CREATE TABLE Participants_in_Events (
Event_ID INTEGER,
Participant_ID INTEGER
)
CREATE TABLE Eve... | SELECT T1.Event_Details, T1.Event_ID FROM Events AS T1 JOIN Participants_in_Events AS T2 ON T1.Event_ID = T2.Event_ID GROUP BY T1.Event_Details ORDER BY T1.Event_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: What are the ids and details of events that have more than one participants Visualize by bar chart, and I want to show in as... |
When the total score is 740, what is tromso? | CREATE TABLE table_19439864_2 (
tromsø INTEGER,
total VARCHAR
) | SELECT MIN(tromsø) FROM table_19439864_2 WHERE total = 740 | 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 total score is 740, what is tromso? ### Input: CREATE TABLE table_19439864_2 (
tromsø INTEGER,
total VARCHA... |
Who was the successor for vacant louisiana 5th | CREATE TABLE table_2417340_4 (
successor VARCHAR,
vacator VARCHAR,
district VARCHAR
) | SELECT successor FROM table_2417340_4 WHERE vacator = "Vacant" AND district = "Louisiana 5th" | 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 successor for vacant louisiana 5th ### Input: CREATE TABLE table_2417340_4 (
successor VARCHAR,
vacator ... |
What team did gonzalo arconada manage? | CREATE TABLE table_45612 (
"Team" text,
"Outgoing manager" text,
"Manner of departure" text,
"Date of vacancy" text,
"Replaced by" text,
"Date of appointment" text,
"Position in table" text
) | SELECT "Team" FROM table_45612 WHERE "Outgoing manager" = 'gonzalo arconada' | 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 team did gonzalo arconada manage? ### Input: CREATE TABLE table_45612 (
"Team" text,
"Outgoing manager" text,
... |
For each film, show the price and group them by cinema name in a stacked bar chart, and list Y from high to low order. | CREATE TABLE film (
Film_ID int,
Rank_in_series int,
Number_in_season int,
Title text,
Directed_by text,
Original_air_date text,
Production_code text
)
CREATE TABLE schedule (
Cinema_ID int,
Film_ID int,
Date text,
Show_times_per_day int,
Price float
)
CREATE TABLE cine... | SELECT Name, Price FROM schedule AS T1 JOIN film AS T2 ON T1.Film_ID = T2.Film_ID JOIN cinema AS T3 ON T1.Cinema_ID = T3.Cinema_ID GROUP BY Title, Name ORDER BY Price 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 each film, show the price and group them by cinema name in a stacked bar chart, and list Y from high to low order. ### I... |
what is the least expensive one way ticket from ATLANTA to DENVER leaving on 10 12 | CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_fli... | SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, fare, fare_basis, flight, flight_fare WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND C... | 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 is the least expensive one way ticket from ATLANTA to DENVER leaving on 10 12 ### Input: CREATE TABLE restriction (
... |
On what date did the first match occur for the competition that ended with a final position of winners and the final round in the finals? | CREATE TABLE table_name_35 (
first_match VARCHAR,
final_position VARCHAR,
final_round VARCHAR
) | SELECT first_match FROM table_name_35 WHERE final_position = "winners" AND final_round = "finals" | 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: On what date did the first match occur for the competition that ended with a final position of winners and the final round i... |
What was home team South Melbourne's opponents score? | CREATE TABLE table_name_67 (
away_team VARCHAR,
home_team VARCHAR
) | SELECT away_team AS score FROM table_name_67 WHERE home_team = "south melbourne" | 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 was home team South Melbourne's opponents score? ### Input: CREATE TABLE table_name_67 (
away_team VARCHAR,
hom... |
Find the papers which have 'Olin Shivers' as an author. | CREATE TABLE authors (
authid number,
lname text,
fname text
)
CREATE TABLE inst (
instid number,
name text,
country text
)
CREATE TABLE papers (
paperid number,
title text
)
CREATE TABLE authorship (
authid number,
instid number,
paperid number,
authorder number
) | SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = "Olin" AND t1.lname = "Shivers" | 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: Find the papers which have 'Olin Shivers' as an author. ### Input: CREATE TABLE authors (
authid number,
lname text,... |
Show director with the largest number of show times in total. | CREATE TABLE schedule (
film_id VARCHAR,
show_times_per_day INTEGER
)
CREATE TABLE film (
directed_by VARCHAR,
film_id VARCHAR
) | SELECT T2.directed_by FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.directed_by ORDER BY SUM(T1.show_times_per_day) DESC 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: Show director with the largest number of show times in total. ### Input: CREATE TABLE schedule (
film_id VARCHAR,
sh... |
Which constituency number has a name of Timarni? | CREATE TABLE table_13592 (
"Constituency number" text,
"Name" text,
"Reserved for ( SC / ST /None)" text,
"District" text,
"Number of electorates (2009)" real
) | SELECT "Constituency number" FROM table_13592 WHERE "Name" = 'timarni' | 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 constituency number has a name of Timarni? ### Input: CREATE TABLE table_13592 (
"Constituency number" text,
"... |
Which league's nationality was Italy when there were 62 points? | CREATE TABLE table_name_20 (
league VARCHAR,
nationality VARCHAR,
points VARCHAR
) | SELECT league FROM table_name_20 WHERE nationality = "italy" AND points = "62" | 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 league's nationality was Italy when there were 62 points? ### Input: CREATE TABLE table_name_20 (
league VARCHAR,
... |
What is the total number for grid with a Suzuki GSX-R1000 K7 for +13.283? | CREATE TABLE table_name_35 (
grid VARCHAR,
bike VARCHAR,
time VARCHAR
) | SELECT COUNT(grid) FROM table_name_35 WHERE bike = "suzuki gsx-r1000 k7" AND time = "+13.283" | 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 for grid with a Suzuki GSX-R1000 K7 for +13.283? ### Input: CREATE TABLE table_name_35 (
grid V... |
What are the date and mean humidity for the top 3 days with the largest max gust speeds? Return me a bar chart. | CREATE TABLE trip (
id INTEGER,
duration INTEGER,
start_date TEXT,
start_station_name TEXT,
start_station_id INTEGER,
end_date TEXT,
end_station_name TEXT,
end_station_id INTEGER,
bike_id INTEGER,
subscription_type TEXT,
zip_code INTEGER
)
CREATE TABLE weather (
date TEX... | SELECT date, mean_humidity FROM weather ORDER BY max_gust_speed_mph DESC LIMIT 3 | 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 date and mean humidity for the top 3 days with the largest max gust speeds? Return me a bar chart. ### Input: C... |
Name the years for dannevirke south school | CREATE TABLE table_66980 (
"Name" text,
"Years" text,
"Gender" text,
"Area" text,
"Authority" text,
"Decile" real,
"Roll" real
) | SELECT "Years" FROM table_66980 WHERE "Name" = 'dannevirke south school' | 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 years for dannevirke south school ### Input: CREATE TABLE table_66980 (
"Name" text,
"Years" text,
"Gen... |
What is the highest draw that has points greater than 4, with a match greater than 5? | CREATE TABLE table_name_92 (
draw INTEGER,
points VARCHAR,
match VARCHAR
) | SELECT MAX(draw) FROM table_name_92 WHERE points > 4 AND match > 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 is the highest draw that has points greater than 4, with a match greater than 5? ### Input: CREATE TABLE table_name_92 ... |
How many nicknames does the school in Newark, DE have | CREATE TABLE table_16432543_1 (
nickname VARCHAR,
location VARCHAR
) | SELECT COUNT(nickname) FROM table_16432543_1 WHERE location = "Newark, DE" | 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 nicknames does the school in Newark, DE have ### Input: CREATE TABLE table_16432543_1 (
nickname VARCHAR,
l... |
Which country watch Tom Watson at t9 score 72-72=144? | CREATE TABLE table_71840 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | SELECT "Country" FROM table_71840 WHERE "Place" = 't9' AND "Score" = '72-72=144' AND "Player" = 'tom watson' | 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 country watch Tom Watson at t9 score 72-72=144? ### Input: CREATE TABLE table_71840 (
"Place" text,
"Player" t... |
Jason Goemaat upvotes by tag. | CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
... | SELECT TagName, COUNT(*) AS UpVotes FROM Tags INNER JOIN PostTags ON PostTags.TagId = Tags.Id INNER JOIN Posts ON Posts.ParentId = PostTags.PostId INNER JOIN Votes ON Votes.PostId = Posts.Id AND VoteTypeId = 2 WHERE Posts.OwnerUserId = @UserId GROUP BY TagName ORDER BY UpVotes 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: Jason Goemaat upvotes by tag. ### Input: CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description... |
Which useful courses are available before taking EMBA 628 ? | 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,
predicted_graduation_semester int,
degree varchar,
minor varchar,
internship varch... | SELECT DISTINCT advisory_requirement FROM course WHERE department = 'EMBA' AND number = 628 | 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: Which useful courses are available before taking EMBA 628 ? ### Input: CREATE TABLE student (
student_id int,
lastna... |
How many students attend course English? | CREATE TABLE student_course_registrations (
student_id number,
course_id number,
registration_date time
)
CREATE TABLE addresses (
address_id number,
line_1 text,
line_2 text,
city text,
zip_postcode text,
state_province_county text,
country text
)
CREATE TABLE students (
s... | SELECT COUNT(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "English" | 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 attend course English? ### Input: CREATE TABLE student_course_registrations (
student_id number,
c... |
what is the number of patients whose admission year is less than 2152 and diagnoses short title is nb obs genetc/metabl cnd? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2152" AND diagnoses.short_title = "NB obs genetc/metabl cnd" | 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 admission year is less than 2152 and diagnoses short title is nb obs genetc/metabl cnd?... |
Which result is older than 2007? | CREATE TABLE table_69301 (
"Year" real,
"Artist" text,
"Album / Song" text,
"Award" text,
"Result / Category" text
) | SELECT "Result / Category" FROM table_69301 WHERE "Year" < '2007' | 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 result is older than 2007? ### Input: CREATE TABLE table_69301 (
"Year" real,
"Artist" text,
"Album / Song... |
What tie number featured Chelsea as the home team? | CREATE TABLE table_21886 (
"Tie no" real,
"Home team" text,
"Score 1" text,
"Away team" text,
"Attendance" real
) | SELECT MIN("Tie no") FROM table_21886 WHERE "Home team" = 'Chelsea' | 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 tie number featured Chelsea as the home team? ### Input: CREATE TABLE table_21886 (
"Tie no" real,
"Home team" ... |
Show the transaction types and the total amount of transactions. | CREATE TABLE Financial_transactions (
transaction_type VARCHAR,
transaction_amount INTEGER
) | SELECT transaction_type, SUM(transaction_amount) FROM Financial_transactions GROUP BY transaction_type | 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 the transaction types and the total amount of transactions. ### Input: CREATE TABLE Financial_transactions (
transa... |
What are the site(s) for tv station 8tv? | CREATE TABLE table_1393 (
"Television Station" text,
"Frequency" text,
"Site" text,
"Transmitted" text,
"Network" text,
"Status" text,
"Country of Region" text
) | SELECT "Site" FROM table_1393 WHERE "Television Station" = '8TV' | 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 are the site(s) for tv station 8tv? ### Input: CREATE TABLE table_1393 (
"Television Station" text,
"Frequency"... |
Which Game is the lowest one that has Points smaller than 92? | CREATE TABLE table_37997 (
"Game" real,
"April" real,
"Opponent" text,
"Score" text,
"Record" text,
"Points" real
) | SELECT MIN("Game") FROM table_37997 WHERE "Points" < '92' | 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 Game is the lowest one that has Points smaller than 92? ### Input: CREATE TABLE table_37997 (
"Game" real,
"Ap... |
The pink cytoplasm will have a nucleus of what color? | CREATE TABLE table_13570_1 (
nucleus VARCHAR,
cytoplasm VARCHAR
) | SELECT nucleus FROM table_13570_1 WHERE cytoplasm = "Pink" | 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: The pink cytoplasm will have a nucleus of what color? ### Input: CREATE TABLE table_13570_1 (
nucleus VARCHAR,
cytop... |
What was the lowest year that a player from midfield won first team honors? | CREATE TABLE table_7763 (
"Year" real,
"Team" text,
"Player" text,
"Position" text,
"School" text
) | SELECT MIN("Year") FROM table_7763 WHERE "Team" = 'first team' AND "Position" = 'midfield' | 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 lowest year that a player from midfield won first team honors? ### Input: CREATE TABLE table_7763 (
"Year" ... |
Which home team has a crowd that is bigger than 22,449? | CREATE TABLE table_10980 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Home team" FROM table_10980 WHERE "Crowd" > '22,449' | 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 home team has a crowd that is bigger than 22,449? ### Input: CREATE TABLE table_10980 (
"Home team" text,
"Hom... |
What classes are necessary to declare a major in MODGREEK ? | CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
good_feedback int,
... | SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE course.department LIKE '%MODGREEK%' AND program_course.category LIKE 'PreMajor' AND program_course.course_id = course.course_id | 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 classes are necessary to declare a major in MODGREEK ? ### Input: CREATE TABLE instructor (
instructor_id int,
... |
What is the hometown of the player who went to college at USC? | CREATE TABLE table_61144 (
"Year" real,
"Winner" text,
"Sport" text,
"Hometown" text,
"College" text
) | SELECT "Hometown" FROM table_61144 WHERE "College" = 'usc' | 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 hometown of the player who went to college at USC? ### Input: CREATE TABLE table_61144 (
"Year" real,
"W... |
What is the name, account type, and account balance corresponding to the customer with the highest credit score? | CREATE TABLE bank (
branch_id number,
bname text,
no_of_customers number,
city text,
state text
)
CREATE TABLE loan (
loan_id text,
loan_type text,
cust_id text,
branch_id text,
amount number
)
CREATE TABLE customer (
cust_id text,
cust_name text,
acc_type text,
... | SELECT cust_name, acc_type, acc_bal FROM customer ORDER BY credit_score 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: What is the name, account type, and account balance corresponding to the customer with the highest credit score? ### Input: ... |
Compare the number of the local authority by the local authority. | CREATE TABLE station (
id int,
network_name text,
services text,
local_authority text
)
CREATE TABLE train (
id int,
train_number int,
name text,
origin text,
destination text,
time text,
interval text
)
CREATE TABLE weekly_weather (
station_id int,
day_of_week text... | SELECT local_authority, COUNT(local_authority) FROM station GROUP BY local_authority | 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: Compare the number of the local authority by the local authority. ### Input: CREATE TABLE station (
id int,
network_... |
What content is provided by the television service ewtn? | CREATE TABLE table_name_1 (
content VARCHAR,
television_service VARCHAR
) | SELECT content FROM table_name_1 WHERE television_service = "ewtn" | 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 content is provided by the television service ewtn? ### Input: CREATE TABLE table_name_1 (
content VARCHAR,
tel... |
For those employees whose first name does not contain the letter M, give me a line chart to show the hire date and the corresponding salaries, and show X-axis from high to low order. | 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 TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decima... | SELECT HIRE_DATE, SALARY FROM employees WHERE NOT FIRST_NAME LIKE '%M%' ORDER BY HIRE_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: For those employees whose first name does not contain the letter M, give me a line chart to show the hire date and the corre... |
What is the original team of the celebrity who had the result 08 fired in week 10 (2008-03-06) | CREATE TABLE table_12286195_1 (
original_team VARCHAR,
result VARCHAR
) | SELECT original_team FROM table_12286195_1 WHERE result = "08 Fired in week 10 (2008-03-06)" | 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 original team of the celebrity who had the result 08 fired in week 10 (2008-03-06) ### Input: CREATE TABLE table... |
Which county has a membership of 1, a franchise type of corporation and a borough of Ennis? | CREATE TABLE table_3033 (
"Borough" text,
"County" text,
"Franchise type" text,
"Members" real,
"Voters in 1800" real,
"Times contested" real,
"Fate in 1832" text
) | SELECT "County" FROM table_3033 WHERE "Members" = '1' AND "Franchise type" = 'Corporation' AND "Borough" = 'Ennis' | 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 county has a membership of 1, a franchise type of corporation and a borough of Ennis? ### Input: CREATE TABLE table_30... |
Who is the partner with a score of 6 1, 6 4? | CREATE TABLE table_name_29 (
partner VARCHAR,
score VARCHAR
) | SELECT partner FROM table_name_29 WHERE score = "6–1, 6–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: Who is the partner with a score of 6 1, 6 4? ### Input: CREATE TABLE table_name_29 (
partner VARCHAR,
score VARCHAR
... |
Which combined score has an overall of 8? | CREATE TABLE table_35856 (
"Season" real,
"Overall" text,
"Slalom" text,
"Giant Slalom" text,
"Super G" text,
"Combined" text
) | SELECT "Combined" FROM table_35856 WHERE "Overall" = '8' | 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 combined score has an overall of 8? ### Input: CREATE TABLE table_35856 (
"Season" real,
"Overall" text,
"... |
List the position of players and the average number of points of players of each position by a bar chart, and display from low to high by the X. | CREATE TABLE player (
Player_ID int,
name text,
Position text,
Club_ID int,
Apps real,
Tries real,
Goals text,
Points real
)
CREATE TABLE club_rank (
Rank real,
Club_ID int,
Gold real,
Silver real,
Bronze real,
Total real
)
CREATE TABLE club (
Club_ID int,
... | SELECT Position, AVG(Points) FROM player GROUP BY Position ORDER BY Position | 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: List the position of players and the average number of points of players of each position by a bar chart, and display from l... |
For those employees who was hired before 2002-06-21, find job_id and the average of salary , and group by attribute job_id, and visualize them by a bar chart, and I want to rank by the Y-axis in descending. | CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
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... | SELECT JOB_ID, AVG(SALARY) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY AVG(SALARY) 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 average of salary , and group by attribute job_id, ... |
what number of patients with femoral artery thrombosis have 0 death status? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.expire_flag = "0" AND demographic.diagnosis = "FEMORAL ARTERY THROMBOSIS" | 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 number of patients with femoral artery thrombosis have 0 death status? ### Input: CREATE TABLE demographic (
subjec... |
What is the highest area for locations named Centreville having populations over 532? | CREATE TABLE table_name_84 (
area_km_2 INTEGER,
population VARCHAR,
official_name VARCHAR
) | SELECT MAX(area_km_2) FROM table_name_84 WHERE population > 532 AND official_name = "centreville" | 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 area for locations named Centreville having populations over 532? ### Input: CREATE TABLE table_name_84 ... |
Count those days and in which zip code was the min dew point lower than any day in zip code 94107 using a bar graph, and I want to list by the bars from low to high. | CREATE TABLE status (
station_id INTEGER,
bikes_available INTEGER,
docks_available INTEGER,
time TEXT
)
CREATE TABLE weather (
date TEXT,
max_temperature_f INTEGER,
mean_temperature_f INTEGER,
min_temperature_f INTEGER,
max_dew_point_f INTEGER,
mean_dew_point_f INTEGER,
min_... | SELECT date, COUNT(date) FROM weather WHERE min_dew_point_f < (SELECT MIN(min_dew_point_f) FROM weather WHERE zip_code = 94107) GROUP BY date ORDER BY date | 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: Count those days and in which zip code was the min dew point lower than any day in zip code 94107 using a bar graph, and I w... |
what's the minimum cost of a hospital that includes a anion gap lab test until 2101? | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
sy... | SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT lab.patientunitstayid FROM lab WHERE lab.labname = 'anion gap')) AND STRFTIME('%y', cost.chargetime) <= '2101' GROUP BY ... | 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's the minimum cost of a hospital that includes a anion gap lab test until 2101? ### Input: CREATE TABLE allergy (
a... |
which is the last dance on the chart | CREATE TABLE table_204_711 (
id number,
"dance" text,
"best dancer(s)" text,
"best score" number,
"worst dancer(s)" text,
"worst score" number
) | SELECT "dance" FROM table_204_711 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: which is the last dance on the chart ### Input: CREATE TABLE table_204_711 (
id number,
"dance" text,
"best danc... |
What is the winner for Virginia? | CREATE TABLE table_57035 (
"Date" text,
"Tournament" text,
"Location" text,
"Purse( $ )" real,
"Winner" text,
"Score" text,
"1st Prize( $ )" real
) | SELECT "Winner" FROM table_57035 WHERE "Location" = 'virginia' | 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 winner for Virginia? ### Input: CREATE TABLE table_57035 (
"Date" text,
"Tournament" text,
"Location... |
What is the 3rd day that has bumped by clare as the 4th day? | CREATE TABLE table_6148 (
"Year" real,
"Finish position" text,
"1st day" text,
"2nd day" text,
"3rd day" text,
"4th Day" text
) | SELECT "3rd day" FROM table_6148 WHERE "4th Day" = 'bumped by clare' | 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 3rd day that has bumped by clare as the 4th day? ### Input: CREATE TABLE table_6148 (
"Year" real,
"Fini... |
what is the number of patients whose year of birth is less than 2056 and lab test fluid is pleural? | 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.dob_year < "2056" 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: what is the number of patients whose year of birth is less than 2056 and lab test fluid is pleural? ### Input: CREATE TABLE ... |
Please show different software platforms and the corresponding number of devices using each. | CREATE TABLE device (
Software_Platform VARCHAR
) | SELECT Software_Platform, COUNT(*) FROM device GROUP BY Software_Platform | 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: Please show different software platforms and the corresponding number of devices using each. ### Input: CREATE TABLE device ... |
What is the A330 and the A310 wide? | CREATE TABLE table_name_62 (
a330 VARCHAR,
a310 VARCHAR
) | SELECT a330 FROM table_name_62 WHERE a310 = "wide" | 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 A330 and the A310 wide? ### Input: CREATE TABLE table_name_62 (
a330 VARCHAR,
a310 VARCHAR
) ### Respons... |
What is the average events that Al Geiberger played with wins smaller than 1? | CREATE TABLE table_11504 (
"Rank" real,
"Player" text,
"Country" text,
"Earnings ( $ )" real,
"Events" real,
"Wins" real
) | SELECT AVG("Events") FROM table_11504 WHERE "Player" = 'al geiberger' AND "Wins" < '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: What is the average events that Al Geiberger played with wins smaller than 1? ### Input: CREATE TABLE table_11504 (
"Ran... |
When is the club founded that founed prsl in 2008 and the home city is carolina 1? | CREATE TABLE table_name_95 (
founded INTEGER,
joined_prsl VARCHAR,
home_city VARCHAR
) | SELECT MAX(founded) FROM table_name_95 WHERE joined_prsl = 2008 AND home_city = "carolina 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: When is the club founded that founed prsl in 2008 and the home city is carolina 1? ### Input: CREATE TABLE table_name_95 (
... |
How many cards does customer Art Turcotte have? | CREATE TABLE customers_cards (
card_id number,
customer_id number,
card_type_code text,
card_number text,
date_valid_from time,
date_valid_to time,
other_card_details text
)
CREATE TABLE customers (
customer_id number,
customer_first_name text,
customer_last_name text,
custo... | SELECT COUNT(*) FROM customers_cards AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Art" AND T2.customer_last_name = "Turcotte" | 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 cards does customer Art Turcotte have? ### Input: CREATE TABLE customers_cards (
card_id number,
customer_i... |
What event did Mikhail Avetisyan win by method of DQ (eye gouging)? | CREATE TABLE table_name_98 (
event VARCHAR,
method VARCHAR
) | SELECT event FROM table_name_98 WHERE method = "dq (eye gouging)" | 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 event did Mikhail Avetisyan win by method of DQ (eye gouging)? ### Input: CREATE TABLE table_name_98 (
event VARCHA... |
What episode number in the series had a production code of bdf405? | CREATE TABLE table_28019988_5 (
series__number INTEGER,
production_code VARCHAR
) | SELECT MIN(series__number) FROM table_28019988_5 WHERE production_code = "BDF405" | 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 episode number in the series had a production code of bdf405? ### Input: CREATE TABLE table_28019988_5 (
series__nu... |
Show the number of headquarters from each headquarters, could you order by the total number in ascending? | CREATE TABLE company (
Company_ID real,
Name text,
Headquarters text,
Industry text,
Sales_in_Billion real,
Profits_in_Billion real,
Assets_in_Billion real,
Market_Value_in_Billion real
)
CREATE TABLE employment (
Company_ID int,
People_ID int,
Year_working int
)
CREATE TAB... | SELECT Headquarters, COUNT(Headquarters) FROM company GROUP BY Headquarters ORDER BY COUNT(Headquarters) | 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 number of headquarters from each headquarters, could you order by the total number in ascending? ### Input: CREATE ... |
When Prof. Edward Chamberlin teaches it , does PROSTHOD 879 have a lab ? | 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,
predicted_graduation_semester int,
degree varchar,
minor varchar,
internship varch... | SELECT COUNT(*) = 0 FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instructor_id WHERE course.department = 'PROS... | 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: When Prof. Edward Chamberlin teaches it , does PROSTHOD 879 have a lab ? ### Input: CREATE TABLE student (
student_id in... |
What class can I take to get the MDE requirement done easily ? | CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
good_feedback int,
... | SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%MDE%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_cou... | 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 class can I take to get the MDE requirement done easily ? ### Input: CREATE TABLE instructor (
instructor_id int,
... |
What is the venue at Stanford University? | CREATE TABLE table_name_19 (
venue VARCHAR,
host VARCHAR
) | SELECT venue FROM table_name_19 WHERE host = "stanford university" | 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 venue at Stanford University? ### Input: CREATE TABLE table_name_19 (
venue VARCHAR,
host VARCHAR
) ### ... |
Which Byes has an Against smaller than 1297, and a Club of avoca, and Wins larger than 12? | CREATE TABLE table_name_45 (
byes INTEGER,
wins VARCHAR,
against VARCHAR,
club VARCHAR
) | SELECT AVG(byes) FROM table_name_45 WHERE against < 1297 AND club = "avoca" AND wins > 12 | 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 Byes has an Against smaller than 1297, and a Club of avoca, and Wins larger than 12? ### Input: CREATE TABLE table_nam... |
Visualize the relationship between Team_ID and All_Games_Percent , and group by attribute All_Road. | 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 Team_ID, All_Games_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 All_Games_Percent , and group by attribute All_Road. ### Input: CREATE TABLE ... |
When was the game where the away team had a score of 13.8 (86)? | CREATE TABLE table_74617 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Date" FROM table_74617 WHERE "Away team score" = '13.8 (86)' | 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 the game where the away team had a score of 13.8 (86)? ### Input: CREATE TABLE table_74617 (
"Home team" text,
... |
get me the number of patients admitted before 2129 who had lymphocytes, percent 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.admityear < "2129" AND lab.label = "Lymphocytes, Percent" | 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: get me the number of patients admitted before 2129 who had lymphocytes, percent lab test done. ### Input: CREATE TABLE demog... |
What is the flange thickness when the weight is 19.9? | CREATE TABLE table_2289 (
"Type" text,
"Beam height (mm)" real,
"Flange width (mm)" real,
"Web thickness (mm)" text,
"Flange thickness (mm)" text,
"Weight (kg/m)" text,
"Cross-section area (cm 2 )" text,
"Moment of inertia in torsion (J) (cm 4 )" text
) | SELECT "Flange thickness (mm)" FROM table_2289 WHERE "Weight (kg/m)" = '19.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 flange thickness when the weight is 19.9? ### Input: CREATE TABLE table_2289 (
"Type" text,
"Beam height... |
For those employees who was hired before 2002-06-21, give me the comparison about the sum of salary over the job_id , and group by attribute job_id. | CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,... | SELECT JOB_ID, SUM(SALARY) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_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: For those employees who was hired before 2002-06-21, give me the comparison about the sum of salary over the job_id , and gr... |
Posts with a few edits after CW-ification. | 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... | WITH cw_cte AS (SELECT ph.Id AS cwid, ph.PostId AS pid FROM PostHistory AS ph INNER JOIN Posts AS p ON ph.PostId = p.Id WHERE (ph.PostHistoryTypeId = 16)) SELECT COUNT(DISTINCT RevisionGUID), ph.PostId AS "post_link", revisions = 'site://posts/' + CAST(ph.PostId AS TEXT) + '/revisions' FROM cw_cte AS c INNER JOIN PostH... | 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: Posts with a few edits after CW-ification. ### Input: CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE... |
What is the weight when 20 is the number? | CREATE TABLE table_22496344_1 (
weight INTEGER,
_number VARCHAR
) | SELECT MAX(weight) FROM table_22496344_1 WHERE _number = 20 | 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 weight when 20 is the number? ### Input: CREATE TABLE table_22496344_1 (
weight INTEGER,
_number VARCHAR... |
What is the 2007 value with 2r in 2011 and 2r in 2008? | CREATE TABLE table_name_67 (
Id VARCHAR
) | SELECT 2007 FROM table_name_67 WHERE 2011 = "2r" AND 2008 = "2r" | 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 2007 value with 2r in 2011 and 2r in 2008? ### Input: CREATE TABLE table_name_67 (
Id VARCHAR
) ### Response... |
how many of shows had at least 5 episodes ? | CREATE TABLE table_203_631 (
id number,
"year" number,
"name of show" text,
"episodes" text,
"other guests" text,
"winner(s)" text
) | SELECT COUNT(DISTINCT "name of show") FROM table_203_631 WHERE "episodes" >= 5 | 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 of shows had at least 5 episodes ? ### Input: CREATE TABLE table_203_631 (
id number,
"year" number,
"n... |
What is the time from the song called Treat Me Nice? | CREATE TABLE table_name_29 (
time VARCHAR,
song_title VARCHAR
) | SELECT time FROM table_name_29 WHERE song_title = "treat me nice" | 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 time from the song called Treat Me Nice? ### Input: CREATE TABLE table_name_29 (
time VARCHAR,
song_titl... |
Which competition had a result of 1-0? | CREATE TABLE table_11161 (
"Date" text,
"Venue" text,
"Result" text,
"Win/ Loss/ Draw" text,
"Competition" text
) | SELECT "Competition" FROM table_11161 WHERE "Result" = '1-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: Which competition had a result of 1-0? ### Input: CREATE TABLE table_11161 (
"Date" text,
"Venue" text,
"Result"... |
what is the average total hospital cost which involves nonop cardiac/vasc exam in a year before? | CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE admissions (
row_id number,
subject_id number,
... | SELECT AVG(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT procedures_icd.hadm_id FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'nonop cardiac/vasc exam')) AND DATETIME(cost.chargetime, ... | 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 is the average total hospital cost which involves nonop cardiac/vasc exam in a year before? ### Input: CREATE TABLE d_i... |
Posts with apt-get install that have no software button. | 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 Score, Id AS "post_link" FROM Posts WHERE Body LIKE '%apt-get install%' AND NOT Body LIKE '%add-apt-repository%' AND NOT Body LIKE '%apps.ubuntu.com%' AND PostTypeId = 2 AND ClosedDate IS NULL ORDER BY Score 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: Posts with apt-get install that have no software button. ### Input: CREATE TABLE SuggestedEdits (
Id number,
PostId ... |
What is the average year with alfredo salazar fina salazar in mixed doubles? | CREATE TABLE table_name_41 (
year INTEGER,
mixed_doubles VARCHAR
) | SELECT AVG(year) FROM table_name_41 WHERE mixed_doubles = "alfredo salazar fina salazar" | 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 year with alfredo salazar fina salazar in mixed doubles? ### Input: CREATE TABLE table_name_41 (
yea... |
provide the number of patients whose death status is 0 and procedure long title is insertion of non-drug-eluting coronary artery stent(s)? | 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.expire_flag = "0" AND procedures.long_title = "Insertion of non-drug-eluting coronary artery stent(s)" | 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: provide the number of patients whose death status is 0 and procedure long title is insertion of non-drug-eluting coronary ar... |
Which gender makes up the majority of the staff? | CREATE TABLE staff (
gender VARCHAR
) | SELECT gender FROM staff GROUP BY gender ORDER BY COUNT(*) DESC 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: Which gender makes up the majority of the staff? ### Input: CREATE TABLE staff (
gender VARCHAR
) ### Response: SELECT g... |
What position did the player from maynard evans hs play | CREATE TABLE table_16855 (
"Player" text,
"No." real,
"Nationality" text,
"Position" text,
"Years for Jazz" text,
"School/Club Team" text
) | SELECT "Position" FROM table_16855 WHERE "School/Club Team" = 'Maynard Evans HS' | 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 position did the player from maynard evans hs play ### Input: CREATE TABLE table_16855 (
"Player" text,
"No." r... |
What is the location when the event was November reign? | CREATE TABLE table_10596 (
"Location" text,
"Venue" text,
"Promotion" text,
"Event" text,
"Inductee(s)" text
) | SELECT "Location" FROM table_10596 WHERE "Event" = 'november reign' | 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 location when the event was November reign? ### Input: CREATE TABLE table_10596 (
"Location" text,
"Venu... |
What's the week when the result was W 38-24 and attendance was less than 43,449? | CREATE TABLE table_13723 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) | SELECT SUM("Week") FROM table_13723 WHERE "Result" = 'w 38-24' AND "Attendance" < '43,449' | 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 week when the result was W 38-24 and attendance was less than 43,449? ### Input: CREATE TABLE table_13723 (
"... |
Show me about the correlation between Body_Builder_ID and Total in a scatter chart. | CREATE TABLE body_builder (
Body_Builder_ID int,
People_ID int,
Snatch real,
Clean_Jerk real,
Total real
)
CREATE TABLE people (
People_ID int,
Name text,
Height real,
Weight real,
Birth_Date text,
Birth_Place text
) | SELECT Body_Builder_ID, Total FROM body_builder | 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 me about the correlation between Body_Builder_ID and Total in a scatter chart. ### Input: CREATE TABLE body_builder (
... |
What is the best top-10 result when events are fewer than 39, top-5 is 1 and more than 5 cuts are made? | CREATE TABLE table_name_89 (
top_10 INTEGER,
cuts_made VARCHAR,
events VARCHAR,
top_5 VARCHAR
) | SELECT MAX(top_10) FROM table_name_89 WHERE events < 39 AND top_5 = 1 AND cuts_made > 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 is the best top-10 result when events are fewer than 39, top-5 is 1 and more than 5 cuts are made? ### Input: CREATE TA... |
What date has 6 as the tie no.? | CREATE TABLE table_41988 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
) | SELECT "Date" FROM table_41988 WHERE "Tie no" = '6' | 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 date has 6 as the tie no.? ### Input: CREATE TABLE table_41988 (
"Tie no" text,
"Home team" text,
"Score" t... |
What was the resolution of the fight when matt grice had a record of 2-0? | CREATE TABLE table_48597 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
) | SELECT "Res." FROM table_48597 WHERE "Record" = '2-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: What was the resolution of the fight when matt grice had a record of 2-0? ### Input: CREATE TABLE table_48597 (
"Res." t... |
Who was the musical guest and what song was performed when Matt Willis and Chantelle Houghton were the panelists? | CREATE TABLE table_20422 (
"Episode Number" real,
"Air Date" text,
"Guest Host" text,
"Musical Guest (Song performed)" text,
"Who knows the most about the guest host? panelists" text
) | SELECT "Musical Guest (Song performed)" FROM table_20422 WHERE "Who knows the most about the guest host? panelists" = 'Matt Willis and Chantelle Houghton' | 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 musical guest and what song was performed when Matt Willis and Chantelle Houghton were the panelists? ### Input:... |
What is the composition at Valles lava dome? | CREATE TABLE table_104 (
"Name of lava dome" text,
"Country" text,
"Volcanic area" text,
"Composition" text,
"Last eruption or growth episode" text
) | SELECT "Composition" FROM table_104 WHERE "Name of lava dome" = 'Valles lava dome' | 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 composition at Valles lava dome? ### Input: CREATE TABLE table_104 (
"Name of lava dome" text,
"Country"... |
how many patients is antihypertensive drug given to two times since 1 year ago? | CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE i... | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, COUNT(*) AS c1 FROM patient WHERE patient.patientunitstayid = (SELECT treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'antihypertensive drug' AND DATETIME(treatment.treatmenttime) >= DATETIME(CURRENT_TIME(), '-1 year')) GROUP... | 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 many patients is antihypertensive drug given to two times since 1 year ago? ### Input: CREATE TABLE cost (
costid nu... |
If the province is Nunavut, what is the Arabs 2011 amount? | CREATE TABLE table_1939367_1 (
arabs_2011 VARCHAR,
province VARCHAR
) | SELECT arabs_2011 FROM table_1939367_1 WHERE province = "Nunavut" | 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 province is Nunavut, what is the Arabs 2011 amount? ### Input: CREATE TABLE table_1939367_1 (
arabs_2011 VARCHAR,... |
Which UEFA confederation member had a rank more than 17 and caps of 114? | CREATE TABLE table_name_32 (
name VARCHAR,
caps VARCHAR,
rank VARCHAR,
confederation VARCHAR
) | SELECT name FROM table_name_32 WHERE rank > 17 AND confederation = "uefa" AND caps = 114 | 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 UEFA confederation member had a rank more than 17 and caps of 114? ### Input: CREATE TABLE table_name_32 (
name VA... |
Who was the away team playing the home team North Melbourne? | CREATE TABLE table_74641 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Away team" FROM table_74641 WHERE "Home team" = 'north melbourne' | 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 away team playing the home team North Melbourne? ### Input: CREATE TABLE table_74641 (
"Home team" text,
... |
Questions migrated to Stack Overflow. | CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
... | SELECT Posts.Id AS "post_link" FROM Posts, PostHistory WHERE Posts.Id = PostHistory.PostId AND PostHistoryTypeId = 35 LIMIT 50 | 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: Questions migrated to Stack Overflow. ### Input: CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId numbe... |
Who were the candidates in the election where John Beatty was the incumbent? | CREATE TABLE table_1434788_5 (
candidates VARCHAR,
incumbent VARCHAR
) | SELECT candidates FROM table_1434788_5 WHERE incumbent = "John Beatty" | 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 the candidates in the election where John Beatty was the incumbent? ### Input: CREATE TABLE table_1434788_5 (
c... |
For those records from the products and each product's manufacturer, give me the comparison about the average of manufacturer over the name , and group by attribute name, display in ascending by the x axis. | 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 T1.Name ORDER BY 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, give me the comparison about the average of manufacture... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.