answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT COUNT(*) FROM customers GROUP BY customer_type_code ORDER BY COUNT(*) DESC LIMIT 1 | How many customers are there in the customer type with the most customers? | CREATE TABLE customers (customer_type_code VARCHAR) |
SELECT "Games played" FROM table_13067 WHERE "Wins" = '13' AND "Goals conceded" = '45' | How many games have been played when there are 13 wins and 45 goals were conceded? | CREATE TABLE table_13067 (
"Position" real,
"Club" text,
"Games played" real,
"Wins" real,
"Draws" real,
"Loses" real,
"Goals scored" real,
"Goals conceded" real,
"Points" real
) |
SELECT COUNT(lost) FROM table_17625749_1 WHERE tries_for = "109" | Name the number of lost where tries for is 109 | CREATE TABLE table_17625749_1 (lost VARCHAR, tries_for VARCHAR) |
SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id ORDER BY t2.date_complaint_raised LIMIT 1 | What is the last name of the staff who has handled the first ever complaint? | CREATE TABLE staff (last_name VARCHAR, staff_id VARCHAR); CREATE TABLE complaints (staff_id VARCHAR, date_complaint_raised VARCHAR) |
SELECT "Game Site" FROM table_34084 WHERE "Record" = '2-3' | Where is the game site for the game that had a packers record of 2-3? | CREATE TABLE table_34084 (
"Week" real,
"Date" text,
"Opponent" text,
"Time / Time Zone" text,
"Game Site" text,
"Final Score" text,
"Record" text,
"Match Report" text
) |
SELECT won FROM table_17625749_1 WHERE tries_against = "72" | Name the won when tries against is 72 | CREATE TABLE table_17625749_1 (won VARCHAR, tries_against VARCHAR) |
SELECT COUNT(DISTINCT complaint_type_code) FROM complaints | How many distinct complaint type codes are there in the database? | CREATE TABLE complaints (complaint_type_code VARCHAR) |
SELECT DISTINCT flight.flight_id FROM airport_service, city, flight WHERE (city.city_code = airport_service.city_code AND city.city_name = 'ATLANTA' AND flight.departure_time BETWEEN 0 AND 1200 AND flight.to_airport = airport_service.airport_code) AND flight.airline_code = 'DL' | what is DL 's schedule of morning flights to ATLANTA | CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name var... |
SELECT points_against FROM table_17625749_1 WHERE drawn = "1" AND points = "51" | Name the points aginst when drawn is 1 and points is 51 | CREATE TABLE table_17625749_1 (points_against VARCHAR, drawn VARCHAR, points VARCHAR) |
SELECT address_line_1, address_line_2 FROM customers WHERE email_address = "vbogisich@example.org" | Find the address line 1 and 2 of the customer with email "vbogisich@example.org". | CREATE TABLE customers (address_line_1 VARCHAR, address_line_2 VARCHAR, email_address VARCHAR) |
SELECT "Place" FROM table_47178 WHERE "Score" < '70' | What is the place of the player who scored less than 70? | CREATE TABLE table_47178 (
"Place" text,
"Player" text,
"Country" text,
"Score" real,
"To par" text
) |
SELECT original_air_date FROM table_17625876_1 WHERE no_in_season = 1 | Name the original air date for number in season being 1 | CREATE TABLE table_17625876_1 (original_air_date VARCHAR, no_in_season VARCHAR) |
SELECT complaint_status_code, COUNT(*) FROM complaints WHERE complaint_type_code = "Product Failure" GROUP BY complaint_status_code | Find the number of complaints with Product Failure type for each complaint status. | CREATE TABLE complaints (complaint_status_code VARCHAR, complaint_type_code VARCHAR) |
SELECT location FROM table_name_71 WHERE record = "6-11-8" | What is the location of the game with a 6-11-8 record? | CREATE TABLE table_name_71 (
location VARCHAR,
record VARCHAR
) |
SELECT won FROM table_17625749_3 WHERE lost = "5" | How many were won when 5 were lost? | CREATE TABLE table_17625749_3 (won VARCHAR, lost VARCHAR) |
SELECT t1.first_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id GROUP BY t2.staff_id ORDER BY COUNT(*) LIMIT 5 | What is first names of the top 5 staff who have handled the greatest number of complaints? | CREATE TABLE complaints (staff_id VARCHAR); CREATE TABLE staff (first_name VARCHAR, staff_id VARCHAR) |
SELECT dvd_release_date FROM table_name_74 WHERE season < 8 AND episodes < 13 | On what date was the DVD released for the season with fewer than 13 episodes that aired before season 8? | CREATE TABLE table_name_74 (
dvd_release_date VARCHAR,
season VARCHAR,
episodes VARCHAR
) |
SELECT drawn FROM table_17625749_3 WHERE lost = "13" | How many were drawn when 13 were lost? | CREATE TABLE table_17625749_3 (drawn VARCHAR, lost VARCHAR) |
SELECT state FROM customers GROUP BY state ORDER BY COUNT(*) LIMIT 1 | Which state has the most customers? | CREATE TABLE customers (state VARCHAR) |
SELECT "Country" FROM table_1111 WHERE "Rank" = '5' | Which country has a rank of 5? | CREATE TABLE table_1111 (
"Rank" real,
"Country" text,
"UNWTO Region" text,
"International tourist arrivals (2012)" text,
"International tourist arrivals (2011)" text,
"Change (2011 to 2012)" text,
"Change (2010 to 2011)" text
) |
SELECT points_for FROM table_17625749_3 WHERE tries_against = "63" | How many points are there for 63 tries against? | CREATE TABLE table_17625749_3 (points_for VARCHAR, tries_against VARCHAR) |
SELECT COUNT(*) FROM submission | How many submissions are there? | CREATE TABLE submission (Id VARCHAR) |
SELECT opponent FROM table_name_7 WHERE score = "109–108" | Who was the opponent with a score of 109 108? | CREATE TABLE table_name_7 (
opponent VARCHAR,
score VARCHAR
) |
SELECT try_bonus FROM table_17625749_3 WHERE tries_against = "17" | What is the try bonus when the tries against are 17? | CREATE TABLE table_17625749_3 (try_bonus VARCHAR, tries_against VARCHAR) |
SELECT Author FROM submission ORDER BY Scores | List the authors of submissions in ascending order of scores. | CREATE TABLE submission (Author VARCHAR, Scores VARCHAR) |
SELECT TIME_TO_STR(CreationDate, '%j'), CAST(SUM(CASE WHEN AnswerCount > 0 THEN 1 ELSE 0 END) AS FLOAT) / COUNT(Posts.Id) AS Ratio FROM Posts WHERE (PostTypeId = 1 AND CreationDate >= '##Date1##' AND CreationDate <= '##Date2##') GROUP BY TIME_TO_STR(CreationDate, '%j') ORDER BY TIME_TO_STR(CreationDate, '%j') | Percentage of questions with at least one answer (restrict dates). | CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
Creation... |
SELECT tries_for FROM table_17625749_3 WHERE won = "11" | How many tries for are there when 11 were won? | CREATE TABLE table_17625749_3 (tries_for VARCHAR, won VARCHAR) |
SELECT Author, College FROM submission | What are the authors of submissions and their colleges? | CREATE TABLE submission (Author VARCHAR, College VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Other alter consciousnes" AND lab.fluid = "Ascites" | how many patients diagnosed with short title other alter consciousnes have had ascites fluid lab test? | 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(points) FROM table_17625749_3 WHERE losing_bonus = "2" AND points_for = "642" | How many points categories are there when the losing bonus is 2 and points for are 642? | CREATE TABLE table_17625749_3 (points VARCHAR, losing_bonus VARCHAR, points_for VARCHAR) |
SELECT Author FROM submission WHERE College = "Florida" OR College = "Temple" | Show the names of authors from college "Florida" or "Temple" | CREATE TABLE submission (Author VARCHAR, College VARCHAR) |
SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%MDE%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_cou... | What is the easiest class to fulfill the MDE requirement for me ? | 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 COUNT(written_by) FROM table_17641206_2 WHERE viewership = "6.34 million" | How many people wrote the episode that had 6.34 million viewers? | CREATE TABLE table_17641206_2 (written_by VARCHAR, viewership VARCHAR) |
SELECT AVG(Scores) FROM submission | What is the average score of submissions? | CREATE TABLE submission (Scores INTEGER) |
SELECT COUNT(games_played) FROM table_18018214_4 WHERE points = 22 | How many games had 22 points? | CREATE TABLE table_18018214_4 (
games_played VARCHAR,
points VARCHAR
) |
SELECT original_title FROM table_17641206_4 WHERE viewership = "5.04 million" | What was the title of the episode with 5.04 million viewers? | CREATE TABLE table_17641206_4 (original_title VARCHAR, viewership VARCHAR) |
SELECT Author FROM submission ORDER BY Scores DESC LIMIT 1 | What is the author of the submission with the highest score? | CREATE TABLE submission (Author VARCHAR, Scores VARCHAR) |
SELECT circuit FROM table_name_79 WHERE date = "10 may" AND name = "targa florio" | Tell me the circuit for 10 may for targa florio | CREATE TABLE table_name_79 (
circuit VARCHAR,
date VARCHAR,
name VARCHAR
) |
SELECT original_airdate FROM table_17641206_4 WHERE viewership = "4.77 million" | What was the first airdate with a viewership of 4.77 million? | CREATE TABLE table_17641206_4 (original_airdate VARCHAR, viewership VARCHAR) |
SELECT College, COUNT(*) FROM submission GROUP BY College | Show different colleges along with the number of authors of submission from each college. | CREATE TABLE submission (College VARCHAR) |
SELECT t1.product_name, COUNT(*) FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_name | What are all the different product names, and how many complains has each received? | CREATE TABLE customers (
customer_id number,
customer_type_code text,
address_line_1 text,
address_line_2 text,
town_city text,
state text,
email_address text,
phone_number text
)
CREATE TABLE products (
product_id number,
parent_product_id number,
product_category_code text... |
SELECT COUNT(duration) FROM table_17641206_4 WHERE written_by = "John Sullivan" | How many episodes of 30 minutes were written by John Sullivan? | CREATE TABLE table_17641206_4 (duration VARCHAR, written_by VARCHAR) |
SELECT College FROM submission GROUP BY College ORDER BY COUNT(*) DESC LIMIT 1 | Show the most common college of authors of submissions. | CREATE TABLE submission (College VARCHAR) |
SELECT "Visiting Team" FROM table_68754 WHERE "Stadium" = 'hubert h. humphrey metrodome' | Who was the visiting team who played at the hubert h. humphrey metrodome stadium? | CREATE TABLE table_68754 (
"Date" text,
"Visiting Team" text,
"Final Score" text,
"Host Team" text,
"Stadium" text
) |
SELECT directed_by FROM table_17641206_4 WHERE written_by = "John Sullivan" | Who was the director when the writer was John Sullivan? | CREATE TABLE table_17641206_4 (directed_by VARCHAR, written_by VARCHAR) |
SELECT College FROM submission WHERE Scores > 90 INTERSECT SELECT College FROM submission WHERE Scores < 80 | Show the colleges that have both authors with submission score larger than 90 and authors with submission score smaller than 80. | CREATE TABLE submission (College VARCHAR, Scores INTEGER) |
SELECT attendance FROM table_name_86 WHERE record = "43-28" | What is the attendance that has a record of 43-28? | CREATE TABLE table_name_86 (
attendance VARCHAR,
record VARCHAR
) |
SELECT directed_by FROM table_17641206_8 WHERE written_by = "John Sullivan" AND original_airdate = "15January2009" | What are the movies that are written and dircted by john sullivan with the airdate of 15january2009. | CREATE TABLE table_17641206_8 (directed_by VARCHAR, written_by VARCHAR, original_airdate VARCHAR) |
SELECT T2.Author, T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID | Show the authors of submissions and the acceptance results of their submissions. | CREATE TABLE acceptance (Result VARCHAR, Submission_ID VARCHAR); CREATE TABLE submission (Author VARCHAR, Submission_ID VARCHAR) |
SELECT MAX(pos) FROM table_25887826_17 WHERE avg = "1.8529" | How many POS when the average is 1.8529? | CREATE TABLE table_25887826_17 (
pos INTEGER,
avg VARCHAR
) |
SELECT COUNT(episode) FROM table_17641206_8 WHERE original_airdate = "22January2009" | How many episodes aired on 22january2009 | CREATE TABLE table_17641206_8 (episode VARCHAR, original_airdate VARCHAR) |
SELECT T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY T2.Scores DESC LIMIT 1 | Show the result of the submission with the highest score. | CREATE TABLE acceptance (Result VARCHAR, Submission_ID VARCHAR); CREATE TABLE submission (Submission_ID VARCHAR, Scores VARCHAR) |
SELECT away_team FROM table_name_41 WHERE venue = "junction oval" | who is the away team when played at junction oval? | CREATE TABLE table_name_41 (
away_team VARCHAR,
venue VARCHAR
) |
SELECT MIN(transfers_out) FROM table_17650725_1 WHERE total_transfers = 21 | Name the least transfers out when transfers is 21 | CREATE TABLE table_17650725_1 (transfers_out INTEGER, total_transfers VARCHAR) |
SELECT T2.Author, COUNT(DISTINCT T1.workshop_id) FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author | Show each author and the number of workshops they submitted to. | CREATE TABLE submission (Author VARCHAR, Submission_ID VARCHAR); CREATE TABLE acceptance (workshop_id VARCHAR, Submission_ID VARCHAR) |
SELECT "League" FROM table_73331 WHERE "Year" = '2008' | What league was involved in 2008? | CREATE TABLE table_73331 (
"Year" real,
"Division" real,
"League" text,
"Reg. Season" text,
"Playoffs" text,
"National Open" text
) |
SELECT MIN(total_transfers) FROM table_17650725_1 WHERE country = "Romania" | Name the least total transfers for romania | CREATE TABLE table_17650725_1 (total_transfers INTEGER, country VARCHAR) |
SELECT T2.Author FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author HAVING COUNT(DISTINCT T1.workshop_id) > 1 | Show the authors who have submissions to more than one workshop. | CREATE TABLE submission (Author VARCHAR, Submission_ID VARCHAR); CREATE TABLE acceptance (Submission_ID VARCHAR, workshop_id VARCHAR) |
SELECT "Place" FROM table_78597 WHERE "Score" = '67' | What is the Place of the Player with a Score of 67? | CREATE TABLE table_78597 (
"Place" text,
"Player" text,
"Country" text,
"Score" real,
"To par" text
) |
SELECT MIN(internal_transfers) FROM table_17650725_1 | Name the least internal transfers | CREATE TABLE table_17650725_1 (internal_transfers INTEGER) |
SELECT Date, Venue FROM workshop ORDER BY Venue | Show the date and venue of each workshop in ascending alphabetical order of the venue. | CREATE TABLE workshop (Date VARCHAR, Venue VARCHAR) |
SELECT color_commentator_s_ FROM table_name_42 WHERE sideline_reporter_s_ = "eric dickerson and melissa stark" AND year = 2001 | Who was the color commentator for Eric Dickerson and Melissa Stark in 2001? | CREATE TABLE table_name_42 (
color_commentator_s_ VARCHAR,
sideline_reporter_s_ VARCHAR,
year VARCHAR
) |
SELECT COUNT(status) FROM table_176529_2 WHERE official_name = "Moncton" | How many status are there for Moncton? | CREATE TABLE table_176529_2 (status VARCHAR, official_name VARCHAR) |
SELECT Author FROM submission WHERE NOT Submission_ID IN (SELECT Submission_ID FROM acceptance) | List the authors who do not have submission to any workshop. | CREATE TABLE acceptance (Author VARCHAR, Submission_ID VARCHAR); CREATE TABLE submission (Author VARCHAR, Submission_ID VARCHAR) |
SELECT school FROM table_name_73 WHERE location = "trafalgar" | Which school is located in trafalgar? | CREATE TABLE table_name_73 (
school VARCHAR,
location VARCHAR
) |
SELECT census_ranking FROM table_176529_2 WHERE population = 959 | What is the census ranking of the location with population of 959? | CREATE TABLE table_176529_2 (census_ranking VARCHAR, population VARCHAR) |
SELECT COUNT(*) FROM INVESTORS | Find the number of investors in total. | CREATE TABLE INVESTORS (Id VARCHAR) |
SELECT MAX(lost) FROM table_name_40 WHERE drawn < 6 AND goals_against < 44 AND points_1 = "27" | What is the highest lost entry that has a drawn entry less than 6, goals against less than 44, and a points 1 entry of 27? | CREATE TABLE table_name_40 (
lost INTEGER,
points_1 VARCHAR,
drawn VARCHAR,
goals_against VARCHAR
) |
SELECT official_name FROM table_176529_2 WHERE area_km_2 = "582.20" | What is the name of the place with 582.20 square km area? | CREATE TABLE table_176529_2 (official_name VARCHAR, area_km_2 VARCHAR) |
SELECT Investor_details FROM INVESTORS | Show all investor details. | CREATE TABLE INVESTORS (Investor_details VARCHAR) |
SELECT "Result" FROM table_39710 WHERE "Date" = 'october 4, 1993' | What was the result on October 4, 1993? | CREATE TABLE table_39710 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) |
SELECT official_name FROM table_176529_2 WHERE area_km_2 = "578.28" | What is the name of the place where area is 578.28 square km? | CREATE TABLE table_176529_2 (official_name VARCHAR, area_km_2 VARCHAR) |
SELECT DISTINCT lot_details FROM LOTS | Show all distinct lot details. | CREATE TABLE LOTS (lot_details VARCHAR) |
SELECT SUM(laps) FROM table_name_20 WHERE driver = "derek warwick" | What is the sum of laps for Derek Warwick? | CREATE TABLE table_name_20 (
laps INTEGER,
driver VARCHAR
) |
SELECT team FROM table_17693171_1 WHERE points = "20" | If the points is 20, what was the team name? | CREATE TABLE table_17693171_1 (team VARCHAR, points VARCHAR) |
SELECT MAX(amount_of_transaction) FROM TRANSACTIONS | Show the maximum amount of transaction. | CREATE TABLE TRANSACTIONS (amount_of_transaction INTEGER) |
SELECT MAX("Round") FROM table_39003 WHERE "Position" = 'guard' AND "Overall" > '71' | What is the highest round with a guard position and an overall greater than 71? | CREATE TABLE table_39003 (
"Round" real,
"Pick #" real,
"Overall" real,
"Name" text,
"Position" text
) |
SELECT time_retired FROM table_17693171_1 WHERE driver = "Marco Andretti" | What is the time/retired if the driver is Marco Andretti? | CREATE TABLE table_17693171_1 (time_retired VARCHAR, driver VARCHAR) |
SELECT date_of_transaction, share_count FROM TRANSACTIONS | Show all date and share count of transactions. | CREATE TABLE TRANSACTIONS (date_of_transaction VARCHAR, share_count VARCHAR) |
SELECT home_team FROM table_name_85 WHERE venue = "windy hill" | Windy hill is the home to what team? | CREATE TABLE table_name_85 (
home_team VARCHAR,
venue VARCHAR
) |
SELECT MAX(laps) AS Led FROM table_17693171_1 WHERE laps = 191 | If the laps is 191, what is the maximum laps led? | CREATE TABLE table_17693171_1 (laps INTEGER) |
SELECT SUM(share_count) FROM TRANSACTIONS | What is the total share of transactions? | CREATE TABLE TRANSACTIONS (share_count INTEGER) |
SELECT demographic.diagnosis, procedures.short_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "2560" | for patients id 2560, specify the icd9 code and primary disease. | 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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... |
SELECT time_retired FROM table_17693171_1 WHERE driver = "Ed Carpenter" | What is the time/retired if the driver is Ed Carpenter? | CREATE TABLE table_17693171_1 (time_retired VARCHAR, driver VARCHAR) |
SELECT transaction_id FROM TRANSACTIONS WHERE transaction_type_code = 'PUR' | Show all transaction ids with transaction code 'PUR'. | CREATE TABLE TRANSACTIONS (transaction_id VARCHAR, transaction_type_code VARCHAR) |
SELECT SUM("starting price") FROM table_203_42 WHERE "model" IN ('via', 'tour') | what is the price of bot the via and tour models combined ? | CREATE TABLE table_203_42 (
id number,
"model" text,
"class" text,
"length" text,
"fuel" text,
"starting price" text
) |
SELECT MAX(laps) FROM table_17693171_1 WHERE time_retired = "+1 lap" | If the time/retired is +1 lap, what is the amount of maximum laps? | CREATE TABLE table_17693171_1 (laps INTEGER, time_retired VARCHAR) |
SELECT date_of_transaction FROM TRANSACTIONS WHERE transaction_type_code = "SALE" | Show all dates of transactions whose type code is "SALE". | CREATE TABLE TRANSACTIONS (date_of_transaction VARCHAR, transaction_type_code VARCHAR) |
SELECT date_of_election FROM table_1329532_2 WHERE elected_successor = "Arthur Hodges" | What was the election date for Arthur Hodges? | CREATE TABLE table_1329532_2 (
date_of_election VARCHAR,
elected_successor VARCHAR
) |
SELECT team FROM table_17693171_1 WHERE driver = "Milka Duno" | If the driver is Milka Duno, what is the name of the team? | CREATE TABLE table_17693171_1 (team VARCHAR, driver VARCHAR) |
SELECT AVG(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code = "SALE" | Show the average amount of transactions with type code "SALE". | CREATE TABLE TRANSACTIONS (amount_of_transaction INTEGER, transaction_type_code VARCHAR) |
SELECT "Performer 3" FROM table_6207 WHERE "Performer 2" = 'karen maruyama' | Who was performer 3 with karen maruyama as performer 2? | CREATE TABLE table_6207 (
"Date" text,
"Episode" real,
"Performer 1" text,
"Performer 2" text,
"Performer 3" text,
"Performer 4" text
) |
SELECT COUNT(stage) FROM table_17672470_19 WHERE winner = "Robbie McEwen" | How many stages were won by Robbie McEwen? | CREATE TABLE table_17672470_19 (stage VARCHAR, winner VARCHAR) |
SELECT transaction_type_description FROM Ref_Transaction_Types WHERE transaction_type_code = "PUR" | Show the description of transaction type with code "PUR". | CREATE TABLE Ref_Transaction_Types (transaction_type_description VARCHAR, transaction_type_code VARCHAR) |
SELECT SUM(prescriptions.dose_val_rx) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 30267 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) AND prescriptions.drug = 'ns (syringe)' | tell me the dose of ns (syringe) that patient 30267 was prescribed in their last hospital encounter? | 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 procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime t... |
SELECT COUNT(car__number) FROM table_1769428_2 WHERE winning_driver = "Rusty Wallace" | How many car numbers were listed for Rusty Wallace? | CREATE TABLE table_1769428_2 (car__number VARCHAR, winning_driver VARCHAR) |
SELECT MIN(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code = "PUR" AND share_count > 50 | Show the minimum amount of transactions whose type code is "PUR" and whose share count is bigger than 50. | CREATE TABLE TRANSACTIONS (amount_of_transaction INTEGER, transaction_type_code VARCHAR, share_count VARCHAR) |
SELECT date FROM table_name_15 WHERE result = "won 4-2" | What was the date of the game with a result of won 4-2? | CREATE TABLE table_name_15 (
date VARCHAR,
result VARCHAR
) |
SELECT MAX(season) FROM table_1769428_2 WHERE winning_driver = "Rusty Wallace" | In what season did Rusty Wallace win? | CREATE TABLE table_1769428_2 (season INTEGER, winning_driver VARCHAR) |
SELECT MAX(share_count) FROM TRANSACTIONS WHERE amount_of_transaction < 10000 | Show the maximum share count of transactions where the amount is smaller than 10000 | CREATE TABLE TRANSACTIONS (share_count INTEGER, amount_of_transaction INTEGER) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.