instruction stringlengths 11 303 | input stringlengths 38 5.51k | output stringlengths 25 1.92k | text stringlengths 321 6.52k |
|---|---|---|---|
Plot a scatter chart, sum(number of platforms) by sum total passengers. | CREATE TABLE train_station (
Train_ID int,
Station_ID int
)
CREATE TABLE train (
Train_ID int,
Name text,
Time text,
Service text
)
CREATE TABLE station (
Station_ID int,
Name text,
Annual_entry_exit real,
Annual_interchanges real,
Total_Passengers real,
Location text,
... | SELECT SUM(Number_of_Platforms), SUM(Total_Passengers) FROM station GROUP BY Location | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Plot a scatter chart, sum(number of platforms) by sum total passengers. ### Input: CREATE TABLE train_station (
Train_ID... |
Show the total number of passengers of each location in a bar chart. | CREATE TABLE train_station (
Train_ID int,
Station_ID int
)
CREATE TABLE train (
Train_ID int,
Name text,
Time text,
Service text
)
CREATE TABLE station (
Station_ID int,
Name text,
Annual_entry_exit real,
Annual_interchanges real,
Total_Passengers real,
Location text,
... | SELECT Location, SUM(Total_Passengers) FROM station GROUP BY Location | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show the total number of passengers of each location in a bar chart. ### Input: CREATE TABLE train_station (
Train_ID in... |
provide the number of patients whose admission year is less than 2139 and lab test name is bilirubin, indirect? | 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
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2139" AND lab.label = "Bilirubin, Indirect" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide the number of patients whose admission year is less than 2139 and lab test name is bilirubin, indirect? ### Input: C... |
What is the number of goals against when the played is more than 38? | CREATE TABLE table_name_19 (
goals_against VARCHAR,
played INTEGER
) | SELECT COUNT(goals_against) FROM table_name_19 WHERE played > 38 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the number of goals against when the played is more than 38? ### Input: CREATE TABLE table_name_19 (
goals_again... |
What Home team has an away score of 6.6 (42)? | CREATE TABLE table_54879 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Date" text
) | SELECT "Home team score" FROM table_54879 WHERE "Away team score" = '6.6 (42)' | Below are sql tables 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 Home team has an away score of 6.6 (42)? ### Input: CREATE TABLE table_54879 (
"Home team" text,
"Home team sco... |
what is discharge location and discharge time of subject id 7273? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT demographic.discharge_location, demographic.dischtime FROM demographic WHERE demographic.subject_id = "7273" | Below are sql tables 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 7273? ### Input: CREATE TABLE demographic (
subject_id text,... |
Who was in the three darts challenge that aired on 10 may 2010? | CREATE TABLE table_28984 (
"Episode Number" real,
"Air Date" text,
"Guests" text,
"Three Darts Challenge" text,
"Musical Performance" text
) | SELECT "Three Darts Challenge" FROM table_28984 WHERE "Air Date" = '10 May 2010' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who was in the three darts challenge that aired on 10 may 2010? ### Input: CREATE TABLE table_28984 (
"Episode Number" r... |
Return a bar chart on what are the names and distances for all airplanes? | CREATE TABLE employee (
eid number(9,0),
name varchar2(30),
salary number(10,2)
)
CREATE TABLE flight (
flno number(4,0),
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0)
)
CREATE... | SELECT name, distance FROM aircraft | Below are sql tables 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 names and distances for all airplanes? ### Input: CREATE TABLE employee (
eid number(... |
For those employees who do not work in departments with managers that have ids between 100 and 200, show me about the distribution of phone_number and salary in a bar chart, I want to list by the Y-axis in descending please. | CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decima... | SELECT PHONE_NUMBER, SALARY FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY SALARY DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who do not work in departments with managers that have ids between 100 and 200, show me about the distri... |
On what date was Keiichi Ubukata the mediator and Mitsuko Mori the red team host? | CREATE TABLE table_1315616_1 (
date VARCHAR,
mediator VARCHAR,
red_team_host VARCHAR
) | SELECT date FROM table_1315616_1 WHERE mediator = "Keiichi Ubukata" AND red_team_host = "Mitsuko Mori" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: On what date was Keiichi Ubukata the mediator and Mitsuko Mori the red team host? ### Input: CREATE TABLE table_1315616_1 (
... |
what is the number of patients whose gender is f and discharge location is long term care hospital? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.discharge_location = "LONG TERM CARE HOSPITAL" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the number of patients whose gender is f and discharge location is long term care hospital? ### Input: CREATE TABLE ... |
does flight UA 270 from DENVER to PHILADELPHIA have a meal | CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE dual_carrier (
main_airline varchar,... | SELECT DISTINCT food_service.compartment, food_service.meal_code, food_service.meal_number FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight, food_service WHERE ((CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND CITY... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: does flight UA 270 from DENVER to PHILADELPHIA have a meal ### Input: CREATE TABLE city (
city_code varchar,
city_na... |
how many patients are diagnosed with other psoriasis? | 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 demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.long_title = "Other psoriasis" | Below are sql tables 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 are diagnosed with other psoriasis? ### Input: CREATE TABLE diagnoses (
subject_id text,
hadm_id t... |
what is the number of patients whose year of death is less than or equal to 2165 and item id is 51098? | 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... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dod_year <= "2165.0" AND lab.itemid = "51098" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the number of patients whose year of death is less than or equal to 2165 and item id is 51098? ### Input: CREATE TAB... |
I want the average bronze for total of 19 and silver of 8 with rank of 31 | CREATE TABLE table_name_12 (
bronze INTEGER,
rank VARCHAR,
total VARCHAR,
silver VARCHAR
) | SELECT AVG(bronze) FROM table_name_12 WHERE total = 19 AND silver = 8 AND rank = "31" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: I want the average bronze for total of 19 and silver of 8 with rank of 31 ### Input: CREATE TABLE table_name_12 (
bronze... |
What is the lowest game number on 20 July 2008? | CREATE TABLE table_name_33 (
game INTEGER,
date VARCHAR
) | SELECT MIN(game) FROM table_name_33 WHERE date = "20 july 2008" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the lowest game number on 20 July 2008? ### Input: CREATE TABLE table_name_33 (
game INTEGER,
date VARCHAR
)... |
What is the smallest total number of medals for rank 11 and more than 0 silver medals? | CREATE TABLE table_42386 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT MIN("Total") FROM table_42386 WHERE "Rank" = '11' AND "Silver" > '0' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the smallest total number of medals for rank 11 and more than 0 silver medals? ### Input: CREATE TABLE table_42386 (... |
How many documents are created in each day? Bin the document date by year interval and group by document type description with a group line chart, and list in desc by the x axis. | CREATE TABLE Documents (
Document_ID INTEGER,
Document_Type_Code CHAR(15),
Project_ID INTEGER,
Document_Date DATETIME,
Document_Name VARCHAR(255),
Document_Description VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_... | SELECT Document_Date, COUNT(Document_Date) FROM Ref_Document_Types AS T1 JOIN Documents AS T2 ON T1.Document_Type_Code = T2.Document_Type_Code GROUP BY Document_Type_Description ORDER BY Document_Date DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many documents are created in each day? Bin the document date by year interval and group by document type description wi... |
what flights leave SAN FRANCISCO on monday night and arrive at ATLANTA later in the evening | CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
C... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ((((flight.arrival_time <= 2400 AND flight.arrival_time >= 1800) AND date_day.day_number = 21 AND date_day.month_number = 2 AND date_day.year = 1... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what flights leave SAN FRANCISCO on monday night and arrive at ATLANTA later in the evening ### Input: CREATE TABLE month (
... |
What number episode in the series was watched by 15.89 million U.S. viewers? | CREATE TABLE table_22078906_2 (
no_in_series VARCHAR,
us_viewers__millions_ VARCHAR
) | SELECT no_in_series FROM table_22078906_2 WHERE us_viewers__millions_ = "15.89" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What number episode in the series was watched by 15.89 million U.S. viewers? ### Input: CREATE TABLE table_22078906_2 (
... |
What is the lowest population for the area that has a density of 36.7? | CREATE TABLE table_name_89 (
population__2011_ INTEGER,
density__inhabitants_km_2__ VARCHAR
) | SELECT MIN(population__2011_) FROM table_name_89 WHERE density__inhabitants_km_2__ = 36.7 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the lowest population for the area that has a density of 36.7? ### Input: CREATE TABLE table_name_89 (
populatio... |
For those employees who did not have any job in the past, show me about the distribution of hire_date and the average of department_id bin hire_date by time in a bar chart, and display in descending by the the average of department id. | CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL v... | SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY AVG(DEPARTMENT_ID) DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who did not have any job in the past, show me about the distribution of hire_date and the average of dep... |
What are the hometowns of gymnasts and the corresponding number of gymnasts, and rank y-axis in ascending order. | CREATE TABLE people (
People_ID int,
Name text,
Age real,
Height real,
Hometown text
)
CREATE TABLE gymnast (
Gymnast_ID int,
Floor_Exercise_Points real,
Pommel_Horse_Points real,
Rings_Points real,
Vault_Points real,
Parallel_Bars_Points real,
Horizontal_Bar_Points real... | SELECT Hometown, COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown ORDER BY COUNT(*) | Below are sql tables 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 hometowns of gymnasts and the corresponding number of gymnasts, and rank y-axis in ascending order. ### Input: ... |
what is the first song on this album ? | CREATE TABLE table_204_573 (
id number,
"#" number,
"title" text,
"performer(s)" text,
"film" text,
"length" text
) | SELECT "title" FROM table_204_573 WHERE "#" = 1 | Below are sql tables 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 first song on this album ? ### Input: CREATE TABLE table_204_573 (
id number,
"#" number,
"title" te... |
what is the total number of racers who finished under 6:00.00 ? | CREATE TABLE table_204_262 (
id number,
"rank" number,
"athlete" text,
"time" text,
"notes" text,
"q" text
) | SELECT COUNT("athlete") FROM table_204_262 WHERE "time" < 6 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the total number of racers who finished under 6:00.00 ? ### Input: CREATE TABLE table_204_262 (
id number,
"... |
What date was the visitor chicago black hawks, and a Record of 1-1? | CREATE TABLE table_34202 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Record" text
) | SELECT "Date" FROM table_34202 WHERE "Visitor" = 'chicago black hawks' AND "Record" = '1-1' | Below are sql tables 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 visitor chicago black hawks, and a Record of 1-1? ### Input: CREATE TABLE table_34202 (
"Date" text,
... |
What was the finish for the golfer with a total of 285? | CREATE TABLE table_50675 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" real,
"To par" text,
"Finish" text
) | SELECT "Finish" FROM table_50675 WHERE "Total" = '285' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the finish for the golfer with a total of 285? ### Input: CREATE TABLE table_50675 (
"Player" text,
"Countr... |
how many hours have elapsed since patient 027-142451 first received an intake of continuous infusion meds on the current intensive care unit visit? | CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', intakeoutput.intakeoutputtime)) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid ... | Below are sql tables 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 hours have elapsed since patient 027-142451 first received an intake of continuous infusion meds on the current int... |
What is the county with an AA IHSAA class in ferdinand? | CREATE TABLE table_name_90 (
county VARCHAR,
ihsaa_class VARCHAR,
location VARCHAR
) | SELECT county FROM table_name_90 WHERE ihsaa_class = "aa" AND location = "ferdinand" | Below are sql tables 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 county with an AA IHSAA class in ferdinand? ### Input: CREATE TABLE table_name_90 (
county VARCHAR,
ihsa... |
Return a scatter chart about the correlation between CID and DNO . | CREATE TABLE Enrolled_in (
StuID INTEGER,
CID VARCHAR(7),
Grade VARCHAR(2)
)
CREATE TABLE Faculty (
FacID INTEGER,
Lname VARCHAR(15),
Fname VARCHAR(15),
Rank VARCHAR(15),
Sex VARCHAR(1),
Phone INTEGER,
Room VARCHAR(5),
Building VARCHAR(13)
)
CREATE TABLE Student (
StuID... | SELECT CID, DNO FROM Course ORDER BY Credits | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Return a scatter chart about the correlation between CID and DNO . ### Input: CREATE TABLE Enrolled_in (
StuID INTEGER,
... |
Find the average age of all students living in the each city Show bar chart, show in desc by the Y-axis. | CREATE TABLE Dorm (
dormid INTEGER,
dorm_name VARCHAR(20),
student_capacity INTEGER,
gender VARCHAR(1)
)
CREATE TABLE Has_amenity (
dormid INTEGER,
amenid INTEGER
)
CREATE TABLE Dorm_amenity (
amenid INTEGER,
amenity_name VARCHAR(25)
)
CREATE TABLE Lives_in (
stuid INTEGER,
do... | SELECT city_code, AVG(Age) FROM Student GROUP BY city_code ORDER BY AVG(Age) DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find the average age of all students living in the each city Show bar chart, show in desc by the Y-axis. ### Input: CREATE T... |
Visualize a bar chart about the distribution of All_Home and the sum of Team_ID , and group by attribute All_Home. | CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | SELECT All_Home, SUM(Team_ID) FROM basketball_match GROUP BY All_Home | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Visualize a bar chart about the distribution of All_Home and the sum of Team_ID , and group by attribute All_Home. ### Input... |
Where was the tournament played on Oct. 8, 2006? | CREATE TABLE table_name_56 (
tournament VARCHAR,
date VARCHAR
) | SELECT tournament FROM table_name_56 WHERE date = "oct. 8, 2006" | Below are sql tables 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 was the tournament played on Oct. 8, 2006? ### Input: CREATE TABLE table_name_56 (
tournament VARCHAR,
date VA... |
What is the Years as tallest of the Building with a Height ft (m) of 145 (44)? | CREATE TABLE table_61373 (
"Name" text,
"Street address" text,
"Years as tallest" text,
"Height ft (m)" text,
"Floors" real
) | SELECT "Years as tallest" FROM table_61373 WHERE "Height ft (m)" = '145 (44)' | Below are sql tables 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 Years as tallest of the Building with a Height ft (m) of 145 (44)? ### Input: CREATE TABLE table_61373 (
"Na... |
Name the college for dl | CREATE TABLE table_28059992_2 (
college VARCHAR,
position VARCHAR
) | SELECT college FROM table_28059992_2 WHERE position = "DL" | Below are sql tables 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 college for dl ### Input: CREATE TABLE table_28059992_2 (
college VARCHAR,
position VARCHAR
) ### Response:... |
Which Tie is from birmingham city? | CREATE TABLE table_name_97 (
tie_no VARCHAR,
home_team VARCHAR
) | SELECT tie_no FROM table_name_97 WHERE home_team = "birmingham city" | Below are sql tables 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 Tie is from birmingham city? ### Input: CREATE TABLE table_name_97 (
tie_no VARCHAR,
home_team VARCHAR
) ### R... |
what was the three most frequently taken test since 6 years ago for patients with age 20s? | CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number... | SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t1.itemid FROM (SELECT labevents.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age BETWEEN 20 AND 29) AND DATETIME(labevents.chartti... | Below are sql tables 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 three most frequently taken test since 6 years ago for patients with age 20s? ### Input: CREATE TABLE labevents... |
Top 1000 users from India. | CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Bod... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, Location FROM Users WHERE LOWER(Location) LIKE '%india%' OR UPPER(Location) LIKE '%INDIA%' OR Location LIKE '%india%' AND Reputation >= 10000 ORDER BY Reputation DESC LIMIT 1000 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Top 1000 users from India. ### Input: CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDat... |
A bar chart about how many eliminations did each team have? | CREATE TABLE Elimination (
Elimination_ID text,
Wrestler_ID text,
Team text,
Eliminated_By text,
Elimination_Move text,
Time text
)
CREATE TABLE wrestler (
Wrestler_ID int,
Name text,
Reign text,
Days_held text,
Location text,
Event text
) | SELECT Team, COUNT(*) FROM Elimination GROUP BY Team | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: A bar chart about how many eliminations did each team have? ### Input: CREATE TABLE Elimination (
Elimination_ID text,
... |
what flights from MIAMI to INDIANAPOLIS | CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
one_direction_cost int,
round_trip_cost int,
round_trip_req... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'MIAMI' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'INDIANAP... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what flights from MIAMI to INDIANAPOLIS ### Input: CREATE TABLE time_interval (
period text,
begin_time int,
end... |
For those products with a price between 60 and 120, give me a pie chart to reflect the proportion of name and manufacturer. | CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | SELECT Name, Manufacturer FROM Products WHERE Price BETWEEN 60 AND 120 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those products with a price between 60 and 120, give me a pie chart to reflect the proportion of name and manufacturer. ... |
Who was the game on July 12 played against? | CREATE TABLE table_23324 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location" text,
"Record" text
) | SELECT "Opponent" FROM table_23324 WHERE "Date" = 'July 12' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who was the game on July 12 played against? ### Input: CREATE TABLE table_23324 (
"Game" real,
"Date" text,
"Opp... |
what are the four most frequently prescribed medications for patients who were also prescribed with chlorthalidone at the same time until 2104? | CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE chartevents (
row_id nu... | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'chlorthalidone' AND STRFTIME('%y', prescriptions.startdate) <= '2... | Below are sql tables 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 four most frequently prescribed medications for patients who were also prescribed with chlorthalidone at the sa... |
Why did the manager who departed on August 1, 2008 leave? | CREATE TABLE table_62879 (
"Team" text,
"Outgoing manager" text,
"Date Outgoing" text,
"Reason of departure" text,
"Replaced by" text,
"Date of Replacement" text
) | SELECT "Reason of departure" FROM table_62879 WHERE "Date Outgoing" = 'august 1, 2008' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Why did the manager who departed on August 1, 2008 leave? ### Input: CREATE TABLE table_62879 (
"Team" text,
"Outgoi... |
What are the completion dates of all the tests that have result 'Fail', and count them by a bar chart, and display Y from high to low order. | CREATE TABLE Student_Course_Enrolment (
registration_id INTEGER,
student_id INTEGER,
course_id INTEGER,
date_of_enrolment DATETIME,
date_of_completion DATETIME
)
CREATE TABLE Subjects (
subject_id INTEGER,
subject_name VARCHAR(120)
)
CREATE TABLE Course_Authors_and_Tutors (
author_id I... | SELECT date_of_completion, COUNT(date_of_completion) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Fail" ORDER BY COUNT(date_of_completion) DESC | Below are sql tables 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 completion dates of all the tests that have result 'Fail', and count them by a bar chart, and display Y from hi... |
did warfarin, albuterol mdi, or glucagon be prescribed for patient 24971 on the last hospital encounter? | CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,... | SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 24971 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) AND prescriptions.drug IN ('warfarin', 'albuterol mdi', 'glucagon') | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: did warfarin, albuterol mdi, or glucagon be prescribed for patient 24971 on the last hospital encounter? ### Input: CREATE T... |
what is your last trip from WASHINGTON to BOSTON on 8 27 | CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_descriptio... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND date_day.day_number = 27 AND date_day.month_number = 8 AND d... | Below are sql tables 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 your last trip from WASHINGTON to BOSTON on 8 27 ### Input: CREATE TABLE code_description (
code varchar,
de... |
how many patients whose admission type is urgent and lab test name is amylase, body fluid? | 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... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "URGENT" AND lab.label = "Amylase, Body Fluid" | Below are sql tables 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 admission type is urgent and lab test name is amylase, body fluid? ### Input: CREATE TABLE lab (
... |
Which is the number of the episode 'rook gave' 'r ku d o' ( ) which aired on July 14, 2003 | CREATE TABLE table_17481974_1 (
episode__number INTEGER,
original_airdate VARCHAR
) | SELECT MIN(episode__number) FROM table_17481974_1 WHERE original_airdate = "July 14, 2003" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which is the number of the episode 'rook gave' 'r ku d o' ( ) which aired on July 14, 2003 ### Input: CREATE TABLE table_174... |
Do all senior level classes require exams ? | CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE ... | 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%' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Do all senior level classes require exams ? ### Input: CREATE TABLE semester (
semester_id int,
semester varchar,
... |
What capital's county had a population of 730129 as of 2009? | CREATE TABLE table_20668 (
"Code" real,
"County" text,
"Former Province" text,
"Area (km 2 )" text,
"Population Census 2009" real,
"Capital" text
) | SELECT "Capital" FROM table_20668 WHERE "Population Census 2009" = '730129' | Below are sql tables 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 capital's county had a population of 730129 as of 2009? ### Input: CREATE TABLE table_20668 (
"Code" real,
"Cou... |
how many male patients have stayed in the hospital for 23 days? | 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 demographic (... | SELECT MIN(demographic.age) FROM demographic WHERE demographic.gender = "M" AND demographic.days_stay = "23" | Below are sql tables 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 male patients have stayed in the hospital for 23 days? ### Input: CREATE TABLE diagnoses (
subject_id text,
... |
Give me the comparison about the sum of School_ID over the ACC_Road , and group by attribute ACC_Road, display in desc by the x axis. | CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | SELECT ACC_Road, SUM(School_ID) FROM basketball_match GROUP BY ACC_Road ORDER BY ACC_Road DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Give me the comparison about the sum of School_ID over the ACC_Road , and group by attribute ACC_Road, display in desc by th... |
until 01/2105 when patient 002-10724 last received a lab test? | CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
... | SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-10724')) AND STRFTIME('%y-%m', lab.labresulttime) <= '2105-01' ORDER BY lab.lab... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: until 01/2105 when patient 002-10724 last received a lab test? ### Input: CREATE TABLE intakeoutput (
intakeoutputid num... |
For all employees who have the letters D or S in their first name, give me the comparison about the average of manager_id over the job_id , and group by attribute job_id by a bar chart, and sort from low to high by the y axis please. | CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,... | SELECT JOB_ID, AVG(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY AVG(MANAGER_ID) | Below are sql tables 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 all employees who have the letters D or S in their first name, give me the comparison about the average of manager_id ov... |
What are the names of all the Japanese constructors that have earned more than 5 points, and count them by a bar chart | CREATE TABLE seasons (
year INTEGER,
url TEXT
)
CREATE TABLE driverStandings (
driverStandingsId INTEGER,
raceId INTEGER,
driverId INTEGER,
points REAL,
position INTEGER,
positionText TEXT,
wins INTEGER
)
CREATE TABLE constructorStandings (
constructorStandingsId INTEGER,
r... | SELECT name, COUNT(name) FROM constructors AS T1 JOIN constructorStandings AS T2 ON T1.constructorId = T2.constructorId WHERE T1.nationality = "Japanese" AND T2.points > 5 GROUP BY name | Below are sql tables 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 names of all the Japanese constructors that have earned more than 5 points, and count them by a bar chart ### I... |
what is the one thing patient 86792 was diagnosed with on the last hospital visit for the last time? | CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,... | SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT diagnoses_icd.icd9_code FROM diagnoses_icd WHERE diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 86792 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime D... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the one thing patient 86792 was diagnosed with on the last hospital visit for the last time? ### Input: CREATE TABLE... |
what were the three specimen tests that were most frequently given to patients that were previously diagnosed with constrictiv pericarditis within the same hospital visit the last year? | CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype tex... | SELECT t3.spec_type_desc FROM (SELECT t2.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnos... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what were the three specimen tests that were most frequently given to patients that were previously diagnosed with constrict... |
Who made the decision when atlanta was the home team? | CREATE TABLE table_name_33 (
decision VARCHAR,
home VARCHAR
) | SELECT decision FROM table_name_33 WHERE home = "atlanta" | Below are sql tables 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 made the decision when atlanta was the home team? ### Input: CREATE TABLE table_name_33 (
decision VARCHAR,
home... |
When 5th, south western district 2 is the mens 2nd xi what is the season? | CREATE TABLE table_24480 (
"Season" text,
"Mens 1st XI" text,
"Mens 2nd XI" text,
"Mens 3rd XI" text,
"Ladies 1st XI" text
) | SELECT "Season" FROM table_24480 WHERE "Mens 2nd XI" = '5th, South Western District 2' | Below are sql tables 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 5th, south western district 2 is the mens 2nd xi what is the season? ### Input: CREATE TABLE table_24480 (
"Season"... |
what are the five most frequent laboratory tests until 2 years ago? | CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CR... | SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t1.itemid FROM (SELECT labevents.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM labevents WHERE DATETIME(labevents.charttime) <= DATETIME(CURRENT_TIME(), '-2 year') GROUP BY labevents.itemid) AS t1 WHERE t1.c1 <= 5) | Below are sql tables 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 five most frequent laboratory tests until 2 years ago? ### Input: CREATE TABLE patients (
row_id number,
... |
have hemoglobin a1c 6.75 _ 10 % | CREATE TABLE table_train_154 (
"id" int,
"systolic_blood_pressure_sbp" int,
"fpg" float,
"hemoglobin_a1c_hba1c" float,
"creatinine_clearance_cl" float,
"diastolic_blood_pressure_dbp" int,
"NOUSE" float
) | SELECT * FROM table_train_154 WHERE hemoglobin_a1c_hba1c >= 6.75 AND hemoglobin_a1c_hba1c <= 10 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: have hemoglobin a1c 6.75 _ 10 % ### Input: CREATE TABLE table_train_154 (
"id" int,
"systolic_blood_pressure_sbp" in... |
Who was the opponent on January 7? | CREATE TABLE table_name_36 (
opponent VARCHAR,
date VARCHAR
) | SELECT opponent FROM table_name_36 WHERE date = "january 7" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who was the opponent on January 7? ### Input: CREATE TABLE table_name_36 (
opponent VARCHAR,
date VARCHAR
) ### Resp... |
What was the Attendance of the Game at Hoosier Dome? | CREATE TABLE table_name_92 (
attendance VARCHAR,
game_site VARCHAR
) | SELECT attendance FROM table_name_92 WHERE game_site = "hoosier dome" | Below are sql tables 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 of the Game at Hoosier Dome? ### Input: CREATE TABLE table_name_92 (
attendance VARCHAR,
gam... |
Show the total number from each rank, and I want to list in ascending by the Y-axis. | CREATE TABLE captain (
Captain_ID int,
Name text,
Ship_ID int,
age text,
Class text,
Rank text
)
CREATE TABLE Ship (
Ship_ID int,
Name text,
Type text,
Built_Year real,
Class text,
Flag text
) | SELECT Rank, COUNT(*) FROM captain GROUP BY Rank ORDER BY COUNT(*) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show the total number from each rank, and I want to list in ascending by the Y-axis. ### Input: CREATE TABLE captain (
C... |
Top 150 users from Nethelands. Top 150 SO users from China | 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 PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, Location FROM Users WHERE LOWER(Location) LIKE '%holland%' ORDER BY Reputation DESC LIMIT 150 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Top 150 users from Nethelands. Top 150 SO users from China ### Input: CREATE TABLE CloseReasonTypes (
Id number,
Nam... |
What's the highest number of silver for 9 bronze and less than 27 total? | CREATE TABLE table_60025 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT MAX("Silver") FROM table_60025 WHERE "Bronze" = '9' AND "Total" < '27' | Below are sql tables 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 highest number of silver for 9 bronze and less than 27 total? ### Input: CREATE TABLE table_60025 (
"Rank" te... |
In what week was November 27, 1977? | CREATE TABLE table_13259034_2 (
week INTEGER,
date VARCHAR
) | SELECT MAX(week) FROM table_13259034_2 WHERE date = "November 27, 1977" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: In what week was November 27, 1977? ### Input: CREATE TABLE table_13259034_2 (
week INTEGER,
date VARCHAR
) ### Resp... |
what are the COACH fares from LOS ANGELES to CHARLOTTE monday morning | CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE fare (
fare_id int,
from_... | SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, fare, fare_basis AS FARE_BASIS_0, fare_basis AS FARE_BASIS_1, flight, flight_fare WHERE (((CITY_1.... | Below are sql tables 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 COACH fares from LOS ANGELES to CHARLOTTE monday morning ### Input: CREATE TABLE flight_leg (
flight_id int... |
do you fly a 747 from BALTIMORE to SAN FRANCISCO | CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE city (
city_code varchar,
... | SELECT DISTINCT flight.flight_id FROM aircraft, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, equipment_sequence, flight WHERE (aircraft.basic_type = '747' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND equipmen... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: do you fly a 747 from BALTIMORE to SAN FRANCISCO ### Input: CREATE TABLE compartment_class (
compartment varchar,
cl... |
Worst Posts (according to votes). | CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
Cr... | SELECT Score, Id AS "post_link" FROM Posts WHERE PostTypeId = 1 ORDER BY Score LIMIT 10 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Worst Posts (according to votes). ### Input: CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE Clo... |
Count the number of services by services. | CREATE TABLE station (
id int,
network_name text,
services text,
local_authority text
)
CREATE TABLE weekly_weather (
station_id int,
day_of_week text,
high_temperature int,
low_temperature int,
precipitation real,
wind_speed_mph int
)
CREATE TABLE train (
id int,
train... | SELECT services, COUNT(services) FROM station GROUP BY services | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Count the number of services by services. ### Input: CREATE TABLE station (
id int,
network_name text,
services ... |
List all the possible ways to get to attractions, together with the number of attractions accessible by these methods by a pie chart. | CREATE TABLE Royal_Family (
Royal_Family_ID INTEGER,
Royal_Family_Details VARCHAR(255)
)
CREATE TABLE Shops (
Shop_ID INTEGER,
Shop_Details VARCHAR(255)
)
CREATE TABLE Photos (
Photo_ID INTEGER,
Tourist_Attraction_ID INTEGER,
Name VARCHAR(255),
Description VARCHAR(255),
Filename VA... | SELECT How_to_Get_There, COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There | Below are sql tables 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 all the possible ways to get to attractions, together with the number of attractions accessible by these methods by a p... |
May I sign up for 100 -level classes in Spring or Summer term ? | CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as varchar,
admit_term int,
predicted_graduation_semester int,
degree varchar,
minor varchar,
internship varch... | SELECT DISTINCT COURSEalias0.department, COURSEalias0.name, COURSEalias0.number, SEMESTERalias0.semester FROM (SELECT course_id FROM student_record WHERE earn_credit = 'Y' AND student_id = 1) AS DERIVED_TABLEalias0, course AS COURSEalias0, course_offering AS COURSE_OFFERINGalias0, semester AS SEMESTERalias0 WHERE COURS... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: May I sign up for 100 -level classes in Spring or Summer term ? ### Input: CREATE TABLE student (
student_id int,
la... |
What is the highest total number of medals of the nation with less than 1 bronzes and less than 0 silver medals? | CREATE TABLE table_name_21 (
total INTEGER,
bronze VARCHAR,
silver VARCHAR
) | SELECT MAX(total) FROM table_name_21 WHERE bronze < 1 AND silver < 0 | Below are sql tables 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 number of medals of the nation with less than 1 bronzes and less than 0 silver medals? ### Input: ... |
What is the earliest year of the Honda Engine with a finish of 4? | CREATE TABLE table_42281 (
"Year" real,
"Chassis" text,
"Engine" text,
"Start" text,
"Finish" real,
"Team" text
) | SELECT MIN("Year") FROM table_42281 WHERE "Engine" = 'honda' AND "Finish" = '4' | Below are sql tables 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 earliest year of the Honda Engine with a finish of 4? ### Input: CREATE TABLE table_42281 (
"Year" real,
... |
What is the sum of draws for all byes larger than 0? | CREATE TABLE table_59315 (
"Portland DFL" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
) | SELECT SUM("Draws") FROM table_59315 WHERE "Byes" > '0' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the sum of draws for all byes larger than 0? ### Input: CREATE TABLE table_59315 (
"Portland DFL" text,
"Win... |
What was the competition in 2003? | CREATE TABLE table_69314 (
"Year" real,
"Competition" text,
"Venue" text,
"Position" text,
"Notes" text
) | SELECT "Competition" FROM table_69314 WHERE "Year" = '2003' | Below are sql tables 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 in 2003? ### Input: CREATE TABLE table_69314 (
"Year" real,
"Competition" text,
"Venue"... |
Plot a scatter chart, people id by snatch. | CREATE TABLE body_builder (
Body_Builder_ID int,
People_ID int,
Snatch real,
Clean_Jerk real,
Total real
)
CREATE TABLE people (
People_ID int,
Name text,
Height real,
Weight real,
Birth_Date text,
Birth_Place text
) | SELECT People_ID, Snatch FROM body_builder | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Plot a scatter chart, people id by snatch. ### Input: CREATE TABLE body_builder (
Body_Builder_ID int,
People_ID int... |
Get All User of posts comments for a particular tag. | CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
Creati... | SELECT * FROM Users WHERE Id IN (SELECT UserId FROM Comments WHERE PostId IN (SELECT Id FROM Posts WHERE Tags LIKE '%aws-lambda%')) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Get All User of posts comments for a particular tag. ### Input: CREATE TABLE ReviewTaskTypes (
Id number,
Name text,... |
show me the number of female patients who underwent atrial cardioversion. | 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 demographic ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.gender = "F" AND procedures.long_title = "Atrial cardioversion" | Below are sql tables 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 the number of female patients who underwent atrial cardioversion. ### Input: CREATE TABLE lab (
subject_id text,... |
What Date has the Region Europe and a Catalog of 74321 45851 2? | CREATE TABLE table_76207 (
"Region" text,
"Date" text,
"Label" text,
"Format" text,
"Catalog" text
) | SELECT "Date" FROM table_76207 WHERE "Region" = 'europe' AND "Catalog" = '74321 45851 2' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What Date has the Region Europe and a Catalog of 74321 45851 2? ### Input: CREATE TABLE table_76207 (
"Region" text,
... |
what is patient 027-211129's last diagnosis? | CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | SELECT diagnosis.diagnosisname FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-211129')) ORDER BY diagnosis.diagnosistime DESC LIMIT 1 | Below are sql tables 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 patient 027-211129's last diagnosis? ### Input: CREATE TABLE patient (
uniquepid text,
patienthealthsystemst... |
list the WEDNESDAY flights from DENVER to BALTIMORE arriving in BALTIMORE between 1115 and 1245pm | CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time int,
connections int,
departure_time int,
dual_carrier text,
flight_days text,
flight_id ... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, days, flight WHERE (((flight.arrival_time <= 1245 AND flight.arrival_time >= 1115) AND days.day_name = 'WEDNESDAY' AND flight.flight_days = days.days_code) AND CITY_1.city_co... | Below are sql tables 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 WEDNESDAY flights from DENVER to BALTIMORE arriving in BALTIMORE between 1115 and 1245pm ### Input: CREATE TABLE st... |
How many episodes by different writers were seen by 3.24 million people in the US? | CREATE TABLE table_1839 (
"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 (million)" text
) | SELECT COUNT("Written by") FROM table_1839 WHERE "U.S. viewers (million)" = '3.24' | Below are sql tables 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 episodes by different writers were seen by 3.24 million people in the US? ### Input: CREATE TABLE table_1839 (
... |
how many patients whose age is less than 70 and procedure icd9 code is 3532? | 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 prescription... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "70" AND procedures.icd9_code = "3532" | Below are sql tables 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 age is less than 70 and procedure icd9 code is 3532? ### Input: CREATE TABLE lab (
subject_id te... |
how many patients whose age is less than 45 and procedure long title is closure of skin and subcutaneous tissue of other sites? | 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 prescription... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "45" AND procedures.long_title = "Closure of skin and subcutaneous tissue of other sites" | Below are sql tables 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 age is less than 45 and procedure long title is closure of skin and subcutaneous tissue of other sit... |
A bar chart shows the distribution of Sex and the sum of Height , and group by attribute Sex. | CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate real
)
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight re... | SELECT Sex, SUM(Height) FROM people GROUP BY Sex | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: A bar chart shows the distribution of Sex and the sum of Height , and group by attribute Sex. ### Input: CREATE TABLE candid... |
how many athletes have a time below 5:56:21 ? | CREATE TABLE table_204_262 (
id number,
"rank" number,
"athlete" text,
"time" text,
"notes" text,
"q" text
) | SELECT COUNT("athlete") FROM table_204_262 WHERE "time" < '5:56.21' | Below are sql tables 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 athletes have a time below 5:56:21 ? ### Input: CREATE TABLE table_204_262 (
id number,
"rank" number,
... |
Use a bar chart to show the number of delegates in each county, and order from low to high by the total number. | CREATE TABLE party (
Party_ID int,
Year real,
Party text,
Governor text,
Lieutenant_Governor text,
Comptroller text,
Attorney_General text,
US_Senate text
)
CREATE TABLE county (
County_Id int,
County_name text,
Population real,
Zip_code text
)
CREATE TABLE election (
... | SELECT County_name, COUNT(County_name) FROM county AS T1 JOIN election AS T2 ON T1.County_Id = T2.District GROUP BY County_name ORDER BY COUNT(County_name) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Use a bar chart to show the number of delegates in each county, and order from low to high by the total number. ### Input: C... |
Bar chart x axis publication date y axis how many publication date, could you order by the x-axis in ascending? | CREATE TABLE book (
Book_ID int,
Title text,
Issues real,
Writer text
)
CREATE TABLE publication (
Publication_ID int,
Book_ID int,
Publisher text,
Publication_Date text,
Price real
) | SELECT Publication_Date, COUNT(Publication_Date) FROM publication GROUP BY Publication_Date ORDER BY Publication_Date | Below are sql tables 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 chart x axis publication date y axis how many publication date, could you order by the x-axis in ascending? ### Input: C... |
What was the sum of the crowds that watched Fitzroy play as the away team? | CREATE TABLE table_32242 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT SUM("Crowd") FROM table_32242 WHERE "Away team" = 'fitzroy' | Below are sql tables 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 sum of the crowds that watched Fitzroy play as the away team? ### Input: CREATE TABLE table_32242 (
"Home t... |
What date has @ new orleans as the team? | CREATE TABLE table_49195 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT "Date" FROM table_49195 WHERE "Team" = '@ new orleans' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What date has @ new orleans as the team? ### Input: CREATE TABLE table_49195 (
"Game" real,
"Date" text,
"Team" ... |
Show how many courses in 2008 for every instructor with a bar chart, and display by the names from low to high. | CREATE TABLE time_slot (
time_slot_id varchar(4),
day varchar(1),
start_hr numeric(2),
start_min numeric(2),
end_hr numeric(2),
end_min numeric(2)
)
CREATE TABLE teaches (
ID varchar(5),
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0)
)
CREAT... | SELECT name, COUNT(name) FROM course AS T1 JOIN teaches AS T2 ON T1.course_id = T2.course_id JOIN instructor AS T3 ON T2.ID = T3.ID WHERE year = 2008 GROUP BY name ORDER BY name | Below are sql tables 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 how many courses in 2008 for every instructor with a bar chart, and display by the names from low to high. ### Input: C... |
Where did the player loaned out on 27 november 2008 move to ? | CREATE TABLE table_62206 (
"Date From" text,
"Date To" text,
"Pos." text,
"Name" text,
"Moving To" text
) | SELECT "Moving To" FROM table_62206 WHERE "Date From" = '27 november 2008' | Below are sql tables 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_62206 (
"Date From" text,
... |
Can you tell me what classes Dr. Keith Christensen has taught in the past ? | CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
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_gradu... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor WHERE course_offering.semester < (SELECT SEMESTERalias0.semester_id FROM semester AS SEMESTERalias0 WHERE SEMESTERalias0.semester = 'WN' AND SEMESTERalias0.year = 2016) AND course.course_id = cour... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Can you tell me what classes Dr. Keith Christensen has taught in the past ? ### Input: CREATE TABLE course_prerequisite (
... |
What was the record when they played golden state? | CREATE TABLE table_25850 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT "Record" FROM table_25850 WHERE "Team" = 'Golden State' | Below are sql tables 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 record when they played golden state? ### Input: CREATE TABLE table_25850 (
"Game" real,
"Date" text,
... |
Bronze of 2, and a Silver smaller than 0 then what is the sum of the gold? | CREATE TABLE table_38352 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT SUM("Gold") FROM table_38352 WHERE "Bronze" = '2' AND "Silver" < '0' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Bronze of 2, and a Silver smaller than 0 then what is the sum of the gold? ### Input: CREATE TABLE table_38352 (
"Rank" ... |
what is maximum age of patients whose marital status is married and admission year is greater than or equal to 2194? | 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
)
... | SELECT MAX(demographic.age) FROM demographic WHERE demographic.marital_status = "MARRIED" AND demographic.admityear >= "2194" | Below are sql tables 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 maximum age of patients whose marital status is married and admission year is greater than or equal to 2194? ### Inp... |
For each origin, how many flights came from there? | CREATE TABLE certificate (
eid number,
aid number
)
CREATE TABLE aircraft (
aid number,
name text,
distance number
)
CREATE TABLE employee (
eid number,
name text,
salary number
)
CREATE TABLE flight (
flno number,
origin text,
destination text,
distance number,
de... | SELECT origin, COUNT(*) FROM flight GROUP BY origin | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For each origin, how many flights came from there? ### Input: CREATE TABLE certificate (
eid number,
aid number
)
C... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.