answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT date_of_vacancy FROM table_18788823_5 WHERE outgoing_manager = "Micky Adams" | What date did Micky Adams vacate his position? | CREATE TABLE table_18788823_5 (date_of_vacancy VARCHAR, outgoing_manager VARCHAR) |
SELECT MAX(capacity), average FROM stadium | What is the maximum capacity and the average of all stadiums ? | CREATE TABLE stadium (average VARCHAR, capacity INTEGER) |
SELECT MAX("Round2") FROM table_21098 | What was the highest score for round 2? | CREATE TABLE table_21098 (
"Rank" real,
"Team" text,
"Round1" real,
"Round2" real,
"Round3" real,
"Round4" real,
"Round5" real,
"Total Points" real
) |
SELECT position_in_table FROM table_18788823_5 WHERE date_of_vacancy = "4 November 2008" | Which vacancy happened on 4 November 2008? | CREATE TABLE table_18788823_5 (position_in_table VARCHAR, date_of_vacancy VARCHAR) |
SELECT AVG(capacity), MAX(capacity) FROM stadium | What is the average and maximum capacities for all stadiums ? | CREATE TABLE stadium (capacity INTEGER) |
SELECT "place" FROM table_204_79 WHERE "season" > '1990/91' ORDER BY "season" LIMIT 1 | after the 1990/91 season , which place was earned in the next season ? | CREATE TABLE table_204_79 (
id number,
"season" text,
"tier" number,
"division" text,
"place" text
) |
SELECT COUNT(position_in_table) FROM table_18788823_5 WHERE outgoing_manager = "Keith Downing" | How many times did Keith Downing depart a position? | CREATE TABLE table_18788823_5 (position_in_table VARCHAR, outgoing_manager VARCHAR) |
SELECT name, capacity FROM stadium ORDER BY average DESC LIMIT 1 | What is the name and capacity for the stadium with highest average attendance? | CREATE TABLE stadium (name VARCHAR, capacity VARCHAR, average VARCHAR) |
SELECT "Ratings" FROM table_52445 WHERE "Host" = 'chris economaki' AND "Viewers" = '12.3 million' | What were the ratings for host Chris Economaki who had 12.3 million viewers? | CREATE TABLE table_52445 (
"Year" real,
"Network" text,
"Lap-by-lap" text,
"Color commentator(s)" text,
"Pit reporters" text,
"Host" text,
"Ratings" text,
"Viewers" text
) |
SELECT team FROM table_18788823_5 WHERE date_of_appointment = "23 December 2008" | Which team appointed a person on 23 December 2008? | CREATE TABLE table_18788823_5 (team VARCHAR, date_of_appointment VARCHAR) |
SELECT COUNT(*) FROM concert WHERE YEAR = 2014 OR YEAR = 2015 | How many concerts are there in year 2014 or 2015? | CREATE TABLE concert (YEAR VARCHAR) |
SELECT "Week" FROM table_34096 WHERE "Attendance" = '25,000' | In what week was the attendance 25,000? | CREATE TABLE table_34096 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Game site" text,
"Record" text,
"Attendance" text
) |
SELECT date_of_appointment FROM table_18788823_5 WHERE team = "Milton Keynes Dons" | What date did the Milton Keynes Dons appoint? | CREATE TABLE table_18788823_5 (date_of_appointment VARCHAR, team VARCHAR) |
SELECT T2.name, COUNT(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id GROUP BY T1.stadium_id | Show the stadium name and the number of concerts in each stadium. | CREATE TABLE stadium (name VARCHAR, stadium_id VARCHAR); CREATE TABLE concert (stadium_id VARCHAR) |
SELECT MAX(points) FROM table_name_51 WHERE touchdowns < 1 | Which Points is the lowest one that has Touchdowns smaller than 1? | CREATE TABLE table_name_51 (
points INTEGER,
touchdowns INTEGER
) |
SELECT position_in_table FROM table_18788823_5 WHERE date_of_vacancy = "16 February 2009" | Which vacancy occurred on 16 February 2009? | CREATE TABLE table_18788823_5 (position_in_table VARCHAR, date_of_vacancy VARCHAR) |
SELECT T2.name, T2.capacity FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year >= 2014 GROUP BY T2.stadium_id ORDER BY COUNT(*) DESC LIMIT 1 | Show the stadium name and capacity with most number of concerts in year 2014 or after. | CREATE TABLE stadium (name VARCHAR, capacity VARCHAR, stadium_id VARCHAR); CREATE TABLE concert (stadium_id VARCHAR, year VARCHAR) |
SELECT visitor FROM table_name_9 WHERE date = "december 29" | Date of december 29 has what visitor? | CREATE TABLE table_name_9 (
visitor VARCHAR,
date VARCHAR
) |
SELECT title FROM table_1876825_5 WHERE production_code = "06-02-407" | What is title of episode 06-02-407? | CREATE TABLE table_1876825_5 (title VARCHAR, production_code VARCHAR) |
SELECT t2.name, t2.capacity FROM concert AS t1 JOIN stadium AS t2 ON t1.stadium_id = t2.stadium_id WHERE t1.year > 2013 GROUP BY t2.stadium_id ORDER BY COUNT(*) DESC LIMIT 1 | What is the name and capacity of the stadium with the most concerts after 2013 ? | CREATE TABLE concert (stadium_id VARCHAR, year INTEGER); CREATE TABLE stadium (name VARCHAR, capacity VARCHAR, stadium_id VARCHAR) |
SELECT away_team AS score FROM table_name_59 WHERE venue = "arden street oval" | How many points did the away team score at Arden Street Oval? | CREATE TABLE table_name_59 (
away_team VARCHAR,
venue VARCHAR
) |
SELECT title FROM table_1876825_5 WHERE production_code = "06-02-406" | What is title of episode 06-02-406? | CREATE TABLE table_1876825_5 (title VARCHAR, production_code VARCHAR) |
SELECT YEAR FROM concert GROUP BY YEAR ORDER BY COUNT(*) DESC LIMIT 1 | Which year has most number of concerts? | CREATE TABLE concert (YEAR VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "HYPERGLYCEMIA" AND demographic.dod_year <= "2164.0" | Get me the number of patients with a primary disease of hyperglycemia who died in or before 2164. | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions... |
SELECT title FROM table_1876825_5 WHERE original_air_date = "March 2, 2003" | What is title of episode aired on March 2, 2003? | CREATE TABLE table_1876825_5 (title VARCHAR, original_air_date VARCHAR) |
SELECT name FROM stadium WHERE NOT stadium_id IN (SELECT stadium_id FROM concert) | Show the stadium names without any concert. | CREATE TABLE stadium (name VARCHAR, stadium_id VARCHAR); CREATE TABLE concert (name VARCHAR, stadium_id VARCHAR) |
SELECT "Composer" FROM table_7034 WHERE "Director" = 'john ramster' | Who was Director John Ramster's Composer? | CREATE TABLE table_7034 (
"Year" real,
"Production" text,
"Composer" text,
"Conductor" text,
"Director" text
) |
SELECT written_by FROM table_1876825_5 WHERE no_in_series = 74 | Who wrote episode 74? | CREATE TABLE table_1876825_5 (written_by VARCHAR, no_in_series VARCHAR) |
SELECT country FROM singer WHERE age > 40 INTERSECT SELECT country FROM singer WHERE age < 30 | Show countries where a singer above age 40 and a singer below 30 are from. | CREATE TABLE singer (country VARCHAR, age INTEGER) |
SELECT AVG(snatch) FROM table_name_19 WHERE total__kg_ > 318 AND bodyweight = 84.15 | WHTA IS THE SNATCH WITH A TOTAL OF LARGER THAN 318 KG AND BODY WEIGHT OF 84.15? | CREATE TABLE table_name_19 (
snatch INTEGER,
total__kg_ VARCHAR,
bodyweight VARCHAR
) |
SELECT position_in_table FROM table_18784280_3 WHERE team = "Watford" | Which position in the table is the team watford? | CREATE TABLE table_18784280_3 (position_in_table VARCHAR, team VARCHAR) |
SELECT name FROM stadium EXCEPT SELECT T2.name FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year = 2014 | Show names for all stadiums except for stadiums having a concert in year 2014. | CREATE TABLE stadium (name VARCHAR, stadium_id VARCHAR); CREATE TABLE concert (stadium_id VARCHAR, year VARCHAR); CREATE TABLE stadium (name VARCHAR) |
SELECT SUM(partial_failures) FROM table_name_35 WHERE successes < 6 AND launches > 1 AND failures = 2 | Successes smaller than 6, and Launches larger than 1, and a Failures of 2 is what sum of the partial failures? | CREATE TABLE table_name_35 (
partial_failures INTEGER,
failures VARCHAR,
successes VARCHAR,
launches VARCHAR
) |
SELECT COUNT(no_in_series) FROM table_1876825_7 WHERE production_code = "06-04-621" | Name the number of number in series for production code of 06-04-621 | CREATE TABLE table_1876825_7 (no_in_series VARCHAR, production_code VARCHAR) |
SELECT T2.concert_name, T2.theme, COUNT(*) FROM singer_in_concert AS T1 JOIN concert AS T2 ON T1.concert_id = T2.concert_id GROUP BY T2.concert_id | Show the name and theme for all concerts and the number of singers in each concert. | CREATE TABLE singer_in_concert (concert_id VARCHAR); CREATE TABLE concert (concert_name VARCHAR, theme VARCHAR, concert_id VARCHAR) |
SELECT "Democrat" FROM table_76528 WHERE "Sample Size" < '516' AND "Republican" = 'ron paul' | Which Democrat was selected in the poll with a sample size smaller than 516 where the Republican chosen was Ron Paul? | CREATE TABLE table_76528 (
"Poll Source" text,
"Sample Size" real,
"Margin of Error" real,
"Date" text,
"Democrat" text,
"Republican" text
) |
SELECT COUNT(written_by) FROM table_1876825_7 WHERE original_air_date = "May 8, 2005" | Name the total number of written by for original air date for may 8, 2005 | CREATE TABLE table_1876825_7 (written_by VARCHAR, original_air_date VARCHAR) |
SELECT t2.concert_name, t2.theme, COUNT(*) FROM singer_in_concert AS t1 JOIN concert AS t2 ON t1.concert_id = t2.concert_id GROUP BY t2.concert_id | What are the names , themes , and number of singers for every concert ? | CREATE TABLE singer_in_concert (concert_id VARCHAR); CREATE TABLE concert (concert_name VARCHAR, theme VARCHAR, concert_id VARCHAR) |
SELECT finish FROM table_name_92 WHERE year_s__won = "1965" | Where did the player who won in 1965 finish? | CREATE TABLE table_name_92 (
finish VARCHAR,
year_s__won VARCHAR
) |
SELECT location_attendance FROM table_18813011_6 WHERE date = "July 11" | What was the place and how many people attended the game on July 11? | CREATE TABLE table_18813011_6 (location_attendance VARCHAR, date VARCHAR) |
SELECT T2.name, COUNT(*) FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id GROUP BY T2.singer_id | List singer names and number of concerts for each singer. | CREATE TABLE singer_in_concert (singer_id VARCHAR); CREATE TABLE singer (name VARCHAR, singer_id VARCHAR) |
SELECT score FROM table_name_73 WHERE record = "50-85" | What was the score of the game when the record was 50-85? | CREATE TABLE table_name_73 (
score VARCHAR,
record VARCHAR
) |
SELECT high_assists FROM table_18813011_6 WHERE date = "July 26" | Who had the most assist and how many on July 26? | CREATE TABLE table_18813011_6 (high_assists VARCHAR, date VARCHAR) |
SELECT T2.name FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id JOIN concert AS T3 ON T1.concert_id = T3.concert_id WHERE T3.year = 2014 | List all singer names in concerts in year 2014. | CREATE TABLE singer_in_concert (singer_id VARCHAR, concert_id VARCHAR); CREATE TABLE concert (concert_id VARCHAR, year VARCHAR); CREATE TABLE singer (name VARCHAR, singer_id VARCHAR) |
SELECT name FROM table_name_76 WHERE year = "1997–99" | What is the Name for 1997 99? | CREATE TABLE table_name_76 (
name VARCHAR,
year VARCHAR
) |
SELECT high_assists FROM table_18813011_6 WHERE record = "13-11" | Who had the high assist in the game where the record is 13-11? | CREATE TABLE table_18813011_6 (high_assists VARCHAR, record VARCHAR) |
SELECT name, country FROM singer WHERE song_name LIKE '%Hey%' | what is the name and nation of the singer who have a song having 'Hey' in its name? | CREATE TABLE singer (name VARCHAR, country VARCHAR, song_name VARCHAR) |
SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 25733) AND DATETIME(prescriptions.startdate, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT prescriptions.drug FROM prescriptions WHERE... | what are the new prescriptions of patient 25733 today compared to the ones yesterday? | CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
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,
... |
SELECT date_of_vacancy FROM table_18795125_6 WHERE position_in_table = "23rd" | At what date did the 23rd manager vacate the position? | CREATE TABLE table_18795125_6 (date_of_vacancy VARCHAR, position_in_table VARCHAR) |
SELECT T2.name, T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2014 INTERSECT SELECT T2.name, T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2015 | Find the name and location of the stadiums which some concerts happened in the years of both 2014 and 2015. | CREATE TABLE stadium (name VARCHAR, location VARCHAR, stadium_id VARCHAR); CREATE TABLE concert (stadium_id VARCHAR, Year VARCHAR) |
SELECT Id, url = 'site://q/' + CAST(Id AS TEXT), CreationDate, DeletionDate, Score, Tags FROM Posts WHERE (PostTypeId = 1) AND (Tags LIKE '%<##Tagname##>%' OR Title LIKE '%<##Title##>%') AND (NOT DeletionDate IS NULL) ORDER BY DeletionDate DESC LIMIT 100 | search deleted questions in terms of their tagname/title. | CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
O... |
SELECT date_of_appointment FROM table_18795125_6 WHERE outgoing_manager = "Simon Davies" | What was the date of appointment for the manager that replaced Simon Davies? | CREATE TABLE table_18795125_6 (date_of_appointment VARCHAR, outgoing_manager VARCHAR) |
SELECT COUNT(*) FROM concert WHERE stadium_id = (SELECT stadium_id FROM stadium ORDER BY capacity DESC LIMIT 1) | Find the number of concerts happened in the stadium with the highest capacity . | CREATE TABLE concert (stadium_id VARCHAR, capacity VARCHAR); CREATE TABLE stadium (stadium_id VARCHAR, capacity VARCHAR) |
SELECT grid FROM table_name_85 WHERE driver = "johnny dumfries" | Which Grid has a Driver of johnny dumfries? | CREATE TABLE table_name_85 (
grid VARCHAR,
driver VARCHAR
) |
SELECT date_of_appointment FROM table_18795125_6 WHERE position_in_table = "23rd" | What was the date of appointment for the manager of the 23rd team? | CREATE TABLE table_18795125_6 (date_of_appointment VARCHAR, position_in_table VARCHAR) |
SELECT COUNT(*) FROM pets WHERE weight > 10 | Find the number of pets whose weight is heavier than 10. | CREATE TABLE pets (weight INTEGER) |
SELECT "department" FROM table_204_246 WHERE "total deputies" = 5 | what is the only department witj 5 total deputies | CREATE TABLE table_204_246 (
id number,
"department" text,
"total deputies" number,
"uninominal deputies" number,
"plurinominal deputies" number,
"special indigenous\nor campesino deputies" number,
"senators" number
) |
SELECT COUNT(replaced_by) FROM table_18795125_6 WHERE outgoing_manager = "Alan Buckley" | How many categories for, replaced by, exist when the outgoing manager is Alan Buckley? | CREATE TABLE table_18795125_6 (replaced_by VARCHAR, outgoing_manager VARCHAR) |
SELECT weight FROM pets ORDER BY pet_age LIMIT 1 | Find the weight of the youngest dog. | CREATE TABLE pets (weight VARCHAR, pet_age VARCHAR) |
SELECT "Date" FROM table_58525 WHERE "Venue" = 'vfl park' | What date was the venue at VFL park? | CREATE TABLE table_58525 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) |
SELECT driver FROM table_18811741_15 WHERE starts = 3 | Which driver starts 3? | CREATE TABLE table_18811741_15 (driver VARCHAR, starts VARCHAR) |
SELECT MAX(weight), petType FROM pets GROUP BY petType | Find the maximum weight for each type of pet. List the maximum weight and pet type. | CREATE TABLE pets (petType VARCHAR, weight INTEGER) |
SELECT "athlete" FROM table_204_550 WHERE "event" = '100 m' ORDER BY "date" LIMIT 1 | what is the first athlete in teh 100m event ? | CREATE TABLE table_204_550 (
id number,
"event" text,
"record" text,
"athlete" text,
"date" text,
"meet" text,
"place" text
) |
SELECT COUNT(podiums) FROM table_18811741_15 WHERE stage_wins = 18 | How many podiums for the driver with 18 stage wins? | CREATE TABLE table_18811741_15 (podiums VARCHAR, stage_wins VARCHAR) |
SELECT COUNT(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20 | Find number of pets owned by students who are older than 20. | CREATE TABLE student (stuid VARCHAR, age INTEGER); CREATE TABLE has_pet (stuid VARCHAR) |
SELECT staff_name, COUNT(*) FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id = T2.contact_staff_id GROUP BY T1.staff_name ORDER BY COUNT(*) DESC | Give me a histogram for how many engineers did each staff contact? List both the contact staff name and number of engineers contacted, list by the total number in descending. | CREATE TABLE Staff (
staff_id INTEGER,
staff_name VARCHAR(255),
gender VARCHAR(1),
other_staff_details VARCHAR(255)
)
CREATE TABLE Part_Faults (
part_fault_id INTEGER,
part_id INTEGER,
fault_short_name VARCHAR(20),
fault_description VARCHAR(255),
other_fault_details VARCHAR(255)
)
... |
SELECT MAX(pos) FROM table_18811741_15 WHERE podiums = 1 | What is the highest pos for a driver with 1 podium? | CREATE TABLE table_18811741_15 (pos INTEGER, podiums VARCHAR) |
SELECT COUNT(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T2.petid = T3.petid WHERE T1.sex = 'F' AND T3.pettype = 'dog' | Find the number of dog pets that are raised by female students (with sex F). | CREATE TABLE has_pet (stuid VARCHAR, petid VARCHAR); CREATE TABLE pets (petid VARCHAR, pettype VARCHAR); CREATE TABLE student (stuid VARCHAR, sex VARCHAR) |
SELECT name, meter_100 FROM swimmer ORDER BY meter_100 | Return a bar chart about the distribution of name and meter_100 , and list in asc by the total number. | CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text,
meter_300 text,
meter_400 text,
meter_500 text,
meter_600 text,
meter_700 text,
Time text
)
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
CREATE... |
SELECT tv_network_s_ FROM table_18821196_1 WHERE weekly_schedule = "Monday to Thursday @ 11:00 pm" | What is every TV network with a weekly schedule of Monday to Thursday @ 11:00 pm? | CREATE TABLE table_18821196_1 (tv_network_s_ VARCHAR, weekly_schedule VARCHAR) |
SELECT COUNT(DISTINCT pettype) FROM pets | Find the number of distinct type of pets. | CREATE TABLE pets (pettype VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND procedures.long_title = "Thoracentesis" | calculate the number of patients admitted to emergency who had thoracentesis. | 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
)
C... |
SELECT country FROM table_18821196_1 WHERE tv_network_s_ = "AXN India" | What is every country with a TV network of AXN India? | CREATE TABLE table_18821196_1 (country VARCHAR, tv_network_s_ VARCHAR) |
SELECT DISTINCT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' OR T3.pettype = 'dog' | Find the first name of students who have cat or dog pet. | CREATE TABLE has_pet (stuid VARCHAR, petid VARCHAR); CREATE TABLE student (Fname VARCHAR, stuid VARCHAR); CREATE TABLE pets (petid VARCHAR, pettype VARCHAR) |
SELECT round FROM table_name_31 WHERE against = "greece" | What was the round when nueza silva played against greece? | CREATE TABLE table_name_31 (
round VARCHAR,
against VARCHAR
) |
SELECT weekly_schedule FROM table_18821196_1 WHERE country = "Norway" | What is every weekly schedule in the country of Norway? | CREATE TABLE table_18821196_1 (weekly_schedule VARCHAR, country VARCHAR) |
SELECT t1.fname FROM student AS t1 JOIN has_pet AS t2 ON t1.stuid = t2.stuid JOIN pets AS t3 ON t3.petid = t2.petid WHERE t3.pettype = 'cat' INTERSECT SELECT t1.fname FROM student AS t1 JOIN has_pet AS t2 ON t1.stuid = t2.stuid JOIN pets AS t3 ON t3.petid = t2.petid WHERE t3.pettype = 'dog' | Find the first name of students who have both cat and dog pets . | CREATE TABLE student (fname VARCHAR, stuid VARCHAR); CREATE TABLE has_pet (stuid VARCHAR, petid VARCHAR); CREATE TABLE pets (petid VARCHAR, pettype VARCHAR) |
SELECT hanja FROM table_name_56 WHERE mccune_reischauer = "chŏn" | What is the Hanja for McCune-Reischauer of ch n? | CREATE TABLE table_name_56 (
hanja VARCHAR,
mccune_reischauer VARCHAR
) |
SELECT tv_network_s_ FROM table_18821196_1 WHERE country = "Belgium" | What is every TV network in Belgium? | CREATE TABLE table_18821196_1 (tv_network_s_ VARCHAR, country VARCHAR) |
SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' INTERSECT SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog' | What are the students' first names who have both cats and dogs as pets? | CREATE TABLE has_pet (stuid VARCHAR, petid VARCHAR); CREATE TABLE student (Fname VARCHAR, stuid VARCHAR); CREATE TABLE pets (petid VARCHAR, pettype VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dod_year <= "2165.0" AND prescriptions.drug = "Levofloxacin" | how many patients whose year of death is less than or equal to 2165 and drug name is levofloxacin? | 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 lab (
subject_id text,
hadm_id text,
... |
SELECT status FROM table_18821196_1 WHERE weekly_schedule = "Monday to Thursday @ 11:00 pm" | What is every status with a weekly schedule of Monday to Thursday @ 11:00 pm? | CREATE TABLE table_18821196_1 (status VARCHAR, weekly_schedule VARCHAR) |
SELECT major, age FROM student WHERE NOT stuid IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat') | Find the major and age of students who do not have a cat pet. | CREATE TABLE student (stuid VARCHAR); CREATE TABLE has_pet (stuid VARCHAR, petid VARCHAR); CREATE TABLE pets (petid VARCHAR, pettype VARCHAR); CREATE TABLE student (major VARCHAR, age VARCHAR, stuid VARCHAR) |
SELECT high_points FROM table_name_95 WHERE team = "boston" | What is the High points with a Team with boston? | CREATE TABLE table_name_95 (
high_points VARCHAR,
team VARCHAR
) |
SELECT weekly_schedule FROM table_18821196_1 WHERE tv_network_s_ = "Viasat 4" | What is every weekly schedule of TV network Viasat 4? | CREATE TABLE table_18821196_1 (weekly_schedule VARCHAR, tv_network_s_ VARCHAR) |
SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' | Find the id of students who do not have a cat pet. | CREATE TABLE has_pet (stuid VARCHAR, petid VARCHAR); CREATE TABLE pets (petid VARCHAR, pettype VARCHAR); CREATE TABLE student (stuid VARCHAR) |
SELECT DATEADD(week, DATEDIFF(day, '20000109', CreationDate) / 7, '20000109') AS "week", COUNT(DISTINCT Posts.Id) AS Posts, SUM(Posts.AnswerCount) AS Answers, SUM(Posts.CommentCount) AS Comments FROM Posts INNER JOIN PostTags ON PostTags.PostId = Posts.Id INNER JOIN Tags ON PostTags.TagId = Tags.Id WHERE Tags.TagName L... | Count of questions with serverless tag over time. | CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownV... |
SELECT prize_fund FROM table_18828487_1 WHERE venue = "RWE-Sporthalle, Mülheim" | How much was the prize money for rwe-sporthalle, mülheim ? | CREATE TABLE table_18828487_1 (prize_fund VARCHAR, venue VARCHAR) |
SELECT T1.fname, T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog' AND NOT T1.stuid IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat') | Find the first name and age of students who have a dog but do not have a cat as a pet. | CREATE TABLE has_pet (stuid VARCHAR, petid VARCHAR); CREATE TABLE student (fname VARCHAR, age VARCHAR, stuid VARCHAR); CREATE TABLE pets (petid VARCHAR, pettype VARCHAR) |
SELECT director FROM table_28785738_1 WHERE no_in_season = 11 | Who directed episode 11 of the season? | CREATE TABLE table_28785738_1 (
director VARCHAR,
no_in_season VARCHAR
) |
SELECT COUNT(runner_up) FROM table_18828487_1 WHERE year = 2009 | In 2009, how many were runner-up? | CREATE TABLE table_18828487_1 (runner_up VARCHAR, year VARCHAR) |
SELECT pettype, weight FROM pets ORDER BY pet_age LIMIT 1 | Find the type and weight of the youngest pet. | CREATE TABLE pets (pettype VARCHAR, weight VARCHAR, pet_age VARCHAR) |
SELECT result FROM table_1342013_34 WHERE incumbent = "William H. Ayres" | what's the result with incumbent being william h. ayres | CREATE TABLE table_1342013_34 (
result VARCHAR,
incumbent VARCHAR
) |
SELECT champion FROM table_18828487_1 WHERE venue = "Stadthalle Dinslaken, Dinslaken" | How much does the champion get for stadthalle dinslaken, dinslaken? | CREATE TABLE table_18828487_1 (champion VARCHAR, venue VARCHAR) |
SELECT petid, weight FROM pets WHERE pet_age > 1 | Find the id and weight of all pets whose age is older than 1. | CREATE TABLE pets (petid VARCHAR, weight VARCHAR, pet_age INTEGER) |
SELECT COUNT(*) FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '032-3281' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospi... | total the number of drugs patient 032-3281 has been prescribed so far during their last hospital encounter. | 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 microlab (
microl... |
SELECT l2_cache FROM table_18823880_10 WHERE release_date = "September 2009" AND part_number_s_ = "BY80607002529AF" | When by80607002529af is the part number and september 2009 is the release date what is the l2 cache? | CREATE TABLE table_18823880_10 (l2_cache VARCHAR, release_date VARCHAR, part_number_s_ VARCHAR) |
SELECT AVG(pet_age), MAX(pet_age), pettype FROM pets GROUP BY pettype | Find the average and maximum age for each type of pet. | CREATE TABLE pets (pettype VARCHAR, pet_age INTEGER) |
SELECT label FROM table_name_98 WHERE date = "1973" AND catalog = "l 35023" | What is the label from 1973 that has a catalog number of l 35023? | CREATE TABLE table_name_98 (
label VARCHAR,
date VARCHAR,
catalog VARCHAR
) |
SELECT socket FROM table_18823880_10 WHERE part_number_s_ = "BY80607002907AHBX80607I7720QM" | When by80607002907ahbx80607i7720qm is the part number what is the socket? | CREATE TABLE table_18823880_10 (socket VARCHAR, part_number_s_ VARCHAR) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.