sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What was the result of the December 15, 2002 game? | SELECT result FROM table_name_66 WHERE date = "december 15, 2002" |
What is the sum of the week for the Denver Broncos? | SELECT SUM(week) FROM table_name_60 WHERE opponent = "denver broncos" |
What are these three swimmers' nationalities? | SELECT t1.name, t1.Nationality FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win' INTERSECT SELECT t1.name, t1.Nationality FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Loss' |
What subtitles have 15 as the classification? | SELECT subtitles FROM table_name_85 WHERE classifaction = "15" |
Name the highest Horizontal Bar which is in france and Rings smaller than 58.975? | SELECT MAX(horizontal_bar) FROM table_name_4 WHERE country = "france" AND rings < 58.975 |
What are the first and last names of the artist who perfomed the song "Badlands"? | SELECT T2.firstname , T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = "Badlands" |
On which years did Aruba got a footnote on the series code AG.LND.FRST.K2? | SELECT T2.Year FROM Country AS T1 INNER JOIN FootNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.ShortName = 'Aruba' AND T2.Seriescode = 'AG.LND.FRST.K2' |
Which Date has a Result of 2–2, and a Venue of H? | SELECT date FROM table_name_3 WHERE result = "2–2" AND venue = "h" |
What is the maximum number of clubs remaining when the league entering at this round was allsvenskan? | SELECT MIN(clubs_remaining) FROM table_29566686_1 WHERE leagues_entering_at_this_round = "Allsvenskan" |
What was the first award won by the cast or crew member of the show? Give the name of the person who won the said award. | SELECT T2.award, T1.name FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T2.result = 'Winner' ORDER BY T2.year LIMIT 1; |
Who is the pärnu manager? | SELECT manager FROM table_27409644_1 WHERE club = "Pärnu" |
How many images have at least one object sample in the class of "man"? | SELECT COUNT(T.IMG_ID) FROM ( SELECT T2.IMG_ID FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.OBJ_CLASS = 'man' GROUP BY T2.IMG_ID ) T |
what are all the products name on this table | SELECT product_name FROM products |
What college has a player that is 6'1? | SELECT college FROM table_20860739_1 WHERE height = "6'1" |
Thanks! That City and Country ID for Elizabeth is unusual... Can you please show her street address and state province? | SELECT T1.first_name , T1.last_name , T3.city ,T3.COUNTRY_ID,T3.STREET_ADDRESS,T3.STATE_PROVINCE FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id WHERE T1.first_name LIKE '%z%' and T1.FIRST_NAME = 'Elizabeth' |
When is the last day any resident moved in? | SELECT max(date_moved_in) FROM Residents |
In female customers ages from 50 to 60, how many of them has an number of inhabitants ranges from 19 to 24? | SELECT COUNT(T1.ID) FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.SEX = 'Female' AND T1.age >= 50 AND T1.age <= 60 AND T2.INHABITANTS_K >= 19 AND T2.INHABITANTS_K <= 24 |
What are the tourist attractions available? | Did you mean to show you all the attractions? | Yes, what are their names? | SELECT distinct ( Name ) FROM Tourist_Attractions |
Which nations have hosts older than 45? | SELECT distinct Nationality FROM HOST WHERE Age > 45 |
When was the appointment date for the manager replaced by Lucien Favre? | SELECT date_of_appointment FROM table_name_68 WHERE replaced_by = "lucien favre" |
What's the name of the tournament that Gianni Ocleppo was the runner-up? | SELECT tournament_name FROM table_name_80 WHERE runners_up = "gianni ocleppo" |
What about born after the year 1980? | SELECT count ( * ) FROM player WHERE bats = 'R' AND birth_year > 1980 |
What college did the #22 overall draft pick attend? | SELECT college FROM table_name_39 WHERE pick__number = 22 |
What are the cost and treatment type description of each treatment? | SELECT T1.cost_of_treatment , T2.treatment_type_description FROM Treatments AS T1 JOIN treatment_types AS T2 ON T1.treatment_type_code = T2.treatment_type_code |
What is Mark Cannon's College? | SELECT college FROM table_name_45 WHERE player = "mark cannon" |
What is the last name of the staff who has handled the first ever complaint? | 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 |
Which player has an A-League of 150 (4)? | SELECT name FROM table_name_1 WHERE a_league = "150 (4)" |
What is the score of game 21? | SELECT score FROM table_name_96 WHERE game = 21 |
Which Place has a Player of lee trevino? | SELECT place FROM table_name_95 WHERE player = "lee trevino" |
Show the region name with at least two storms. | SELECT T1.region_name FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id HAVING count(*) >= 2 |
What are the first names and department numbers for employees with last name McEwen? | SELECT first_name , department_id FROM employees WHERE last_name = 'McEwen' |
How many nationalities does Tom Colley have? | SELECT COUNT(nationality) FROM table_1965650_4 WHERE player = "Tom Colley" |
in 1953, which of the institutions joined? | SELECT institution FROM table_261895_1 WHERE joined = "1953" |
How many students are in that major? | SELECT count ( * ) FROM STUDENT GROUP BY major ORDER BY count ( * ) DESC LIMIT 1 |
What was the result for Thirst in 2010 at the Green Globe Film Awards? | SELECT result FROM table_name_91 WHERE film_series = "thirst" AND year = 2010 AND group = "green globe film awards" |
What is the name of the browser with the second largest market share? | select name from browser order by market_share limit 2 |
What is the top fastest time, larger than 2, in Enugu? | SELECT MAX(fastest_time__s_) FROM table_name_76 WHERE location = "enugu" AND rank > 2 |
Thank you :) This will be my last question, could you please let me know the name and ID of the instructor whose salary is the lowest? | SELECT name, ID from instructor order by salary asc limit 1 |
What was the Winter Olympics was Japan as the country? | SELECT winter_olympics FROM table_name_38 WHERE country = "japan" |
List the project details of the projects launched by the organisation with the most number of projects. | SELECT project_details FROM Projects WHERE organisation_id IN ( SELECT organisation_id FROM Projects GROUP BY organisation_id ORDER BY count(*) DESC LIMIT 1 ); |
What is the highest week 9 that had a week 6 of 7, a week 10 of greater than 2, a week 7 of 5, and a week 11 less than 2? | SELECT MAX(wk_9) FROM table_name_13 WHERE wk_6 = "7" AND wk_10 > 2 AND wk_7 = "5" AND wk_11 < 2 |
what is 1976 when 1980 is 2.0? | SELECT 1976 FROM table_name_46 WHERE 1980 = "2.0" |
what is the grid when the time/retired is +9 laps and the laps is larger than 91? | SELECT COUNT(grid) FROM table_name_18 WHERE time_retired = "+9 laps" AND laps > 91 |
Show the ids of students whose advisors are professors. | SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.rank = "Professor" |
On what Date was the Score in Final 6–3, 6–3? | SELECT date FROM table_name_70 WHERE score_in_final = "6–3, 6–3" |
what is the obama # in carson city | SELECT obama__number FROM table_20424014_1 WHERE county = "Carson City" |
What is the average rating of the newest movies from France? | SELECT AVG(T1.rating) FROM u2base AS T1 INNER JOIN movies AS T2 ON T1.movieid = T2.movieid WHERE T2.country = 'france' AND T2.year = 4 |
What is Boston Bruins minimum pick? | SELECT MIN(pick__number) FROM table_1965650_10 WHERE nhl_team = "Boston Bruins" |
List the medicine name and trade name which can both interact as 'inhibitor' and 'activitor' with enzymes. | SELECT T1.name, T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id WHERE interaction_type = 'inhibitor' INTERSECT SELECT T1.name, T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id WHERE interaction_type = 'activitor' |
What is the maximum number of players for the sega game, hang-on (cartridge version)? | SELECT COUNT(max__number_of_players) FROM table_name_24 WHERE developer = "sega" AND main_title___alternate_title_s_ = "hang-on (cartridge version)" |
Is there any intercity trip were made during 2014? If yes, list out the city name for the start and end station. | SELECT T1.start_station_name, T1.end_station_name FROM trip AS T1 LEFT JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T1.start_date LIKE '%/%/2014%' AND T1.start_station_name != T1.end_station_name |
How many purchases were made at Sac State American River Courtyard using Master Card? | SELECT COUNT(T1.TransactionID) FROM `transaction` AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T2.LocationName = 'Sac State American River Courtyard' AND T1.CreditCardType = 'MasterCard' |
Which qual has rank of more than 28 and a grid number that is bigger than 23? | SELECT qual FROM table_name_43 WHERE rank > 28 AND grid > 23 |
List the dates of games by the home team name in descending order. | SELECT Date FROM game ORDER BY home_team DESC |
What is the sum of rank with years 1996–2012 and apps greater than 340? | SELECT SUM(rank) FROM table_name_15 WHERE years = "1996–2012" AND apps > 340 |
Among the patients with viral sinusitis condition, which patient's gender is most affected? Provide the number for each respectively. | SELECT SUM(CASE WHEN T1.gender = 'F' THEN 1 ELSE 0 END), SUM(CASE WHEN T1.gender = 'M' THEN 1 ELSE 0 END) FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Viral sinusitis (disorder)' |
Can you list the number of invoices from all countries except the US grouped by billing city? | SELECT billing_city, COUNT ( * ) FROM invoices where billing_country ! = "USA" group by billing_city |
Give the procedure description of Ms. Jacquelyn Shanahan on 2009/8/9. | SELECT DISTINCT T2.description FROM patients AS T1 INNER JOIN procedures AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Ms.' AND T1.first = 'Jacquelyn' AND T1.last = 'Shanahan' AND T2.DATE = '2009-08-09' |
Find the name of instructors who are advising more than one student. | SELECT T1.name FROM instructor AS T1 JOIN advisor AS T2 ON T1.id = T2.i_id GROUP BY T2.i_id HAVING COUNT(*) > 1 |
What is every entry for Saturday August 27 when the entry for Thursday August 25 is 23' 56.90 94.528mph? | SELECT sat_27_aug FROM table_30058355_7 WHERE thurs_25_aug = "23' 56.90 94.528mph" |
Name the site for game of game 2 | SELECT site FROM table_name_26 WHERE game = "game 2" |
list all the names of programs, ordering by launch time. | SELECT name FROM program ORDER BY launch |
What is Trailing Party, when Party Won is "Janata Dal", and when Year is "1996"? | SELECT trailing_party FROM table_name_74 WHERE party_won = "janata dal" AND year = 1996 |
How many patients stay in room 112? | SELECT COUNT(patient) FROM stay WHERE room = 112 |
Count the number of appelations in Napa County. | SELECT count(*) FROM APPELLATIONS WHERE County = "Napa" |
What percentage of people have worked on the True North episode as additional crew? | SELECT CAST(SUM(CASE WHEN T2.role = 'Additional Crew' THEN 1 ELSE 0 END) AS REAL ) * 100 / COUNT(T1.episode_id) FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'True North' |
Tell the number of fights landed earlier on Miami Airport on 2018/8/12. | SELECT COUNT(*) FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.DEST WHERE T2.FL_DATE = '2018/8/12' AND T2.DEST = 'MIA' AND T2.ARR_DELAY < 0 |
What are the full names of all students | SELECT Fname , Lname FROM Student |
What try bonus has 18 as the played of and 204 as the points? | SELECT try_bonus FROM table_name_83 WHERE played = "18" AND points_for = "204" |
What tournament was at the 2011 Cincinnati Masters? | SELECT 2011 FROM table_name_5 WHERE tournament = "cincinnati masters" |
What is the flight number of the flight operated by American Airlines Inc. that had the longest delay in departure? | SELECT T1.OP_CARRIER_FL_NUM FROM Airlines AS T1 INNER JOIN Airports AS T2 ON T2.Code = T1.ORIGIN INNER JOIN `Air Carriers` AS T3 ON T1.OP_CARRIER_AIRLINE_ID = T3.Code WHERE T3.Description = 'American Airlines Inc.: AA' ORDER BY T1.DEP_TIME DESC LIMIT 1 |
Which To par has a Winning score of 64-68-66-63=261? | SELECT to_par FROM table_name_22 WHERE winning_score = 64 - 68 - 66 - 63 = 261 |
Return the total number of distinct customers. | SELECT count(*) FROM customers |
What Type of Tunnel is the Downhill Tunnel? | SELECT type FROM table_name_78 WHERE tunnel = "downhill" |
Who wrote the program that originally aired on June 6, 1999? | SELECT written_by FROM table_name_90 WHERE original_airdate = "june 6, 1999" |
Which Total has a Finish of t64, and a Year won larger than 2006? | SELECT MAX(total) FROM table_name_64 WHERE finish = "t64" AND year_won > 2006 |
And what about the salary of the instructor with id number 96895? | SELECT salary FROM instructor WHERE id = 96895 |
What is the greatest lane with an overall rank of 79 and a time larger than 26.1? | SELECT MAX(lane) FROM table_name_24 WHERE overall_rank = "79" AND time > 26.1 |
What is the location of thierry boutsen? | SELECT location FROM table_1137707_2 WHERE fastest_lap = "Thierry Boutsen" |
what is the country with the album best of and weeks on chart is less than 5? | SELECT country FROM table_name_53 WHERE album = "best of" AND weeks_on_chart < 5 |
How many cuts did he make at the PGA championship in 3 events? | SELECT MAX(cuts_made) FROM table_name_36 WHERE tournament = "pga championship" AND events > 3 |
What was the result of the film made before 2005, winner of the robert award, in the category of best actress? | SELECT result FROM table_name_89 WHERE category = "best actress" AND year < 2005 AND award = "robert award" |
Where was the game held where Hawthorn was the away team? | SELECT venue FROM table_name_46 WHERE away_team = "hawthorn" |
What is the total production of the product that is ordered in the highest quantity in order no. 10248? | SELECT T1.UnitsInStock + T1.UnitsOnOrder FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.OrderID = 10248 ORDER BY T2.Quantity DESC LIMIT 1 |
what is the date when the away team is newport county? | SELECT date FROM table_name_98 WHERE away_team = "newport county" |
Compute the average price of all products with manufacturer code equal to 2. | SELECT avg(price) FROM products WHERE Manufacturer = 2 |
Which director made Mi-temps? | SELECT director_s_ FROM table_name_13 WHERE film = "mi-temps" |
What is the customer id, first and last name with most number of accounts. | SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1 |
What is the total of Last title that has Wins smaller than 71 and a First title larger than 1968 and a Country of fiji? | SELECT COUNT(last_title) FROM table_name_79 WHERE wins < 71 AND first_title > 1968 AND country = "fiji" |
When 1 is the number what episodes were used? | SELECT episodes_used FROM table_2144389_9 WHERE _number = 1 |
List the status shared by more than two roller coasters. | SELECT Status FROM roller_coaster GROUP BY Status HAVING COUNT(*) > 2 |
What's the highest league of the Nova Scotia Clippers with a total season of less than 4? | SELECT highest_league FROM table_name_2 WHERE total_seasons < 4 AND team = "nova scotia clippers" |
What is the id and trade name of the medicines can interact with at least 3 enzymes? | SELECT T1.id , T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id HAVING COUNT(*) >= 3 |
Find the names of either colleges in LA with greater than 15000 size or in state AZ with less than 13000 enrollment. | SELECT cName FROM College WHERE enr < 13000 AND state = "AZ" UNION SELECT cName FROM College WHERE enr > 15000 AND state = "LA" |
what are schools in Hawaii have school buses? | SELECT school FROM school WHERE location like "%Hawaii%" and school_id IN ( SELECT school_id FROM school_bus ) |
How many distinct locations have the things with service detail 'Unsatisfied' been located in? | SELECT count(DISTINCT T2.Location_Code) FROM Things AS T1 JOIN Timed_Locations_of_Things AS T2 ON T1.thing_id = T2.thing_id WHERE T1.service_details = 'Unsatisfied' |
Among the countries who uses the 1968 System of National Accounts methodology, how many are in the Middle East & North Africa? Name the country with the highest CO2 emissions from solid fuel consumption in kiloton. | SELECT COUNT(DISTINCT T1.CountryCode) FROM indicators AS T1 INNER JOIN country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Region = 'Middle East & North Africa' AND T2.SystemOfNationalAccounts = 'Country uses the 1968 System of National Accounts methodology.' AND T1.IndicatorName = 'CO2 emissions FROM solid fuel consumption (kt)' UNION SELECT * FROM ( SELECT T1.CountryName FROM indicators AS T1 INNER JOIN country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Region = 'Middle East & North Africa' AND T2.SystemOfNationalAccounts = 'Country uses the 1968 System of National Accounts methodology.' AND T1.IndicatorName = 'CO2 emissions FROM solid fuel consumption (kt)' GROUP BY T1.CountryName ORDER BY SUM(T1.value) DESC LIMIT 1 ) |
What is every value for % 40-59 if % 60-74 is 12,42%? | SELECT _percentage_40_59 FROM table_23606500_4 WHERE _percentage_60_74 = "12,42%" |
What are the names of photos taken with the lens brand 'Sigma' or 'Olympus'? | SELECT T1.name FROM camera_lens AS T1 JOIN photos AS T2 ON T2.camera_lens_id = T1.id WHERE T1.brand = 'Sigma' OR T1.brand = 'Olympus' |
How many Losses have Draws larger than 0? | SELECT MAX(losses) FROM table_name_58 WHERE draws > 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.