answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT SUM("Events") FROM table_40561 WHERE "Top-25" > '5' AND "Top-10" < '4' AND "Wins" > '2' | What is the sum of Events when the top-25 is more than 5, and the top-10 is less than 4, and wins is more than 2? | CREATE TABLE table_40561 (
"Tournament" text,
"Wins" real,
"Top-5" real,
"Top-10" real,
"Top-25" real,
"Events" real,
"Cuts made" real
) |
SELECT team FROM table_17326036_5 WHERE date = "November 21" | What team was the game on November 21 played against? | CREATE TABLE table_17326036_5 (team VARCHAR, date VARCHAR) |
SELECT * FROM products WHERE price BETWEEN 60 AND 120 | Find all information of all the products with a price between $60 and $120. | CREATE TABLE products (price INTEGER) |
SELECT MIN("Crowd") FROM table_11786 WHERE "Away team" = 'essendon' | What is the lowest crowd when essendon is the away team? | CREATE TABLE table_11786 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) |
SELECT score FROM table_17326036_5 WHERE team = "Boston" | What was the score in the game against Boston? | CREATE TABLE table_17326036_5 (score VARCHAR, team VARCHAR) |
SELECT AVG(price) FROM products | Compute the average price of all the products. | CREATE TABLE products (price INTEGER) |
SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'LOS ANGELES' AND ground_service.city_code = city.city_code AND ground_service.transport_type = 'LIMOUSINE' | what LIMOUSINE service in LOS ANGELES | CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE T... |
SELECT date_of_appointment FROM table_17327264_3 WHERE replaced_by = "Petrik Sander" | Name the date of appointment for petrik sander | CREATE TABLE table_17327264_3 (date_of_appointment VARCHAR, replaced_by VARCHAR) |
SELECT AVG(price) FROM products WHERE Manufacturer = 2 | Compute the average price of all products with manufacturer code equal to 2. | CREATE TABLE products (price INTEGER, Manufacturer VARCHAR) |
SELECT country FROM table_name_17 WHERE player = "tiger woods" | What country does Tiger Woods play for? | CREATE TABLE table_name_17 (
country VARCHAR,
player VARCHAR
) |
SELECT date_of_appointment FROM table_17327264_3 WHERE manner_of_departure = "Sacked" AND position_in_table = "14th" AND replaced_by = "Marco Kostmann" | Name the date of appointment for sacked and 14th position replaced by marco kostmann | CREATE TABLE table_17327264_3 (date_of_appointment VARCHAR, replaced_by VARCHAR, manner_of_departure VARCHAR, position_in_table VARCHAR) |
SELECT COUNT(*) FROM products WHERE price >= 180 | Compute the number of products with a price larger than or equal to $180. | CREATE TABLE products (price VARCHAR) |
SELECT "Event" FROM table_42245 WHERE "Record" = '4:02.54' | Which Event has a Record of 4:02.54? | CREATE TABLE table_42245 (
"Event" text,
"Record" text,
"Nation" text,
"Date" text,
"Venue" text
) |
SELECT COUNT(location_attendance) FROM table_17326036_6 WHERE date = "December 5" | How many location attendance was recorded for December 5? | CREATE TABLE table_17326036_6 (location_attendance VARCHAR, date VARCHAR) |
SELECT name, price FROM products WHERE price >= 180 ORDER BY price DESC, name | Select the name and price of all products with a price larger than or equal to $180, and sort first by price (in descending order), and then by name (in ascending order). | CREATE TABLE products (name VARCHAR, price VARCHAR) |
SELECT "Womens doubles" FROM table_19791 WHERE "Mens doubles" = 'Reinhold Pum Karl Buchart' AND "Mixed doubles" = 'Hermann Fröhlich Lore Voit' | who is the the womens doubles with mens doubles being reinhold pum karl buchart and mixed doubles being hermann fr hlich lore voit | CREATE TABLE table_19791 (
"Year" real,
"Mens singles" text,
"Womens singles" text,
"Mens doubles" text,
"Womens doubles" text,
"Mixed doubles" text
) |
SELECT location_attendance FROM table_17326036_6 WHERE date = "December 15" | What was the attendance and location on December 15? | CREATE TABLE table_17326036_6 (location_attendance VARCHAR, date VARCHAR) |
SELECT * FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code | Select all the data from the products and each product's manufacturer. | CREATE TABLE products (manufacturer VARCHAR); CREATE TABLE Manufacturers (code VARCHAR) |
SELECT COUNT("Original air date") FROM table_24188 WHERE "Production code" = '4398016' | How many original air dates were there for episodes with a production code of 4398016? | CREATE TABLE table_24188 (
"No in Series" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real,
"U.S. viewers (millions)" text
) |
SELECT COUNT(game) FROM table_17326036_6 WHERE team = "@ Memphis" | How many games were recorded when the team was @ Memphis? | CREATE TABLE table_17326036_6 (game VARCHAR, team VARCHAR) |
SELECT AVG(Price), Manufacturer FROM Products GROUP BY Manufacturer | Select the average price of each manufacturer's products, showing only the manufacturer's code. | CREATE TABLE Products (Manufacturer VARCHAR, Price INTEGER) |
SELECT TagName FROM Tags ORDER BY Count | Select TagName From Tags Order By Count Asc. | CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number... |
SELECT score FROM table_17326036_6 WHERE high_rebounds = "Jeff Foster (10)" | What was the score of the game when the high rebounds Jeff Foster (10)? | CREATE TABLE table_17326036_6 (score VARCHAR, high_rebounds VARCHAR) |
SELECT AVG(T1.Price), T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name | Select the average price of each manufacturer's products, showing the manufacturer's name. | CREATE TABLE Manufacturers (name VARCHAR, code VARCHAR); CREATE TABLE products (Price INTEGER, manufacturer VARCHAR) |
SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "On Road" INTERSECT SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "Shipped" | Find the names of the customers who have order status both 'On Road' and 'Shipped'. | CREATE TABLE invoices (
invoice_number number,
invoice_date time,
invoice_details text
)
CREATE TABLE shipment_items (
shipment_id number,
order_item_id number
)
CREATE TABLE order_items (
order_item_id number,
product_id number,
order_id number,
order_item_status text,
order_i... |
SELECT team FROM table_17327458_1 WHERE date_of_appointment = "12 June" | What team appointed a manager on 12 June? | CREATE TABLE table_17327458_1 (team VARCHAR, date_of_appointment VARCHAR) |
SELECT AVG(T1.Price), T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name HAVING AVG(T1.price) >= 150 | Select the names of manufacturer whose products have an average price higher than or equal to $150. | CREATE TABLE Manufacturers (name VARCHAR, code VARCHAR); CREATE TABLE products (Price INTEGER, manufacturer VARCHAR, price INTEGER) |
SELECT ACC_Road, Team_ID FROM basketball_match GROUP BY All_Home, ACC_Road | Return a bar chart about the distribution of ACC_Road and Team_ID , and group by attribute All_Home. | 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 replaced_by FROM table_17327458_1 WHERE date_of_appointment = "11 July" | Who was replaced on 11 July? | CREATE TABLE table_17327458_1 (replaced_by VARCHAR, date_of_appointment VARCHAR) |
SELECT name, price FROM Products ORDER BY price LIMIT 1 | Select the name and price of the cheapest product. | CREATE TABLE Products (name VARCHAR, price VARCHAR) |
SELECT bowl_game FROM table_16046689_29 WHERE city = "Tempe, Arizona" | What is the name of the bowl game that was played in Tempe, Arizona? | CREATE TABLE table_16046689_29 (
bowl_game VARCHAR,
city VARCHAR
) |
SELECT outgoing_manager FROM table_17327458_1 WHERE date_of_vacancy = "29 May" | Who left a position on 29 May? | CREATE TABLE table_17327458_1 (outgoing_manager VARCHAR, date_of_vacancy VARCHAR) |
SELECT T1.Name, MAX(T1.Price), T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name | Select the name of each manufacturer along with the name and price of its most expensive product. | CREATE TABLE Manufacturers (name VARCHAR, code VARCHAR); CREATE TABLE products (Name VARCHAR, Price INTEGER, manufacturer VARCHAR) |
SELECT Name, Seating FROM track WHERE Year_Opened > 2000 ORDER BY Seating | Return a histogram on what are the names and seatings for all tracks opened after 2000, ordered by seating? | CREATE TABLE race (
Race_ID int,
Name text,
Class text,
Date text,
Track_ID text
)
CREATE TABLE track (
Track_ID int,
Name text,
Location text,
Seating real,
Year_Opened real
) |
SELECT outgoing_manager FROM table_17327458_1 WHERE date_of_vacancy = "24 January" | Who left a position on 24 January? | CREATE TABLE table_17327458_1 (outgoing_manager VARCHAR, date_of_vacancy VARCHAR) |
SELECT code, name, MIN(price) FROM products GROUP BY name | Select the code of the product that is cheapest in each product category. | CREATE TABLE products (code VARCHAR, name VARCHAR, price INTEGER) |
SELECT First_year, COUNT(First_year) FROM party WHERE Party_Theme = "Spring" OR Party_Theme = "Teqnology" ORDER BY COUNT(First_year) | Show the total number of the first year of parties with the theme 'Spring' or 'Teqnology' with a bar chart, bin the first year into weekday interval and count the first year, and I want to display y axis from low to high order. | CREATE TABLE party_host (
Party_ID int,
Host_ID int,
Is_Main_in_Charge bool
)
CREATE TABLE host (
Host_ID int,
Name text,
Nationality text,
Age text
)
CREATE TABLE party (
Party_ID int,
Party_Theme text,
Location text,
First_year text,
Last_year text,
Number_of_host... |
SELECT COUNT(manner_of_departure) FROM table_17327458_1 WHERE date_of_vacancy = "25 May" | How many vacancies happened on 25 May? | CREATE TABLE table_17327458_1 (manner_of_departure VARCHAR, date_of_vacancy VARCHAR) |
SELECT problem_log_id FROM problem_log ORDER BY log_entry_date DESC LIMIT 1 | What is the id of the problem log that is created most recently? | CREATE TABLE problem_log (problem_log_id VARCHAR, log_entry_date VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "WHITE" AND demographic.dob_year < "2058" | provide the number of patients whose ethnicity is white and year of birth is less than 2058? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... |
SELECT COUNT(fin_pos) FROM table_17330069_1 WHERE points = "15" | If the points is 15, what is the fin. pos? | CREATE TABLE table_17330069_1 (fin_pos VARCHAR, points VARCHAR) |
SELECT problem_log_id, problem_id FROM problem_log ORDER BY log_entry_date LIMIT 1 | What is the oldest log id and its corresponding problem id? | CREATE TABLE problem_log (problem_log_id VARCHAR, problem_id VARCHAR, log_entry_date VARCHAR) |
SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE course.department LIKE '%MODGREEK%' AND program_course.category LIKE 'PreMajor' AND program_course.course_id = course.course_id | Which classes are required to declare MODGREEK my major ? | CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar,
friday varchar,
saturday varchar,
sunday varchar,
has_final_proje... |
SELECT MIN(car_no) FROM table_17330069_1 WHERE driver = "Hélio Castroneves" | What is the car number for driver Hélio Castroneves | CREATE TABLE table_17330069_1 (car_no INTEGER, driver VARCHAR) |
SELECT problem_log_id, log_entry_date FROM problem_log WHERE problem_id = 10 | Find all the ids and dates of the logs for the problem whose id is 10. | CREATE TABLE problem_log (problem_log_id VARCHAR, log_entry_date VARCHAR, problem_id VARCHAR) |
SELECT DISTINCT course.number FROM course, program_course WHERE (course.number = 452 OR course.number = 473) AND course.department = 'EECS' AND program_course.course_id = course.course_id ORDER BY program_course.workload DESC LIMIT 1 | Given 452 and 473 , which course is harder ? | CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
... |
SELECT MIN(fin_pos) FROM table_17330069_1 WHERE grid = 2 | If grid is 2, what is the minimum fin. pos number? | CREATE TABLE table_17330069_1 (fin_pos INTEGER, grid VARCHAR) |
SELECT problem_log_id, log_entry_description FROM problem_log | List all the log ids and their descriptions from the problem logs. | CREATE TABLE problem_log (problem_log_id VARCHAR, log_entry_description VARCHAR) |
SELECT author FROM table_name_87 WHERE first_issue = "september 2010" | What is the Author of the Title with a First Issue of September 2010? | CREATE TABLE table_name_87 (
author VARCHAR,
first_issue VARCHAR
) |
SELECT time_retired FROM table_17330069_1 WHERE points = "28" | If there are 28 points, what is the time/retired? | CREATE TABLE table_17330069_1 (time_retired VARCHAR, points VARCHAR) |
SELECT DISTINCT staff_first_name, staff_last_name FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T2.problem_id = 1 | List the first and last names of all distinct staff members who are assigned to the problem whose id is 1. | CREATE TABLE problem_log (assigned_to_staff_id VARCHAR, problem_id VARCHAR); CREATE TABLE staff (staff_id VARCHAR) |
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT lab.patientunitstayid FROM lab WHERE lab.labname = '-eos' AND STRFTIME('%y', lab.labresulttime) <= '2102') | calculate the number of patients who had had a -eos lab test until 2102. | CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
h... |
SELECT COUNT(winning_score) FROM table_17335602_1 WHERE tournament = "RR Donnelley LPGA Founders Cup" | How many winning scores were there in the rr donnelley lpga founders cup? | CREATE TABLE table_17335602_1 (winning_score VARCHAR, tournament VARCHAR) |
SELECT DISTINCT T2.problem_id, T2.problem_log_id FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T1.staff_first_name = "Rylan" AND T1.staff_last_name = "Homenick" | List the problem id and log id which are assigned to the staff named Rylan Homenick. | CREATE TABLE problem_log (problem_id VARCHAR, problem_log_id VARCHAR, assigned_to_staff_id VARCHAR); CREATE TABLE staff (staff_id VARCHAR, staff_first_name VARCHAR, staff_last_name VARCHAR) |
SELECT city_of_license FROM table_name_1 WHERE frequency = "0 106.9 fm" | Tell me the city of license for 0 106.9 fm | CREATE TABLE table_name_1 (
city_of_license VARCHAR,
frequency VARCHAR
) |
SELECT date FROM table_17335602_1 WHERE tournament = "McDonald's LPGA Championship" | When was the mcdonald's lpga championship? | CREATE TABLE table_17335602_1 (date VARCHAR, tournament VARCHAR) |
SELECT COUNT(*) FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id WHERE T1.product_name = "voluptatem" | How many problems are there for product voluptatem? | CREATE TABLE problems (product_id VARCHAR); CREATE TABLE product (product_id VARCHAR, product_name VARCHAR) |
SELECT SUM(rank) FROM table_name_36 WHERE notes = "fb" AND time = "6:47.30" | What is the rank of the athletes that have Notes of fb, and a Time of 6:47.30? | CREATE TABLE table_name_36 (
rank INTEGER,
notes VARCHAR,
time VARCHAR
) |
SELECT MAX(winners_share___) AS $__ FROM table_17335602_1 WHERE tournament = "Wegmans LPGA Championship" | What was the winner's share in the wegmans lpga championship? | CREATE TABLE table_17335602_1 (winners_share___ INTEGER, tournament VARCHAR) |
SELECT COUNT(*), T1.product_name FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_name ORDER BY COUNT(*) DESC LIMIT 1 | How many problems does the product with the most problems have? List the number of the problems and product name. | CREATE TABLE problems (product_id VARCHAR); CREATE TABLE product (product_name VARCHAR, product_id VARCHAR) |
SELECT AVG(demographic.age) FROM demographic WHERE demographic.gender = "F" AND demographic.expire_flag = "1" | find the average age of female patients with death status 1. | 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 kerry_number FROM table_1733457_1 WHERE others_number = 44 | Name the kerry # for others# is 44 | CREATE TABLE table_1733457_1 (kerry_number VARCHAR, others_number VARCHAR) |
SELECT T1.problem_description FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "Christop" | Give me a list of descriptions of the problems that are reported by the staff whose first name is Christop. | CREATE TABLE staff (staff_id VARCHAR, staff_first_name VARCHAR); CREATE TABLE problems (problem_description VARCHAR, reported_by_staff_id VARCHAR) |
SELECT original_airdate FROM table_17467447_1 WHERE us_viewers__million_ = "5.50" | What is the air date when the U.S. viewers was 5.50 million? | CREATE TABLE table_17467447_1 (
original_airdate VARCHAR,
us_viewers__million_ VARCHAR
) |
SELECT MIN(kerry_number) FROM table_1733457_1 WHERE bush_percentage = "50.9%" | Name the minimum kerry # for bush % for 50.9% | CREATE TABLE table_1733457_1 (kerry_number INTEGER, bush_percentage VARCHAR) |
SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_last_name = "Bosco" | Find the ids of the problems that are reported by the staff whose last name is Bosco. | CREATE TABLE problems (problem_id VARCHAR, reported_by_staff_id VARCHAR); CREATE TABLE staff (staff_id VARCHAR, staff_last_name VARCHAR) |
SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE course.department LIKE '%EECS%' AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id | What are the EECS major 's ULCS courses ? | CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar,
friday varchar,
saturday varchar,
sunday varchar,
has_final_proje... |
SELECT others_percentage FROM table_1733457_1 WHERE county = "Johnson" | Name the others % for johnson | CREATE TABLE table_1733457_1 (others_percentage VARCHAR, county VARCHAR) |
SELECT problem_id FROM problems WHERE date_problem_reported > "1978-06-26" | What are the ids of the problems which are reported after 1978-06-26? | CREATE TABLE problems (problem_id VARCHAR, date_problem_reported INTEGER) |
SELECT AVG("Played") FROM table_46004 WHERE "Wins" < '11' AND "Goals for" > '42' AND "Points" > '22' AND "Losses" = '11' | What is the average number played that has fewer than 11 wins, more than 42 goals, more than 22 points, and 11 losses? | CREATE TABLE table_46004 (
"Position" real,
"Played" real,
"Points" real,
"Wins" real,
"Draws" real,
"Losses" real,
"Goals for" real,
"Goals against" real,
"Goal Difference" real
) |
SELECT MAX(kerry_number) FROM table_1733457_1 WHERE others_number = 47 | Name the maximum kerry # for where others is 47 | CREATE TABLE table_1733457_1 (kerry_number INTEGER, others_number VARCHAR) |
SELECT problem_id FROM problems WHERE date_problem_reported < "1978-06-26" | What are the ids of the problems which are reported before 1978-06-26? | CREATE TABLE problems (problem_id VARCHAR, date_problem_reported INTEGER) |
SELECT SUM("Byes") FROM table_58899 WHERE "Against" < '737' | How many byes were then when there were less than 737 against? | CREATE TABLE table_58899 (
"Glenelg FL" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
) |
SELECT bush_percentage FROM table_1733457_1 WHERE others_number = 90 | Name the bush% for where others # is 90 | CREATE TABLE table_1733457_1 (bush_percentage VARCHAR, others_number VARCHAR) |
SELECT COUNT(*), T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_id | For each product which has problems, what are the number of problems and the product id? | CREATE TABLE problems (product_id VARCHAR); CREATE TABLE product (product_id VARCHAR) |
SELECT "District" FROM table_27290 WHERE "Incumbent" = 'Mike Rogers' | Name the district for mike rogers | CREATE TABLE table_27290 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) |
SELECT others_percentage FROM table_1733457_1 WHERE county = "Cleveland" | Name the others % for cleveland | CREATE TABLE table_1733457_1 (others_percentage VARCHAR, county VARCHAR) |
SELECT COUNT(*), T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T1.date_problem_reported > "1986-11-13" GROUP BY T2.product_id | For each product that has problems, find the number of problems reported after 1986-11-13 and the product id? | CREATE TABLE product (product_id VARCHAR); CREATE TABLE problems (product_id VARCHAR, date_problem_reported INTEGER) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dod_year <= "2126.0" AND procedures.short_title = "Umbilical vein cath" | give me the number of patients whose year of death is less than or equal to 2126 and procedure short title is umbilical vein cath? | 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 others_percentage FROM table_1733513_1 WHERE others_number = 2286 | What is the percentage of others when the number of others is 2286? | CREATE TABLE table_1733513_1 (others_percentage VARCHAR, others_number VARCHAR) |
SELECT DISTINCT product_name FROM product ORDER BY product_name | List the names of all the distinct product names in alphabetical order? | CREATE TABLE product (product_name VARCHAR) |
SELECT "Category" FROM table_58546 WHERE "Year" = '2010' AND "Result" = 'nominated' AND "Awards" = 'british soap awards' | What category was nominated in 2010 fo the British Soap Awards? | CREATE TABLE table_58546 (
"Awards" text,
"Year" real,
"Category" text,
"Result" text,
"Production" text,
"Roll" text
) |
SELECT others_percentage FROM table_1733513_1 WHERE bush_number = 3196 | What was the percentage of others when the number for Bush was 3196? | CREATE TABLE table_1733513_1 (others_percentage VARCHAR, bush_number VARCHAR) |
SELECT DISTINCT product_name FROM product ORDER BY product_id | List all the distinct product names ordered by product id? | CREATE TABLE product (product_name VARCHAR, product_id VARCHAR) |
SELECT staffel_d FROM table_name_51 WHERE staffel_e = "motor suhl" AND season = "1983-84" | What is the Staffel D in the season 1983-84 with a Staffel E of Motor Suhl? | CREATE TABLE table_name_51 (
staffel_d VARCHAR,
staffel_e VARCHAR,
season VARCHAR
) |
SELECT others_percentage FROM table_1733513_1 WHERE bush_number = 1329 | What is the percentage of others when the number for Bush is 1329? | CREATE TABLE table_1733513_1 (others_percentage VARCHAR, bush_number VARCHAR) |
SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "Dameon" AND T2.staff_last_name = "Frami" UNION SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "Jolie" AND T2.staff_las... | What are the id of problems reported by the staff named Dameon Frami or Jolie Weber? | CREATE TABLE staff (staff_id VARCHAR, staff_first_name VARCHAR, staff_last_name VARCHAR); CREATE TABLE problems (reported_by_staff_id VARCHAR) |
SELECT MIN("Position") FROM table_46667 WHERE "Goals For" > '95' | For a team having goals for more than 95, what is the lowest position? | CREATE TABLE table_46667 (
"Position" real,
"Team" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Goals For" real,
"Goals Against" real,
"Goal Average 1" real,
"Points 2" real
) |
SELECT game FROM table_17340355_6 WHERE team = "Milwaukee" | Which game was played by team milwaukee | CREATE TABLE table_17340355_6 (game VARCHAR, team VARCHAR) |
SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "Christop" AND T2.staff_last_name = "Berge" INTERSECT SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.closure_authorised_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "Ashley"... | What are the product ids for the problems reported by Christop Berge with closure authorised by Ashley Medhurst? | CREATE TABLE problems (reported_by_staff_id VARCHAR, closure_authorised_by_staff_id VARCHAR); CREATE TABLE staff (staff_id VARCHAR, staff_first_name VARCHAR, staff_last_name VARCHAR) |
SELECT constituency_number FROM table_name_62 WHERE name = "pandhana" | What is the Constituency number for Pandhana? | CREATE TABLE table_name_62 (
constituency_number VARCHAR,
name VARCHAR
) |
SELECT high_assists FROM table_17340355_6 WHERE score = "W 106–104 (OT)" | Who made high points on games of score w 106–104 (ot) | CREATE TABLE table_17340355_6 (high_assists VARCHAR, score VARCHAR) |
SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported < (SELECT MIN(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = "Lysanne" AND T4.staff_last_name = "Turcotte") | What are the ids of the problems reported before the date of any problem reported by Lysanne Turcotte? | CREATE TABLE problems (problem_id VARCHAR, reported_by_staff_id VARCHAR); CREATE TABLE staff (staff_id VARCHAR, staff_first_name VARCHAR, staff_last_name VARCHAR); CREATE TABLE problems (reported_by_staff_id VARCHAR); CREATE TABLE staff (staff_id VARCHAR) |
SELECT COUNT("Wins") FROM table_7483 WHERE "Rank" = '98' AND "Scoring average" > '73.52' | What is the total number of Wins when 98 is the rank and the scoring average is more than 73.52? | CREATE TABLE table_7483 (
"Year" real,
"Events played" real,
"Cuts made" real,
"Wins" real,
"2nds" real,
"Top 10s" real,
"Best finish" text,
"Earnings ($)" real,
"Rank" text,
"Scoring average" real,
"Scoring rank" text
) |
SELECT COUNT(record) FROM table_17340355_6 WHERE high_rebounds = "Amar'e Stoudemire (11)" | What are the records of games where high rebounds is amar'e stoudemire (11) | CREATE TABLE table_17340355_6 (record VARCHAR, high_rebounds VARCHAR) |
SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported > (SELECT MAX(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = "Rylan" AND T4.staff_last_name = "Homenick") | What are the ids of the problems reported after the date of any problems reported by Rylan Homenick? | CREATE TABLE problems (problem_id VARCHAR, reported_by_staff_id VARCHAR); CREATE TABLE staff (staff_id VARCHAR, staff_first_name VARCHAR, staff_last_name VARCHAR); CREATE TABLE problems (reported_by_staff_id VARCHAR); CREATE TABLE staff (staff_id VARCHAR) |
SELECT nationality, COUNT(*) FROM swimmer GROUP BY nationality HAVING COUNT(*) > 1 | List countries that have more than one swimmer. | CREATE TABLE swimmer (
nationality VARCHAR
) |
SELECT location_attendance FROM table_17340355_6 WHERE date = "December 10" | What is the location of the the game on december 10 | CREATE TABLE table_17340355_6 (location_attendance VARCHAR, date VARCHAR) |
SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name ORDER BY COUNT(*) DESC LIMIT 3 | Find the top 3 products which have the largest number of problems? | CREATE TABLE problems (product_id VARCHAR); CREATE TABLE product (product_name VARCHAR, product_id VARCHAR) |
SELECT "Label" FROM table_71781 WHERE "Region" = 'germany' | Which label is from the Germany region? | CREATE TABLE table_71781 (
"Date" text,
"Region" text,
"Label" text,
"Catalogue" text,
"Format" text
) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.