instruction
stringlengths 0
1.06k
| input
stringlengths 33
7.14k
| response
stringlengths 2
4.44k
| source
stringclasses 25
values | text
stringlengths 302
8.5k
|
---|---|---|---|---|
Which team did they play on March 11? | CREATE TABLE table_name_7 (
team VARCHAR,
date VARCHAR
) | SELECT team FROM table_name_7 WHERE date = "march 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: Which team did they play on March 11? ### Input: CREATE TABLE table_name_7 (
team VARCHAR,
date VARCHAR
) ### Response: SELECT team FROM table_name_7 WHERE date = "march 11" |
What is the highest floors with rank greater than 1 in Conrad Dubai? | CREATE TABLE table_38195 (
"Rank" real,
"Name" text,
"Height m (ft)" text,
"Floors" real,
"Year" real
) | SELECT MAX("Floors") FROM table_38195 WHERE "Rank" > '1' AND "Name" = 'conrad dubai' | 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 highest floors with rank greater than 1 in Conrad Dubai? ### Input: CREATE TABLE table_38195 (
"Rank" real,
"Name" text,
"Height m (ft)" text,
"Floors" real,
"Year" real
) ### Response: SELECT MAX("Floors") FROM table_38195 WHERE "Rank" > '1' AND "Name" = 'conrad dubai' |
What is the Place of the Player with a To par of 6? | CREATE TABLE table_62528 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | SELECT "Place" FROM table_62528 WHERE "To par" = '–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 is the Place of the Player with a To par of 6? ### Input: CREATE TABLE table_62528 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) ### Response: SELECT "Place" FROM table_62528 WHERE "To par" = '–6' |
What is the D 48 with a D 46 with r 33 o? | CREATE TABLE table_name_87 (
d_48_√ VARCHAR,
d_46_√ VARCHAR
) | SELECT d_48_√ FROM table_name_87 WHERE d_46_√ = "r 33 o" | 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 D 48 with a D 46 with r 33 o? ### Input: CREATE TABLE table_name_87 (
d_48_√ VARCHAR,
d_46_√ VARCHAR
) ### Response: SELECT d_48_√ FROM table_name_87 WHERE d_46_√ = "r 33 o" |
Show each gender code and the corresponding count of guests sorted by the count in descending order. Show bar chart. | CREATE TABLE Apartment_Facilities (
apt_id INTEGER,
facility_code CHAR(15)
)
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 Guests (
guest_id INTEGER,
gender_code CHAR(1),
guest_first_name VARCHAR(80),
guest_last_name VARCHAR(80),
date_of_birth DATETIME
)
CREATE TABLE Apartment_Buildings (
building_id INTEGER,
building_short_name CHAR(15),
building_full_name VARCHAR(80),
building_description VARCHAR(255),
building_address VARCHAR(255),
building_manager VARCHAR(50),
building_phone VARCHAR(80)
)
CREATE TABLE View_Unit_Status (
apt_id INTEGER,
apt_booking_id INTEGER,
status_date DATETIME,
available_yn BIT
)
CREATE TABLE Apartment_Bookings (
apt_booking_id INTEGER,
apt_id INTEGER,
guest_id INTEGER,
booking_status_code CHAR(15),
booking_start_date DATETIME,
booking_end_date DATETIME
) | SELECT gender_code, COUNT(*) FROM Guests GROUP BY gender_code ORDER BY COUNT(*) DESC | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show each gender code and the corresponding count of guests sorted by the count in descending order. Show bar chart. ### Input: CREATE TABLE Apartment_Facilities (
apt_id INTEGER,
facility_code CHAR(15)
)
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 Guests (
guest_id INTEGER,
gender_code CHAR(1),
guest_first_name VARCHAR(80),
guest_last_name VARCHAR(80),
date_of_birth DATETIME
)
CREATE TABLE Apartment_Buildings (
building_id INTEGER,
building_short_name CHAR(15),
building_full_name VARCHAR(80),
building_description VARCHAR(255),
building_address VARCHAR(255),
building_manager VARCHAR(50),
building_phone VARCHAR(80)
)
CREATE TABLE View_Unit_Status (
apt_id INTEGER,
apt_booking_id INTEGER,
status_date DATETIME,
available_yn BIT
)
CREATE TABLE Apartment_Bookings (
apt_booking_id INTEGER,
apt_id INTEGER,
guest_id INTEGER,
booking_status_code CHAR(15),
booking_start_date DATETIME,
booking_end_date DATETIME
) ### Response: SELECT gender_code, COUNT(*) FROM Guests GROUP BY gender_code ORDER BY COUNT(*) DESC |
Return a bar chart on what are the name and assets of each company, sorted in ascending order of company name? | CREATE TABLE buildings (
id int,
name text,
City text,
Height int,
Stories int,
Status text
)
CREATE TABLE Office_locations (
building_id int,
company_id int,
move_in_year int
)
CREATE TABLE Companies (
id int,
name text,
Headquarters text,
Industry text,
Sales_billion real,
Profits_billion real,
Assets_billion real,
Market_Value_billion text
) | SELECT name, Assets_billion FROM Companies ORDER BY 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 bar chart on what are the name and assets of each company, sorted in ascending order of company name? ### Input: CREATE TABLE buildings (
id int,
name text,
City text,
Height int,
Stories int,
Status text
)
CREATE TABLE Office_locations (
building_id int,
company_id int,
move_in_year int
)
CREATE TABLE Companies (
id int,
name text,
Headquarters text,
Industry text,
Sales_billion real,
Profits_billion real,
Assets_billion real,
Market_Value_billion text
) ### Response: SELECT name, Assets_billion FROM Companies ORDER BY name |
What is the score for the away team Chelsea? | CREATE TABLE table_name_35 (
score VARCHAR,
away_team VARCHAR
) | SELECT score FROM table_name_35 WHERE away_team = "chelsea" | 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 score for the away team Chelsea? ### Input: CREATE TABLE table_name_35 (
score VARCHAR,
away_team VARCHAR
) ### Response: SELECT score FROM table_name_35 WHERE away_team = "chelsea" |
What is Date, when Format is Vinyl, and when Label is Mercury? | CREATE TABLE table_47952 (
"Date" text,
"Region" text,
"Label" text,
"Catalogue" text,
"Format" text
) | SELECT "Date" FROM table_47952 WHERE "Format" = 'vinyl' AND "Label" = 'mercury' | 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 Date, when Format is Vinyl, and when Label is Mercury? ### Input: CREATE TABLE table_47952 (
"Date" text,
"Region" text,
"Label" text,
"Catalogue" text,
"Format" text
) ### Response: SELECT "Date" FROM table_47952 WHERE "Format" = 'vinyl' AND "Label" = 'mercury' |
What is the most recent paper of image understanding ? | CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename varchar
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE dataset (
datasetid int,
datasetname varchar
)
CREATE TABLE field (
fieldid int
)
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE venue (
venueid int,
venuename varchar
) | SELECT DISTINCT paper.paperid, paper.year FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'image understanding' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid ORDER BY paper.year DESC | scholar | Below are sql tables 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 most recent paper of image understanding ? ### Input: CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename varchar
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE dataset (
datasetid int,
datasetname varchar
)
CREATE TABLE field (
fieldid int
)
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE venue (
venueid int,
venuename varchar
) ### Response: SELECT DISTINCT paper.paperid, paper.year FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'image understanding' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid ORDER BY paper.year DESC |
What is the mean huc example code when the example name's lower snake, there are 6 digits, and less than 3 levels? | CREATE TABLE table_name_35 (
example_code__huc_ INTEGER,
level VARCHAR,
example_name VARCHAR,
digits VARCHAR
) | SELECT AVG(example_code__huc_) FROM table_name_35 WHERE example_name = "lower snake" AND digits = 6 AND level < 3 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the mean huc example code when the example name's lower snake, there are 6 digits, and less than 3 levels? ### Input: CREATE TABLE table_name_35 (
example_code__huc_ INTEGER,
level VARCHAR,
example_name VARCHAR,
digits VARCHAR
) ### Response: SELECT AVG(example_code__huc_) FROM table_name_35 WHERE example_name = "lower snake" AND digits = 6 AND level < 3 |
What away team played when the home team scoreed 5.7 (37)? | CREATE TABLE table_32738 (
"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_32738 WHERE "Home team score" = '5.7 (37)' | 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 away team played when the home team scoreed 5.7 (37)? ### Input: CREATE TABLE table_32738 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) ### Response: SELECT "Away team" FROM table_32738 WHERE "Home team score" = '5.7 (37)' |
What is the minimum possible NJCAA championships? | CREATE TABLE table_24921 (
"School" text,
"Location" text,
"Team Name" text,
"Colors" text,
"Varsity Teams" real,
"NJCAA Championships" real
) | SELECT MIN("NJCAA Championships") FROM table_24921 | 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 minimum possible NJCAA championships? ### Input: CREATE TABLE table_24921 (
"School" text,
"Location" text,
"Team Name" text,
"Colors" text,
"Varsity Teams" real,
"NJCAA Championships" real
) ### Response: SELECT MIN("NJCAA Championships") FROM table_24921 |
Where did the player loaned out on 27 november 2008 move to ? | CREATE TABLE table_name_65 (
moving_to VARCHAR,
date_from VARCHAR
) | SELECT moving_to FROM table_name_65 WHERE date_from = "27 november 2008" | 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 did the player loaned out on 27 november 2008 move to ? ### Input: CREATE TABLE table_name_65 (
moving_to VARCHAR,
date_from VARCHAR
) ### Response: SELECT moving_to FROM table_name_65 WHERE date_from = "27 november 2008" |
Give me a bar chart for all_games_percent of each team name, could you list in asc by the y axis please? | CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
) | SELECT Team_Name, All_Games_Percent FROM basketball_match ORDER BY All_Games_Percent | 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 a bar chart for all_games_percent of each team name, could you list in asc by the y axis please? ### Input: CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
) ### Response: SELECT Team_Name, All_Games_Percent FROM basketball_match ORDER BY All_Games_Percent |
What is the Points Jury for Dance pop? | CREATE TABLE table_name_39 (
points_jury VARCHAR,
dance VARCHAR
) | SELECT points_jury FROM table_name_39 WHERE dance = "pop" | 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 Points Jury for Dance pop? ### Input: CREATE TABLE table_name_39 (
points_jury VARCHAR,
dance VARCHAR
) ### Response: SELECT points_jury FROM table_name_39 WHERE dance = "pop" |
How many skaters have a Rank in FS of 3, and a Rank in SP larger than 4? | CREATE TABLE table_name_37 (
final_rank VARCHAR,
rank_in_fs VARCHAR,
rank_in_sp VARCHAR
) | SELECT COUNT(final_rank) FROM table_name_37 WHERE rank_in_fs = 3 AND rank_in_sp > 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: How many skaters have a Rank in FS of 3, and a Rank in SP larger than 4? ### Input: CREATE TABLE table_name_37 (
final_rank VARCHAR,
rank_in_fs VARCHAR,
rank_in_sp VARCHAR
) ### Response: SELECT COUNT(final_rank) FROM table_name_37 WHERE rank_in_fs = 3 AND rank_in_sp > 4 |
Find the number of students whose age is older than the average age for each gender, and I want to sort by the x axis in desc. | CREATE TABLE Dorm (
dormid INTEGER,
dorm_name VARCHAR(20),
student_capacity INTEGER,
gender VARCHAR(1)
)
CREATE TABLE Dorm_amenity (
amenid INTEGER,
amenity_name VARCHAR(25)
)
CREATE TABLE Has_amenity (
dormid INTEGER,
amenid INTEGER
)
CREATE TABLE Lives_in (
stuid INTEGER,
dormid INTEGER,
room_number INTEGER
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
) | SELECT Sex, COUNT(*) FROM Student WHERE Age > (SELECT AVG(Age) FROM Student) GROUP BY Sex ORDER BY Sex DESC | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find the number of students whose age is older than the average age for each gender, and I want to sort by the x axis in desc. ### Input: CREATE TABLE Dorm (
dormid INTEGER,
dorm_name VARCHAR(20),
student_capacity INTEGER,
gender VARCHAR(1)
)
CREATE TABLE Dorm_amenity (
amenid INTEGER,
amenity_name VARCHAR(25)
)
CREATE TABLE Has_amenity (
dormid INTEGER,
amenid INTEGER
)
CREATE TABLE Lives_in (
stuid INTEGER,
dormid INTEGER,
room_number INTEGER
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
) ### Response: SELECT Sex, COUNT(*) FROM Student WHERE Age > (SELECT AVG(Age) FROM Student) GROUP BY Sex ORDER BY Sex DESC |
Find the number of accounts with a savings balance that is higher than the average savings balance. | CREATE TABLE checking (
custid number,
balance number
)
CREATE TABLE accounts (
custid number,
name text
)
CREATE TABLE savings (
custid number,
balance number
) | SELECT COUNT(*) FROM savings WHERE balance > (SELECT AVG(balance) FROM savings) | 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 number of accounts with a savings balance that is higher than the average savings balance. ### Input: CREATE TABLE checking (
custid number,
balance number
)
CREATE TABLE accounts (
custid number,
name text
)
CREATE TABLE savings (
custid number,
balance number
) ### Response: SELECT COUNT(*) FROM savings WHERE balance > (SELECT AVG(balance) FROM savings) |
What was the Pick Number when the position was wide receiver, the college was Southern Miss with an overall less than 186? | CREATE TABLE table_name_54 (
pick__number INTEGER,
overall VARCHAR,
position VARCHAR,
college VARCHAR
) | SELECT AVG(pick__number) FROM table_name_54 WHERE position = "wide receiver" AND college = "southern miss" AND overall < 186 | 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 the Pick Number when the position was wide receiver, the college was Southern Miss with an overall less than 186? ### Input: CREATE TABLE table_name_54 (
pick__number INTEGER,
overall VARCHAR,
position VARCHAR,
college VARCHAR
) ### Response: SELECT AVG(pick__number) FROM table_name_54 WHERE position = "wide receiver" AND college = "southern miss" AND overall < 186 |
Name the number of episode for phyllo dough | CREATE TABLE table_19934 (
"Series Ep." text,
"Episode" real,
"Netflix" text,
"Segment A" text,
"Segment B" text,
"Segment C" text,
"Segment D" text
) | SELECT COUNT("Episode") FROM table_19934 WHERE "Segment C" = 'Phyllo Dough' | 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 number of episode for phyllo dough ### Input: CREATE TABLE table_19934 (
"Series Ep." text,
"Episode" real,
"Netflix" text,
"Segment A" text,
"Segment B" text,
"Segment C" text,
"Segment D" text
) ### Response: SELECT COUNT("Episode") FROM table_19934 WHERE "Segment C" = 'Phyllo Dough' |
what is the admission location and discharge location of subject id 4589? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
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,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear 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 demographic.admission_location, demographic.discharge_location FROM demographic WHERE demographic.subject_id = "4589" | 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 admission location and discharge location of subject id 4589? ### Input: CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
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,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear 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
) ### Response: SELECT demographic.admission_location, demographic.discharge_location FROM demographic WHERE demographic.subject_id = "4589" |
which artists scored at least 16 for composition ? | CREATE TABLE table_203_186 (
id number,
"painter" text,
"composition" number,
"drawing" number,
"color" number,
"expression" number
) | SELECT "painter" FROM table_203_186 WHERE "composition" >= 16 | 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 artists scored at least 16 for composition ? ### Input: CREATE TABLE table_203_186 (
id number,
"painter" text,
"composition" number,
"drawing" number,
"color" number,
"expression" number
) ### Response: SELECT "painter" FROM table_203_186 WHERE "composition" >= 16 |
Bar graph to show the number of took office from different took office, and show by the Y in ascending. | CREATE TABLE member (
Member_ID int,
Member_Name text,
Party_ID text,
In_office text
)
CREATE TABLE party_events (
Event_ID int,
Event_Name text,
Party_ID int,
Member_in_charge_ID int
)
CREATE TABLE region (
Region_ID int,
Region_name text,
Date text,
Label text,
Format text,
Catalogue text
)
CREATE TABLE party (
Party_ID int,
Minister text,
Took_office text,
Left_office text,
Region_ID int,
Party_name text
) | SELECT Took_office, COUNT(Took_office) FROM party ORDER BY COUNT(Took_office) | 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: Bar graph to show the number of took office from different took office, and show by the Y in ascending. ### Input: CREATE TABLE member (
Member_ID int,
Member_Name text,
Party_ID text,
In_office text
)
CREATE TABLE party_events (
Event_ID int,
Event_Name text,
Party_ID int,
Member_in_charge_ID int
)
CREATE TABLE region (
Region_ID int,
Region_name text,
Date text,
Label text,
Format text,
Catalogue text
)
CREATE TABLE party (
Party_ID int,
Minister text,
Took_office text,
Left_office text,
Region_ID int,
Party_name text
) ### Response: SELECT Took_office, COUNT(Took_office) FROM party ORDER BY COUNT(Took_office) |
What was the high points when rebounds were Terrence Williams (8)? | CREATE TABLE table_25486 (
"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_25486 WHERE "High rebounds" = 'Terrence Williams (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: What was the high points when rebounds were Terrence Williams (8)? ### Input: CREATE TABLE table_25486 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) ### Response: SELECT "High points" FROM table_25486 WHERE "High rebounds" = 'Terrence Williams (8)' |
How many champions are shown for the runner-up of stefan edberg? | CREATE TABLE table_21584646_10 (
champion VARCHAR,
runner_up VARCHAR
) | SELECT COUNT(champion) FROM table_21584646_10 WHERE runner_up = "Stefan Edberg" | 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 champions are shown for the runner-up of stefan edberg? ### Input: CREATE TABLE table_21584646_10 (
champion VARCHAR,
runner_up VARCHAR
) ### Response: SELECT COUNT(champion) FROM table_21584646_10 WHERE runner_up = "Stefan Edberg" |
Which visitor has a Los Angeles home? | CREATE TABLE table_name_20 (
visitor VARCHAR,
home VARCHAR
) | SELECT visitor FROM table_name_20 WHERE home = "los angeles" | 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 visitor has a Los Angeles home? ### Input: CREATE TABLE table_name_20 (
visitor VARCHAR,
home VARCHAR
) ### Response: SELECT visitor FROM table_name_20 WHERE home = "los angeles" |
Visualize the title and and the total star rating of the movie using a bar chart, show from low to high by the total number. | CREATE TABLE Movie (
mID int,
title text,
year int,
director text
)
CREATE TABLE Reviewer (
rID int,
name text
)
CREATE TABLE Rating (
rID int,
mID int,
stars int,
ratingDate date
) | SELECT title, SUM(stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY title ORDER BY SUM(stars) | 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 title and and the total star rating of the movie using a bar chart, show from low to high by the total number. ### Input: CREATE TABLE Movie (
mID int,
title text,
year int,
director text
)
CREATE TABLE Reviewer (
rID int,
name text
)
CREATE TABLE Rating (
rID int,
mID int,
stars int,
ratingDate date
) ### Response: SELECT title, SUM(stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY title ORDER BY SUM(stars) |
Which College has a Position of ol, and a Pick # smaller than 32? | CREATE TABLE table_76789 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
) | SELECT "College" FROM table_76789 WHERE "Position" = 'ol' AND "Pick #" < '32' | 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 College has a Position of ol, and a Pick # smaller than 32? ### Input: CREATE TABLE table_76789 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
) ### Response: SELECT "College" FROM table_76789 WHERE "Position" = 'ol' AND "Pick #" < '32' |
What was the competition when the score was 3-0? | CREATE TABLE table_name_33 (
competition VARCHAR,
score VARCHAR
) | SELECT competition FROM table_name_33 WHERE score = "3-0" | 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 the competition when the score was 3-0? ### Input: CREATE TABLE table_name_33 (
competition VARCHAR,
score VARCHAR
) ### Response: SELECT competition FROM table_name_33 WHERE score = "3-0" |
how many patients whose diagnoses icd9 code is 30400 and lab test abnormal status is delta? | 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,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
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 = "30400" 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: how many patients whose diagnoses icd9 code is 30400 and lab test abnormal status is delta? ### Input: 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,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
) ### Response: 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 = "30400" AND lab.flag = "delta" |
Which 1947 Nos has a BR Nos of 48730-9? | CREATE TABLE table_43562 (
"1946 Nos" text,
"1947 Nos" text,
"Date" real,
"Built at" text,
"LMS Nos" text,
"BR Nos" text
) | SELECT "1947 Nos" FROM table_43562 WHERE "BR Nos" = '48730-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: Which 1947 Nos has a BR Nos of 48730-9? ### Input: CREATE TABLE table_43562 (
"1946 Nos" text,
"1947 Nos" text,
"Date" real,
"Built at" text,
"LMS Nos" text,
"BR Nos" text
) ### Response: SELECT "1947 Nos" FROM table_43562 WHERE "BR Nos" = '48730-9' |
What is the imed/avicenna listed for a medical school offshore in saint kitts and nevis which was established before 2000 and will give you an MD? | CREATE TABLE table_name_31 (
imed_avicenna_listed VARCHAR,
established VARCHAR,
degree VARCHAR,
regional_offshore VARCHAR,
country_territory VARCHAR
) | SELECT imed_avicenna_listed FROM table_name_31 WHERE regional_offshore = "offshore" AND country_territory = "saint kitts and nevis" AND degree = "md" AND established < 2000 | 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 imed/avicenna listed for a medical school offshore in saint kitts and nevis which was established before 2000 and will give you an MD? ### Input: CREATE TABLE table_name_31 (
imed_avicenna_listed VARCHAR,
established VARCHAR,
degree VARCHAR,
regional_offshore VARCHAR,
country_territory VARCHAR
) ### Response: SELECT imed_avicenna_listed FROM table_name_31 WHERE regional_offshore = "offshore" AND country_territory = "saint kitts and nevis" AND degree = "md" AND established < 2000 |
Are any professors appointed for Winter Other classes ? | CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text 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,
tough_tests int,
heavy_papers int,
cares_for_students int,
heavy_assignments int,
respected int,
participation int,
heavy_reading int,
tough_grader int,
hilarious int,
would_take_again int,
good_lecture int,
no_skip int
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test_id varchar
)
CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
description varchar,
num_semesters int,
num_enrolled int,
has_discussion varchar,
has_lab varchar,
has_projects varchar,
has_exams varchar,
num_reviews int,
clarity_score int,
easiness_score int,
helpfulness_score int
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar,
friday varchar,
saturday varchar,
sunday varchar,
has_final_project varchar,
has_final_exam varchar,
textbook varchar,
class_address varchar,
allow_audit 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,
predicted_graduation_semester int,
degree varchar,
minor varchar,
internship varchar
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
) | SELECT DISTINCT instructor.name FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_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 program_course.category LIKE '%Other%' AND semester.semester = 'Winter' AND semester.year = 2017 | advising | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Are any professors appointed for Winter Other classes ? ### Input: CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text 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,
tough_tests int,
heavy_papers int,
cares_for_students int,
heavy_assignments int,
respected int,
participation int,
heavy_reading int,
tough_grader int,
hilarious int,
would_take_again int,
good_lecture int,
no_skip int
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test_id varchar
)
CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
description varchar,
num_semesters int,
num_enrolled int,
has_discussion varchar,
has_lab varchar,
has_projects varchar,
has_exams varchar,
num_reviews int,
clarity_score int,
easiness_score int,
helpfulness_score int
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar,
friday varchar,
saturday varchar,
sunday varchar,
has_final_project varchar,
has_final_exam varchar,
textbook varchar,
class_address varchar,
allow_audit 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,
predicted_graduation_semester int,
degree varchar,
minor varchar,
internship varchar
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
) ### Response: SELECT DISTINCT instructor.name FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_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 program_course.category LIKE '%Other%' AND semester.semester = 'Winter' AND semester.year = 2017 |
Which Loera has a Source of surveyusa, and a Date of may 16 may 18, 2008? | CREATE TABLE table_75989 (
"Source" text,
"Date" text,
"Goberman" text,
"Loera" text,
"Merkley" text,
"Neville" text,
"Novick" text,
"Obrist" text,
"Other/ Undecided" text
) | SELECT "Loera" FROM table_75989 WHERE "Source" = 'surveyusa' AND "Date" = 'may 16–may 18, 2008' | 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 Loera has a Source of surveyusa, and a Date of may 16 may 18, 2008? ### Input: CREATE TABLE table_75989 (
"Source" text,
"Date" text,
"Goberman" text,
"Loera" text,
"Merkley" text,
"Neville" text,
"Novick" text,
"Obrist" text,
"Other/ Undecided" text
) ### Response: SELECT "Loera" FROM table_75989 WHERE "Source" = 'surveyusa' AND "Date" = 'may 16–may 18, 2008' |
How many points are there when the lost is 7? | CREATE TABLE table_19102 (
"Club" text,
"Played" text,
"Won" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text,
"Losing bonus" text,
"Points" text
) | SELECT "Points for" FROM table_19102 WHERE "Lost" = '7' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many points are there when the lost is 7? ### Input: CREATE TABLE table_19102 (
"Club" text,
"Played" text,
"Won" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text,
"Losing bonus" text,
"Points" text
) ### Response: SELECT "Points for" FROM table_19102 WHERE "Lost" = '7' |
What was the date of the game when the record was 70-74? | CREATE TABLE table_name_86 (
date VARCHAR,
record VARCHAR
) | SELECT date FROM table_name_86 WHERE record = "70-74" | 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 the date of the game when the record was 70-74? ### Input: CREATE TABLE table_name_86 (
date VARCHAR,
record VARCHAR
) ### Response: SELECT date FROM table_name_86 WHERE record = "70-74" |
For upper-level classes , do they all have exams ? | CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test_id varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
description varchar,
num_semesters int,
num_enrolled int,
has_discussion varchar,
has_lab varchar,
has_projects varchar,
has_exams varchar,
num_reviews int,
clarity_score int,
easiness_score int,
helpfulness_score int
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar,
friday varchar,
saturday varchar,
sunday varchar,
has_final_project varchar,
has_final_exam varchar,
textbook varchar,
class_address varchar,
allow_audit varchar
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
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,
predicted_graduation_semester int,
degree varchar,
minor varchar,
internship varchar
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction 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,
tough_tests int,
heavy_papers int,
cares_for_students int,
heavy_assignments int,
respected int,
participation int,
heavy_reading int,
tough_grader int,
hilarious int,
would_take_again int,
good_lecture int,
no_skip int
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
) | SELECT COUNT(*) = 0 FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.has_exams = 'N' AND program_course.category LIKE '%ULCS%' | 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: For upper-level classes , do they all have exams ? ### Input: CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test_id varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
description varchar,
num_semesters int,
num_enrolled int,
has_discussion varchar,
has_lab varchar,
has_projects varchar,
has_exams varchar,
num_reviews int,
clarity_score int,
easiness_score int,
helpfulness_score int
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar,
friday varchar,
saturday varchar,
sunday varchar,
has_final_project varchar,
has_final_exam varchar,
textbook varchar,
class_address varchar,
allow_audit varchar
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
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,
predicted_graduation_semester int,
degree varchar,
minor varchar,
internship varchar
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction 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,
tough_tests int,
heavy_papers int,
cares_for_students int,
heavy_assignments int,
respected int,
participation int,
heavy_reading int,
tough_grader int,
hilarious int,
would_take_again int,
good_lecture int,
no_skip int
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
) ### Response: SELECT COUNT(*) = 0 FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.has_exams = 'N' AND program_course.category LIKE '%ULCS%' |
Which Yonguk has a Halang of ran ? | CREATE TABLE table_name_35 (
yonguk VARCHAR,
halang VARCHAR
) | SELECT yonguk FROM table_name_35 WHERE halang = "ran¹" | 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 Yonguk has a Halang of ran ? ### Input: CREATE TABLE table_name_35 (
yonguk VARCHAR,
halang VARCHAR
) ### Response: SELECT yonguk FROM table_name_35 WHERE halang = "ran¹" |
What is the highest Total with a League Cup greater than 0, Player Gary Harkins, and Scottish Cup greater than 0? | CREATE TABLE table_15755 (
"Player" text,
"League" real,
"Scottish Cup" real,
"League Cup" real,
"Challenge Cup" real,
"Total" real
) | SELECT MAX("Total") FROM table_15755 WHERE "League Cup" > '0' AND "Player" = 'gary harkins' AND "Scottish Cup" > '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 is the highest Total with a League Cup greater than 0, Player Gary Harkins, and Scottish Cup greater than 0? ### Input: CREATE TABLE table_15755 (
"Player" text,
"League" real,
"Scottish Cup" real,
"League Cup" real,
"Challenge Cup" real,
"Total" real
) ### Response: SELECT MAX("Total") FROM table_15755 WHERE "League Cup" > '0' AND "Player" = 'gary harkins' AND "Scottish Cup" > '0' |
What is the D 42 when the D 50 is d 31? | CREATE TABLE table_56228 (
"D 50" text,
"D 49" text,
"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 42" FROM table_56228 WHERE "D 50" = 'd 31' | 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 D 42 when the D 50 is d 31? ### Input: CREATE TABLE table_56228 (
"D 50" text,
"D 49" text,
"D 48" text,
"D 47" text,
"D 46" text,
"D 45" text,
"D 44" text,
"D 43" text,
"D 42" text,
"D 41" text
) ### Response: SELECT "D 42" FROM table_56228 WHERE "D 50" = 'd 31' |
What is the date of Competition of 2008 africa cup of nations? | CREATE TABLE table_58447 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) | SELECT "Date" FROM table_58447 WHERE "Competition" = '2008 africa cup of nations' | 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 date of Competition of 2008 africa cup of nations? ### Input: CREATE TABLE table_58447 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) ### Response: SELECT "Date" FROM table_58447 WHERE "Competition" = '2008 africa cup of nations' |
Who were the candidates in the district of South Carolina 5? | CREATE TABLE table_796 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" text,
"Result" text,
"Candidates" text
) | SELECT "Candidates" FROM table_796 WHERE "District" = 'South Carolina 5' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who were the candidates in the district of South Carolina 5? ### Input: CREATE TABLE table_796 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" text,
"Result" text,
"Candidates" text
) ### Response: SELECT "Candidates" FROM table_796 WHERE "District" = 'South Carolina 5' |
What is the name for the species Authority of sigmodon hispidus say & ord, 1825? | CREATE TABLE table_name_76 (
name VARCHAR,
species_authority VARCHAR
) | SELECT name FROM table_name_76 WHERE species_authority = "sigmodon hispidus say & ord, 1825" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the name for the species Authority of sigmodon hispidus say & ord, 1825? ### Input: CREATE TABLE table_name_76 (
name VARCHAR,
species_authority VARCHAR
) ### Response: SELECT name FROM table_name_76 WHERE species_authority = "sigmodon hispidus say & ord, 1825" |
A pie chart shows the proportion of ACC_Regular_Season and School_ID. | CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
) | SELECT ACC_Regular_Season, School_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: A pie chart shows the proportion of ACC_Regular_Season and School_ID. ### Input: CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
) ### Response: SELECT ACC_Regular_Season, School_ID FROM basketball_match |
Who played in Maryland the same year that Deep Run Valley LL Hilltown played in Pennsylvania? | CREATE TABLE table_13012165_1 (
maryland VARCHAR,
pennsylvania VARCHAR
) | SELECT maryland FROM table_13012165_1 WHERE pennsylvania = "Deep Run Valley LL Hilltown" | 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 played in Maryland the same year that Deep Run Valley LL Hilltown played in Pennsylvania? ### Input: CREATE TABLE table_13012165_1 (
maryland VARCHAR,
pennsylvania VARCHAR
) ### Response: SELECT maryland FROM table_13012165_1 WHERE pennsylvania = "Deep Run Valley LL Hilltown" |
How much Gain has a Long of 29, and an Avg/G smaller than 33.7? | CREATE TABLE table_76772 (
"Name" text,
"Gain" real,
"Loss" real,
"Long" real,
"Avg/G" real
) | SELECT COUNT("Gain") FROM table_76772 WHERE "Long" = '29' AND "Avg/G" < '33.7' | 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 much Gain has a Long of 29, and an Avg/G smaller than 33.7? ### Input: CREATE TABLE table_76772 (
"Name" text,
"Gain" real,
"Loss" real,
"Long" real,
"Avg/G" real
) ### Response: SELECT COUNT("Gain") FROM table_76772 WHERE "Long" = '29' AND "Avg/G" < '33.7' |
what is discharge location and discharge time of subject id 29961? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE 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 text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear 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 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
) | SELECT demographic.discharge_location, demographic.dischtime FROM demographic WHERE demographic.subject_id = "29961" | 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 discharge location and discharge time of subject id 29961? ### Input: CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE 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 text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear 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 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
) ### Response: SELECT demographic.discharge_location, demographic.dischtime FROM demographic WHERE demographic.subject_id = "29961" |
Who is the team captain of the Guldensporen Stadion with a stadium capacity larger than 12,919? | CREATE TABLE table_46431 (
"Club" text,
"Location" text,
"Current manager" text,
"Team captain" text,
"Stadium" text,
"Capacity" real
) | SELECT "Team captain" FROM table_46431 WHERE "Capacity" > '12,919' AND "Stadium" = 'guldensporen stadion' | 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 is the team captain of the Guldensporen Stadion with a stadium capacity larger than 12,919? ### Input: CREATE TABLE table_46431 (
"Club" text,
"Location" text,
"Current manager" text,
"Team captain" text,
"Stadium" text,
"Capacity" real
) ### Response: SELECT "Team captain" FROM table_46431 WHERE "Capacity" > '12,919' AND "Stadium" = 'guldensporen stadion' |
What's the source of wealth of the person worth $17 billion? | CREATE TABLE table_79744 (
"Name" text,
"Birth year and age" text,
"Net worth US$ (billions)" real,
"Citizenship" text,
"Source" text
) | SELECT "Source" FROM table_79744 WHERE "Net worth US$ (billions)" = '17' | 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 source of wealth of the person worth $17 billion? ### Input: CREATE TABLE table_79744 (
"Name" text,
"Birth year and age" text,
"Net worth US$ (billions)" real,
"Citizenship" text,
"Source" text
) ### Response: SELECT "Source" FROM table_79744 WHERE "Net worth US$ (billions)" = '17' |
what was the game number where the record was 46 24? | CREATE TABLE table_27712702_11 (
game INTEGER,
record VARCHAR
) | SELECT MIN(game) FROM table_27712702_11 WHERE record = "46–24" | 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 the game number where the record was 46 24? ### Input: CREATE TABLE table_27712702_11 (
game INTEGER,
record VARCHAR
) ### Response: SELECT MIN(game) FROM table_27712702_11 WHERE record = "46–24" |
What is the surface when the us open is the championship in the year 1979? | CREATE TABLE table_25446 (
"Outcome" text,
"Year" real,
"Championship" text,
"Surface" text,
"Partner" text,
"Opponents" text,
"Score" text
) | SELECT "Surface" FROM table_25446 WHERE "Championship" = 'US Open' AND "Year" = '1979' | 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 surface when the us open is the championship in the year 1979? ### Input: CREATE TABLE table_25446 (
"Outcome" text,
"Year" real,
"Championship" text,
"Surface" text,
"Partner" text,
"Opponents" text,
"Score" text
) ### Response: SELECT "Surface" FROM table_25446 WHERE "Championship" = 'US Open' AND "Year" = '1979' |
what is the most silver when bronze is more than 0, total is more than 1, gold is more than 0 and the nation is china (chn)? | CREATE TABLE table_name_62 (
silver INTEGER,
nation VARCHAR,
gold VARCHAR,
bronze VARCHAR,
total VARCHAR
) | SELECT MAX(silver) FROM table_name_62 WHERE bronze > 0 AND total > 1 AND gold > 0 AND nation = "china (chn)" | 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 most silver when bronze is more than 0, total is more than 1, gold is more than 0 and the nation is china (chn)? ### Input: CREATE TABLE table_name_62 (
silver INTEGER,
nation VARCHAR,
gold VARCHAR,
bronze VARCHAR,
total VARCHAR
) ### Response: SELECT MAX(silver) FROM table_name_62 WHERE bronze > 0 AND total > 1 AND gold > 0 AND nation = "china (chn)" |
If the player is Corey Pavin when he had a To par of over 7, what was the sum of his totals? | CREATE TABLE table_46927 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" real,
"To par" real,
"Finish" text
) | SELECT SUM("Total") FROM table_46927 WHERE "To par" > '7' AND "Player" = 'corey pavin' | 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 the player is Corey Pavin when he had a To par of over 7, what was the sum of his totals? ### Input: CREATE TABLE table_46927 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" real,
"To par" real,
"Finish" text
) ### Response: SELECT SUM("Total") FROM table_46927 WHERE "To par" > '7' AND "Player" = 'corey pavin' |
What's the release date for the processor spec number SLBEQ(d0)? | CREATE TABLE table_name_29 (
release_date VARCHAR,
sspec_number VARCHAR
) | SELECT release_date FROM table_name_29 WHERE sspec_number = "slbeq(d0)" | 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 release date for the processor spec number SLBEQ(d0)? ### Input: CREATE TABLE table_name_29 (
release_date VARCHAR,
sspec_number VARCHAR
) ### Response: SELECT release_date FROM table_name_29 WHERE sspec_number = "slbeq(d0)" |
What are the id and first name of the student whose addresses have the highest average monthly rental? | CREATE TABLE Students (
first_name VARCHAR,
student_id VARCHAR
)
CREATE TABLE Student_Addresses (
student_id VARCHAR
) | SELECT T1.student_id, T2.first_name FROM Student_Addresses AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY AVG(monthly_rental) 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: What are the id and first name of the student whose addresses have the highest average monthly rental? ### Input: CREATE TABLE Students (
first_name VARCHAR,
student_id VARCHAR
)
CREATE TABLE Student_Addresses (
student_id VARCHAR
) ### Response: SELECT T1.student_id, T2.first_name FROM Student_Addresses AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY AVG(monthly_rental) DESC LIMIT 1 |
what was the last title that sid marcus directed ? | CREATE TABLE table_201_39 (
id number,
"no" number,
"title" text,
"directed by" text,
"released" number
) | SELECT "title" FROM table_201_39 WHERE "directed by" = 'sid marcus' ORDER BY "no" 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: what was the last title that sid marcus directed ? ### Input: CREATE TABLE table_201_39 (
id number,
"no" number,
"title" text,
"directed by" text,
"released" number
) ### Response: SELECT "title" FROM table_201_39 WHERE "directed by" = 'sid marcus' ORDER BY "no" DESC LIMIT 1 |
How many patients had undergone other radiotherapeutic procedures? | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
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 text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.long_title = "Other radiotherapeutic procedure" | 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 had undergone other radiotherapeutic procedures? ### Input: 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
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 text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) ### Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.long_title = "Other radiotherapeutic procedure" |
WHAT IS THE TOTAL PICK FOR BOSTON COLLEGE? | CREATE TABLE table_name_32 (
pick VARCHAR,
college VARCHAR
) | SELECT COUNT(pick) FROM table_name_32 WHERE college = "boston college" | 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 PICK FOR BOSTON COLLEGE? ### Input: CREATE TABLE table_name_32 (
pick VARCHAR,
college VARCHAR
) ### Response: SELECT COUNT(pick) FROM table_name_32 WHERE college = "boston college" |
Show me about the correlation between student_id and address_id , and group by attribute other_details in a scatter chart. | CREATE TABLE Students (
student_id INTEGER,
address_id INTEGER,
first_name VARCHAR(80),
middle_name VARCHAR(40),
last_name VARCHAR(40),
cell_mobile_number VARCHAR(40),
email_address VARCHAR(40),
date_first_rental DATETIME,
date_left_university DATETIME,
other_student_details VARCHAR(255)
)
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 Ref_Address_Types (
address_type_code VARCHAR(15),
address_type_description VARCHAR(80)
)
CREATE TABLE Detention (
detention_id INTEGER,
detention_type_code VARCHAR(10),
teacher_id INTEGER,
datetime_detention_start DATETIME,
datetime_detention_end DATETIME,
detention_summary VARCHAR(255),
other_details VARCHAR(255)
)
CREATE TABLE Students_in_Detention (
student_id INTEGER,
detention_id INTEGER,
incident_id INTEGER
)
CREATE TABLE Ref_Incident_Type (
incident_type_code VARCHAR(10),
incident_type_description VARCHAR(80)
)
CREATE TABLE Teachers (
teacher_id INTEGER,
address_id INTEGER,
first_name VARCHAR(80),
middle_name VARCHAR(80),
last_name VARCHAR(80),
gender VARCHAR(1),
cell_mobile_number VARCHAR(40),
email_address VARCHAR(40),
other_details VARCHAR(255)
)
CREATE TABLE Behavior_Incident (
incident_id INTEGER,
incident_type_code VARCHAR(10),
student_id INTEGER,
date_incident_start DATETIME,
date_incident_end DATETIME,
incident_summary VARCHAR(255),
recommendations VARCHAR(255),
other_details VARCHAR(255)
)
CREATE TABLE Ref_Detention_Type (
detention_type_code VARCHAR(10),
detention_type_description VARCHAR(80)
)
CREATE TABLE Addresses (
address_id INTEGER,
line_1 VARCHAR(120),
line_2 VARCHAR(120),
line_3 VARCHAR(120),
city VARCHAR(80),
zip_postcode VARCHAR(20),
state_province_county VARCHAR(50),
country VARCHAR(50),
other_address_details VARCHAR(255)
)
CREATE TABLE Student_Addresses (
student_id INTEGER,
address_id INTEGER,
date_address_from DATETIME,
date_address_to DATETIME,
monthly_rental DECIMAL(19,4),
other_details VARCHAR(255)
) | SELECT student_id, address_id FROM Student_Addresses GROUP BY other_details 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: Show me about the correlation between student_id and address_id , and group by attribute other_details in a scatter chart. ### Input: CREATE TABLE Students (
student_id INTEGER,
address_id INTEGER,
first_name VARCHAR(80),
middle_name VARCHAR(40),
last_name VARCHAR(40),
cell_mobile_number VARCHAR(40),
email_address VARCHAR(40),
date_first_rental DATETIME,
date_left_university DATETIME,
other_student_details VARCHAR(255)
)
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 Ref_Address_Types (
address_type_code VARCHAR(15),
address_type_description VARCHAR(80)
)
CREATE TABLE Detention (
detention_id INTEGER,
detention_type_code VARCHAR(10),
teacher_id INTEGER,
datetime_detention_start DATETIME,
datetime_detention_end DATETIME,
detention_summary VARCHAR(255),
other_details VARCHAR(255)
)
CREATE TABLE Students_in_Detention (
student_id INTEGER,
detention_id INTEGER,
incident_id INTEGER
)
CREATE TABLE Ref_Incident_Type (
incident_type_code VARCHAR(10),
incident_type_description VARCHAR(80)
)
CREATE TABLE Teachers (
teacher_id INTEGER,
address_id INTEGER,
first_name VARCHAR(80),
middle_name VARCHAR(80),
last_name VARCHAR(80),
gender VARCHAR(1),
cell_mobile_number VARCHAR(40),
email_address VARCHAR(40),
other_details VARCHAR(255)
)
CREATE TABLE Behavior_Incident (
incident_id INTEGER,
incident_type_code VARCHAR(10),
student_id INTEGER,
date_incident_start DATETIME,
date_incident_end DATETIME,
incident_summary VARCHAR(255),
recommendations VARCHAR(255),
other_details VARCHAR(255)
)
CREATE TABLE Ref_Detention_Type (
detention_type_code VARCHAR(10),
detention_type_description VARCHAR(80)
)
CREATE TABLE Addresses (
address_id INTEGER,
line_1 VARCHAR(120),
line_2 VARCHAR(120),
line_3 VARCHAR(120),
city VARCHAR(80),
zip_postcode VARCHAR(20),
state_province_county VARCHAR(50),
country VARCHAR(50),
other_address_details VARCHAR(255)
)
CREATE TABLE Student_Addresses (
student_id INTEGER,
address_id INTEGER,
date_address_from DATETIME,
date_address_to DATETIME,
monthly_rental DECIMAL(19,4),
other_details VARCHAR(255)
) ### Response: SELECT student_id, address_id FROM Student_Addresses GROUP BY other_details ORDER BY monthly_rental DESC |
On what date did James II take a consort? | CREATE TABLE table_75321 (
"Name" text,
"Birth" text,
"Marriage" text,
"Became Consort" text,
"Coronation" text,
"Ceased to be Consort" text,
"Death" text,
"Spouse" text
) | SELECT "Became Consort" FROM table_75321 WHERE "Spouse" = 'james ii' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: On what date did James II take a consort? ### Input: CREATE TABLE table_75321 (
"Name" text,
"Birth" text,
"Marriage" text,
"Became Consort" text,
"Coronation" text,
"Ceased to be Consort" text,
"Death" text,
"Spouse" text
) ### Response: SELECT "Became Consort" FROM table_75321 WHERE "Spouse" = 'james ii' |
What date was the set 1 25 23, and a Set 3 of 25 14? | CREATE TABLE table_name_12 (
date VARCHAR,
set_1 VARCHAR,
set_3 VARCHAR
) | SELECT date FROM table_name_12 WHERE set_1 = "25–23" AND set_3 = "25–14" | 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 set 1 25 23, and a Set 3 of 25 14? ### Input: CREATE TABLE table_name_12 (
date VARCHAR,
set_1 VARCHAR,
set_3 VARCHAR
) ### Response: SELECT date FROM table_name_12 WHERE set_1 = "25–23" AND set_3 = "25–14" |
What year was player number 10? | CREATE TABLE table_31404 (
"Name" text,
"#" real,
"Position" text,
"Height" text,
"Weight ( lb. )" real,
"Year" text,
"Hometown" text,
"Previous School" text
) | SELECT "Year" FROM table_31404 WHERE "#" = '10' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What year was player number 10? ### Input: CREATE TABLE table_31404 (
"Name" text,
"#" real,
"Position" text,
"Height" text,
"Weight ( lb. )" real,
"Year" text,
"Hometown" text,
"Previous School" text
) ### Response: SELECT "Year" FROM table_31404 WHERE "#" = '10' |
What entrant had a Maserati 250F chassis and fewer than 6 points before 1957? | CREATE TABLE table_67242 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" real
) | SELECT "Entrant" FROM table_67242 WHERE "Chassis" = 'maserati 250f' AND "Year" < '1957' AND "Points" < '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 entrant had a Maserati 250F chassis and fewer than 6 points before 1957? ### Input: CREATE TABLE table_67242 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" real
) ### Response: SELECT "Entrant" FROM table_67242 WHERE "Chassis" = 'maserati 250f' AND "Year" < '1957' AND "Points" < '6' |
what is the heat when the athlete is anita pistone? | CREATE TABLE table_64388 (
"Rank" real,
"Heat" real,
"Athlete" text,
"Country" text,
"Time" real
) | SELECT SUM("Heat") FROM table_64388 WHERE "Athlete" = 'anita pistone' | 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 heat when the athlete is anita pistone? ### Input: CREATE TABLE table_64388 (
"Rank" real,
"Heat" real,
"Athlete" text,
"Country" text,
"Time" real
) ### Response: SELECT SUM("Heat") FROM table_64388 WHERE "Athlete" = 'anita pistone' |
When zachary sanders is the performer how many first aired are there? | CREATE TABLE table_73084 (
"Episode title" text,
"Subject" text,
"Music by" text,
"Lyrics by" text,
"Performed by" text,
"First aired" text
) | SELECT COUNT("First aired") FROM table_73084 WHERE "Performed by" = 'Zachary Sanders' | 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 zachary sanders is the performer how many first aired are there? ### Input: CREATE TABLE table_73084 (
"Episode title" text,
"Subject" text,
"Music by" text,
"Lyrics by" text,
"Performed by" text,
"First aired" text
) ### Response: SELECT COUNT("First aired") FROM table_73084 WHERE "Performed by" = 'Zachary Sanders' |
What is the production code for episode 96 in the series? | CREATE TABLE table_2818164_5 (
production_code INTEGER,
no_in_series VARCHAR
) | SELECT MIN(production_code) FROM table_2818164_5 WHERE no_in_series = "96" | 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 production code for episode 96 in the series? ### Input: CREATE TABLE table_2818164_5 (
production_code INTEGER,
no_in_series VARCHAR
) ### Response: SELECT MIN(production_code) FROM table_2818164_5 WHERE no_in_series = "96" |
Name the womens singles for raina tzvetkova petya nedelcheva | CREATE TABLE table_14903491_1 (
womens_singles VARCHAR,
womens_doubles VARCHAR
) | SELECT womens_singles FROM table_14903491_1 WHERE womens_doubles = "Raina Tzvetkova Petya Nedelcheva" | 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 womens singles for raina tzvetkova petya nedelcheva ### Input: CREATE TABLE table_14903491_1 (
womens_singles VARCHAR,
womens_doubles VARCHAR
) ### Response: SELECT womens_singles FROM table_14903491_1 WHERE womens_doubles = "Raina Tzvetkova Petya Nedelcheva" |
How many dates have a total points for race of 180? | CREATE TABLE table_23293785_2 (
date VARCHAR,
race_total_pts_ VARCHAR
) | SELECT COUNT(date) FROM table_23293785_2 WHERE race_total_pts_ = 180 | 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 dates have a total points for race of 180? ### Input: CREATE TABLE table_23293785_2 (
date VARCHAR,
race_total_pts_ VARCHAR
) ### Response: SELECT COUNT(date) FROM table_23293785_2 WHERE race_total_pts_ = 180 |
How many players had 6 180s? | CREATE TABLE table_23721 (
"Player" text,
"Played" real,
"Legs Won" real,
"Legs Lost" real,
"100+" real,
"140+" real,
"180s" real,
"High Checkout" real,
"3-dart Average" text
) | SELECT COUNT("Player") FROM table_23721 WHERE "180s" = '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: How many players had 6 180s? ### Input: CREATE TABLE table_23721 (
"Player" text,
"Played" real,
"Legs Won" real,
"Legs Lost" real,
"100+" real,
"140+" real,
"180s" real,
"High Checkout" real,
"3-dart Average" text
) ### Response: SELECT COUNT("Player") FROM table_23721 WHERE "180s" = '6' |
How many people in Stanthorpe had a population matching Rosenthan of 1,553 and a population greater than 25,917? | CREATE TABLE table_67960 (
"Year" real,
"Population (Region total)" real,
"Population (Stanthorpe)" real,
"Population (Warwick)" real,
"Population (Allora)" real,
"Population (Glengallan)" real,
"Population (Rosenthal)" real
) | SELECT COUNT("Population (Stanthorpe)") FROM table_67960 WHERE "Population (Rosenthal)" = '1,553' AND "Population (Region total)" > '25,917' | 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 in Stanthorpe had a population matching Rosenthan of 1,553 and a population greater than 25,917? ### Input: CREATE TABLE table_67960 (
"Year" real,
"Population (Region total)" real,
"Population (Stanthorpe)" real,
"Population (Warwick)" real,
"Population (Allora)" real,
"Population (Glengallan)" real,
"Population (Rosenthal)" real
) ### Response: SELECT COUNT("Population (Stanthorpe)") FROM table_67960 WHERE "Population (Rosenthal)" = '1,553' AND "Population (Region total)" > '25,917' |
What was the score for the match where the home team was Leicester City? | CREATE TABLE table_77276 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Attendance" text
) | SELECT "Score" FROM table_77276 WHERE "Home team" = 'leicester city' | 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 for the match where the home team was Leicester City? ### Input: CREATE TABLE table_77276 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Attendance" text
) ### Response: SELECT "Score" FROM table_77276 WHERE "Home team" = 'leicester city' |
What is the highest round for the Minnesota Junior Stars (Mjhl)? | CREATE TABLE table_39189 (
"Round" real,
"Player" text,
"Position" text,
"Nationality" text,
"College/Junior/Club Team (League)" text
) | SELECT MAX("Round") FROM table_39189 WHERE "College/Junior/Club Team (League)" = 'minnesota junior stars (mjhl)' | 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 highest round for the Minnesota Junior Stars (Mjhl)? ### Input: CREATE TABLE table_39189 (
"Round" real,
"Player" text,
"Position" text,
"Nationality" text,
"College/Junior/Club Team (League)" text
) ### Response: SELECT MAX("Round") FROM table_39189 WHERE "College/Junior/Club Team (League)" = 'minnesota junior stars (mjhl)' |
what was the opponent on november 14, 2005? | CREATE TABLE table_69928 (
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent" text,
"Score" text
) | SELECT "Opponent" FROM table_69928 WHERE "Date" = 'november 14, 2005' | 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 opponent on november 14, 2005? ### Input: CREATE TABLE table_69928 (
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent" text,
"Score" text
) ### Response: SELECT "Opponent" FROM table_69928 WHERE "Date" = 'november 14, 2005' |
which stadium has the largest number of seats ? | CREATE TABLE table_203_420 (
id number,
"#" number,
"stadium" text,
"capacity" number,
"city" text,
"home team" text
) | SELECT "stadium" FROM table_203_420 ORDER BY "capacity" 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 stadium has the largest number of seats ? ### Input: CREATE TABLE table_203_420 (
id number,
"#" number,
"stadium" text,
"capacity" number,
"city" text,
"home team" text
) ### Response: SELECT "stadium" FROM table_203_420 ORDER BY "capacity" DESC LIMIT 1 |
Which Centerfold model has a Date of 3-01? | CREATE TABLE table_name_54 (
centerfold_model VARCHAR,
date VARCHAR
) | SELECT centerfold_model FROM table_name_54 WHERE date = "3-01" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Centerfold model has a Date of 3-01? ### Input: CREATE TABLE table_name_54 (
centerfold_model VARCHAR,
date VARCHAR
) ### Response: SELECT centerfold_model FROM table_name_54 WHERE date = "3-01" |
WHich Tournament has a Finalist of marat safin (12)? | CREATE TABLE table_name_47 (
tournament VARCHAR,
finalist VARCHAR
) | SELECT tournament FROM table_name_47 WHERE finalist = "marat safin (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 Tournament has a Finalist of marat safin (12)? ### Input: CREATE TABLE table_name_47 (
tournament VARCHAR,
finalist VARCHAR
) ### Response: SELECT tournament FROM table_name_47 WHERE finalist = "marat safin (12)" |
What is the time/retired for grid 5? | CREATE TABLE table_name_8 (
time_retired VARCHAR,
grid VARCHAR
) | SELECT time_retired FROM table_name_8 WHERE grid = 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 time/retired for grid 5? ### Input: CREATE TABLE table_name_8 (
time_retired VARCHAR,
grid VARCHAR
) ### Response: SELECT time_retired FROM table_name_8 WHERE grid = 5 |
What film earmed p3.2 million on December 25? | CREATE TABLE table_29217650_1 (
movies VARCHAR,
december_25 VARCHAR
) | SELECT movies FROM table_29217650_1 WHERE december_25 = "P3.2 million" | 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 film earmed p3.2 million on December 25? ### Input: CREATE TABLE table_29217650_1 (
movies VARCHAR,
december_25 VARCHAR
) ### Response: SELECT movies FROM table_29217650_1 WHERE december_25 = "P3.2 million" |
What years had a manager who lost more than 1 and drawn more than 11? | CREATE TABLE table_32038 (
"Manager" text,
"Ukraine career" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Win %" real
) | SELECT "Ukraine career" FROM table_32038 WHERE "Lost" > '1' AND "Drawn" > '11' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What years had a manager who lost more than 1 and drawn more than 11? ### Input: CREATE TABLE table_32038 (
"Manager" text,
"Ukraine career" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Win %" real
) ### Response: SELECT "Ukraine career" FROM table_32038 WHERE "Lost" > '1' AND "Drawn" > '11' |
What is the NHL team of dave murphy? | CREATE TABLE table_5868 (
"Pick #" text,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
) | SELECT "NHL team" FROM table_5868 WHERE "Player" = 'dave murphy' | 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 of dave murphy? ### Input: CREATE TABLE table_5868 (
"Pick #" text,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
) ### Response: SELECT "NHL team" FROM table_5868 WHERE "Player" = 'dave murphy' |
Which Round has a Club team of brandon wheat kings (whl)? | CREATE TABLE table_12077 (
"Round" real,
"Overall" text,
"Player" text,
"Position" text,
"Nationality" text,
"Club team" text
) | SELECT "Round" FROM table_12077 WHERE "Club team" = 'brandon wheat kings (whl)' | 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 Round has a Club team of brandon wheat kings (whl)? ### Input: CREATE TABLE table_12077 (
"Round" real,
"Overall" text,
"Player" text,
"Position" text,
"Nationality" text,
"Club team" text
) ### Response: SELECT "Round" FROM table_12077 WHERE "Club team" = 'brandon wheat kings (whl)' |
Name the authority for morrinsville college | CREATE TABLE table_name_88 (
authority VARCHAR,
name VARCHAR
) | SELECT authority FROM table_name_88 WHERE name = "morrinsville college" | 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 authority for morrinsville college ### Input: CREATE TABLE table_name_88 (
authority VARCHAR,
name VARCHAR
) ### Response: SELECT authority FROM table_name_88 WHERE name = "morrinsville college" |
What kind of Week 4 has a Week 9 of all housemates? | CREATE TABLE table_name_50 (
week_4 VARCHAR,
week_9 VARCHAR
) | SELECT week_4 FROM table_name_50 WHERE week_9 = "all housemates" | 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 kind of Week 4 has a Week 9 of all housemates? ### Input: CREATE TABLE table_name_50 (
week_4 VARCHAR,
week_9 VARCHAR
) ### Response: SELECT week_4 FROM table_name_50 WHERE week_9 = "all housemates" |
which school has placed fourth the most times ? | CREATE TABLE table_203_502 (
id number,
"team" text,
"titles" number,
"runner-up" number,
"third place" number,
"fourth place" number,
"years participated" number
) | SELECT "team" FROM table_203_502 ORDER BY "fourth place" 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 school has placed fourth the most times ? ### Input: CREATE TABLE table_203_502 (
id number,
"team" text,
"titles" number,
"runner-up" number,
"third place" number,
"fourth place" number,
"years participated" number
) ### Response: SELECT "team" FROM table_203_502 ORDER BY "fourth place" DESC LIMIT 1 |
What is Class, when Dates is '22 April - 3 May 2009'? | CREATE TABLE table_49604 (
"Place" text,
"Country" text,
"Qualifying Grand Prix" text,
"Class" text,
"Dates" text
) | SELECT "Class" FROM table_49604 WHERE "Dates" = '22 april - 3 may 2009' | 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 Class, when Dates is '22 April - 3 May 2009'? ### Input: CREATE TABLE table_49604 (
"Place" text,
"Country" text,
"Qualifying Grand Prix" text,
"Class" text,
"Dates" text
) ### Response: SELECT "Class" FROM table_49604 WHERE "Dates" = '22 april - 3 may 2009' |
Name the highest silver for table tennis and bronze more than 0 | CREATE TABLE table_54383 (
"Rank" text,
"Sport" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT MAX("Silver") FROM table_54383 WHERE "Sport" = 'table tennis' AND "Bronze" > '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: Name the highest silver for table tennis and bronze more than 0 ### Input: CREATE TABLE table_54383 (
"Rank" text,
"Sport" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) ### Response: SELECT MAX("Silver") FROM table_54383 WHERE "Sport" = 'table tennis' AND "Bronze" > '0' |
how many years were they in tier 3 | CREATE TABLE table_203_231 (
id number,
"season" text,
"tier" number,
"division" text,
"place" text
) | SELECT COUNT("season") FROM table_203_231 WHERE "tier" = 3 | 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 years were they in tier 3 ### Input: CREATE TABLE table_203_231 (
id number,
"season" text,
"tier" number,
"division" text,
"place" text
) ### Response: SELECT COUNT("season") FROM table_203_231 WHERE "tier" = 3 |
What are the market city/market(s) for Rapid City Alternative format? | CREATE TABLE table_134987_3 (
target_city__market VARCHAR,
city_of_license VARCHAR,
format VARCHAR
) | SELECT target_city__market FROM table_134987_3 WHERE city_of_license = "Rapid City" AND format = "Alternative" | 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 market city/market(s) for Rapid City Alternative format? ### Input: CREATE TABLE table_134987_3 (
target_city__market VARCHAR,
city_of_license VARCHAR,
format VARCHAR
) ### Response: SELECT target_city__market FROM table_134987_3 WHERE city_of_license = "Rapid City" AND format = "Alternative" |
Find questions that were closed and have body like 'How do I get started'. | CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense text
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDate time,
ApprovalModeratorId number,
DeactivationDate time,
DeactivationModeratorId number
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
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 PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
) | SELECT COUNT(q.Id) FROM Posts AS q INNER JOIN PostHistory AS ph ON q.Id = ph.PostId WHERE q.PostTypeId = 1 AND NOT ClosedDate IS NULL AND q.Body LIKE '%started%' | sede | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find questions that were closed and have body like 'How do I get started'. ### Input: CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense text
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDate time,
ApprovalModeratorId number,
DeactivationDate time,
DeactivationModeratorId number
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
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 PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
) ### Response: SELECT COUNT(q.Id) FROM Posts AS q INNER JOIN PostHistory AS ph ON q.Id = ph.PostId WHERE q.PostTypeId = 1 AND NOT ClosedDate IS NULL AND q.Body LIKE '%started%' |
list the top four most common drugs that patients were prescribed with in the same hospital visit after they were prescribed with ns 0.9% since 2102. | CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
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,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
) | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime, patient.patienthealthsystemstayid FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'ns 0.9%' AND STRFTIME('%y', medication.drugstarttime) >= '2102') AS t1 JOIN (SELECT patient.uniquepid, medication.drugname, medication.drugstarttime, patient.patienthealthsystemstayid FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE STRFTIME('%y', medication.drugstarttime) >= '2102') AS t2 ON t1.uniquepid = t2.uniquepid WHERE t1.drugstarttime < t2.drugstarttime AND t1.patienthealthsystemstayid = t2.patienthealthsystemstayid GROUP BY t2.drugname) AS t3 WHERE t3.c1 <= 4 | 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: list the top four most common drugs that patients were prescribed with in the same hospital visit after they were prescribed with ns 0.9% since 2102. ### Input: CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
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,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
) ### Response: SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime, patient.patienthealthsystemstayid FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'ns 0.9%' AND STRFTIME('%y', medication.drugstarttime) >= '2102') AS t1 JOIN (SELECT patient.uniquepid, medication.drugname, medication.drugstarttime, patient.patienthealthsystemstayid FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE STRFTIME('%y', medication.drugstarttime) >= '2102') AS t2 ON t1.uniquepid = t2.uniquepid WHERE t1.drugstarttime < t2.drugstarttime AND t1.patienthealthsystemstayid = t2.patienthealthsystemstayid GROUP BY t2.drugname) AS t3 WHERE t3.c1 <= 4 |
which city is served by the most full power stations ? | CREATE TABLE table_204_12 (
id number,
"area served" text,
"city of license" text,
"vc" number,
"rf" number,
"callsign" text,
"network" text,
"notes" text
) | SELECT "city of license" FROM table_204_12 GROUP BY "city of license" ORDER BY COUNT(*) 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 city is served by the most full power stations ? ### Input: CREATE TABLE table_204_12 (
id number,
"area served" text,
"city of license" text,
"vc" number,
"rf" number,
"callsign" text,
"network" text,
"notes" text
) ### Response: SELECT "city of license" FROM table_204_12 GROUP BY "city of license" ORDER BY COUNT(*) DESC LIMIT 1 |
find out the average age of elective admission patients who stayed in the hospital for 16 days. | 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,
route text,
drug_dose 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 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 text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT AVG(demographic.age) FROM demographic WHERE demographic.admission_type = "ELECTIVE" AND demographic.days_stay = "16" | 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: find out the average age of elective admission patients who stayed in the hospital for 16 days. ### Input: 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,
route text,
drug_dose 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 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 text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) ### Response: SELECT AVG(demographic.age) FROM demographic WHERE demographic.admission_type = "ELECTIVE" AND demographic.days_stay = "16" |
List the name, IHSAA Football Class, and Mascot of the schools that have more than 6000 of budgeted amount or were founded before 2003, in the order of percent of total invested budget and total budgeted budget. | CREATE TABLE school (
School_name VARCHAR,
Mascot VARCHAR,
IHSAA_Football_Class VARCHAR,
school_id VARCHAR
)
CREATE TABLE budget (
school_id VARCHAR,
total_budget_percent_invested VARCHAR,
total_budget_percent_budgeted VARCHAR
) | SELECT T1.School_name, T1.Mascot, T1.IHSAA_Football_Class FROM school AS T1 JOIN budget AS T2 ON T1.school_id = T2.school_id WHERE Budgeted > 6000 OR YEAR < 2003 ORDER BY T2.total_budget_percent_invested, T2.total_budget_percent_budgeted | 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: List the name, IHSAA Football Class, and Mascot of the schools that have more than 6000 of budgeted amount or were founded before 2003, in the order of percent of total invested budget and total budgeted budget. ### Input: CREATE TABLE school (
School_name VARCHAR,
Mascot VARCHAR,
IHSAA_Football_Class VARCHAR,
school_id VARCHAR
)
CREATE TABLE budget (
school_id VARCHAR,
total_budget_percent_invested VARCHAR,
total_budget_percent_budgeted VARCHAR
) ### Response: SELECT T1.School_name, T1.Mascot, T1.IHSAA_Football_Class FROM school AS T1 JOIN budget AS T2 ON T1.school_id = T2.school_id WHERE Budgeted > 6000 OR YEAR < 2003 ORDER BY T2.total_budget_percent_invested, T2.total_budget_percent_budgeted |
What day had 37,500 attending? | CREATE TABLE table_name_56 (
date VARCHAR,
attendance VARCHAR
) | SELECT date FROM table_name_56 WHERE attendance = "37,500" | 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 day had 37,500 attending? ### Input: CREATE TABLE table_name_56 (
date VARCHAR,
attendance VARCHAR
) ### Response: SELECT date FROM table_name_56 WHERE attendance = "37,500" |
What is the S sk n village with a Malax village me ba ? | CREATE TABLE table_name_25 (
süskən VARCHAR,
malax VARCHAR
) | SELECT süskən FROM table_name_25 WHERE malax = "meşəbaş" | 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 S sk n village with a Malax village me ba ? ### Input: CREATE TABLE table_name_25 (
süskən VARCHAR,
malax VARCHAR
) ### Response: SELECT süskən FROM table_name_25 WHERE malax = "meşəbaş" |
What was the attendance for the game against the Houston Oilers? | CREATE TABLE table_48494 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) | SELECT "Attendance" FROM table_48494 WHERE "Opponent" = 'houston oilers' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the attendance for the game against the Houston Oilers? ### Input: CREATE TABLE table_48494 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) ### Response: SELECT "Attendance" FROM table_48494 WHERE "Opponent" = 'houston oilers' |
What is the away team that features a home team of south melbourne? | CREATE TABLE table_4871 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Away team score" FROM table_4871 WHERE "Home team" = 'south 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: What is the away team that features a home team of south melbourne? ### Input: CREATE TABLE table_4871 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) ### Response: SELECT "Away team score" FROM table_4871 WHERE "Home team" = 'south melbourne' |
what was the location for charlotte? | CREATE TABLE table_29836 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT "Location Attendance" FROM table_29836 WHERE "Team" = 'Charlotte' | 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 location for charlotte? ### Input: CREATE TABLE table_29836 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) ### Response: SELECT "Location Attendance" FROM table_29836 WHERE "Team" = 'Charlotte' |
What is the Crowd number for the Away team of Richmond? | CREATE TABLE table_name_41 (
crowd INTEGER,
away_team VARCHAR
) | SELECT SUM(crowd) FROM table_name_41 WHERE away_team = "richmond" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the Crowd number for the Away team of Richmond? ### Input: CREATE TABLE table_name_41 (
crowd INTEGER,
away_team VARCHAR
) ### Response: SELECT SUM(crowd) FROM table_name_41 WHERE away_team = "richmond" |
who directed the episode that elaine ko wrote? | CREATE TABLE table_29437 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (millions)" text
) | SELECT "Directed by" FROM table_29437 WHERE "Written by" = 'Elaine Ko' | 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 directed the episode that elaine ko wrote? ### Input: CREATE TABLE table_29437 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (millions)" text
) ### Response: SELECT "Directed by" FROM table_29437 WHERE "Written by" = 'Elaine Ko' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.