sentence
stringlengths
3
347
sql
stringlengths
18
804
What is the total amount of gold medals when there were more than 20 silvers and there were 135 bronze medals?
SELECT COUNT(gold) FROM table_name_22 WHERE silver > 20 AND bronze = 135
Give the total surface area covered by countries in Asia or Europe.
SELECT sum(SurfaceArea) FROM country WHERE Continent = "Asia" OR Continent = "Europe"
Which college have both players with position midfielder and players with position defender?
SELECT College FROM match_season WHERE POSITION = "Midfielder" INTERSECT SELECT College FROM match_season WHERE POSITION = "Defender"
Please list the titles of all the films in the category of "Horror".
SELECT T1.title FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T3.name = 'Horror'
What are the ids, names, dates of opening, and other details for accounts corresponding to the customer with the first name "Meaghan"?
SELECT T1.account_id , T1.date_account_opened , T1.account_name , T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Meaghan'
If -750m is 46.436, what is the name of the cyclist?
SELECT name FROM table_1912276_2 WHERE __750m = "46.436"
Give the number of Jetblue Airways flights.
SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline = T2.uid WHERE T2.Airline = "JetBlue Airways"
Show the name of colleges that have at least two players.
SELECT College FROM match_season GROUP BY College HAVING COUNT(*) >= 2
I want the engine for luigi villoresi
SELECT engine FROM table_name_44 WHERE driver = "luigi villoresi"
What was the lowest pick for the kicker after round 12?
SELECT MIN(pick) FROM table_name_23 WHERE round > 12 AND position = "kicker"
Which opponent has a Date of april 14?
SELECT opponent FROM table_name_20 WHERE date = "april 14"
List the brand names of bottled root beer whose first brewing year is no later than 1930.
SELECT T2.BrandName FROM rootbeer AS T1 INNER JOIN rootbeerbrand AS T2 ON T1.BrandID = T2.BrandID WHERE T2.FirstBrewedYear < '1930-01-01' AND T1.ContainerType = 'Bottle' ORDER BY T2.FirstBrewedYear LIMIT 1
when type of work is novel and published in english is 1977, what was published in russian?
SELECT published_in_russian FROM table_207795_1 WHERE type_of_work = "novel" AND published_in_english = "1977"
Name the least number of believers
SELECT MIN(number_of_believers) FROM table_24613895_1
Show names of teachers and the courses they are arranged to teach.
SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID
What is the Equatorial diameter of the Body: Mars?
SELECT equatorial_diameter FROM table_name_24 WHERE body = "mars"
What is the most money United States player Bob Gilder won?
SELECT MAX(money___) AS $__ FROM table_name_93 WHERE country = "united states" AND player = "bob gilder"
What's the nationality of Montreal Impact with Justin Mapp Category:articles with hcards as the player?
SELECT nationality FROM table_name_14 WHERE team = "montreal impact" AND player = "justin mapp category:articles with hcards"
What republican candidate was first elected most recently?
SELECT MAX(first_elected) FROM table_1341690_5 WHERE party = "Republican"
Find the id and forenames of drivers who participated both the races with name Australian Grand Prix and the races with name Chinese Grand Prix?
SELECT T2.driverid, T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = "Australian Grand Prix" INTERSECT SELECT T2.driverid, T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = "Chinese Grand Prix"
what is the first performance of the last performance on 03/29/1957
SELECT first_performance FROM table_19189856_1 WHERE last_performance = "03/29/1957"
How many first elections have Claude Fuller as incumbent?
SELECT COUNT(first_elected) FROM table_1342315_4 WHERE incumbent = "Claude Fuller"
List all titles with sales of quantity more than 20 and store located in the CA state.
SELECT T1.title, T2.qty FROM titles AS T1 INNER JOIN sales AS T2 ON T1.title_id = T2.title_id INNER JOIN stores AS T3 ON T2.stor_id = T3.stor_id WHERE T2.qty > 20 AND T3.state = 'CA'
what is c-span 2009 when times 2008** is 08?
SELECT c_span_2009 FROM table_name_80 WHERE times_2008 * * = "08"
What year was incumbent mark w. hannaford elected?
SELECT MIN(first_elected) FROM table_1341672_6 WHERE incumbent = "Mark W. Hannaford"
For each director, what is the title and score of their most poorly rated movie?
SELECT T2.title , T1.stars , T2.director , min(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T2.director
Name the pick number for bill atessis
SELECT pick__number FROM table_name_15 WHERE name = "bill atessis"
What event was Sun Yue the alternate and wang bingyu(3rd) the skip?
SELECT event FROM table_name_75 WHERE alternate = "sun yue" AND skip = "wang bingyu(3rd)"
What is the highest number of wins when more than 17 cuts and more than 25 starts were made, and the top 10 ranking is less than 8?
SELECT MAX(wins) FROM table_name_95 WHERE cuts_made > 17 AND starts > 25 AND top_10 < 8
What was the Location/Attendance on september 11?
SELECT location_attendance FROM table_name_3 WHERE date = "september 11"
Show details of all visitors.
SELECT Tourist_Details FROM VISITORS
What is the Venue of the Competition with a Score of 4-1?
SELECT venue FROM table_name_11 WHERE score = "4-1"
what are the different names of the singers that have sales more than 300000?
SELECT DISTINCT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID WHERE T2.Sales > 300000
Is teacher "42d43fa6f37314365d08692e08680973" a New York teacher?
SELECT teacher_ny_teaching_fellow end FROM projects WHERE teacher_acctid = '42d43fa6f37314365d08692e08680973'
What is the name and country of origin of every singer who has a song with the word 'Hey' in its title?
SELECT name , country FROM singer WHERE song_name LIKE '%Hey%'
Name the ICAO for lilongwe international airport
SELECT icao FROM table_name_74 WHERE airport = "lilongwe international airport"
What is the name of the ship with the most tonnage ?
SELECT name FROM ship order by tonnage desc limit 1
What bore goes with an 18 AB?
SELECT bore FROM table_name_9 WHERE name = "18 ab"
Name the administrative county being area of 422372
SELECT administrative_county FROM table_14925084_1 WHERE area_1961__statute_acres_ = 422372
How many viewers in millions were there for episode 4 of this season?
SELECT COUNT(us_viewers__in_millions_) FROM table_27969432_4 WHERE no_in_season = 4
Show all distinct city where branches with at least 100 memberships are located.
SELECT DISTINCT city FROM branch WHERE membership_amount >= 100
How many directors have directed atleast 10 movies between 1960 to 1985? Indicate the name of the movie in those years of each director that received the highest amount of 5 rating score.
SELECT T2.director_name FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_release_year BETWEEN 1960 AND 1985 GROUP BY T2.director_name HAVING COUNT(T2.movie_id) > 10
Can you show both the highest and lowest grade point for each letter grade?
SELECT lettergrade, max ( gradepoint ) , min ( gradepoint ) FROM GRADECONVERSION group by lettergrade
What are the products that have problems reported after 1986-11-13? Give me the product id and the count of problems reported after 1986-11-13.
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
What are the employees whose first name does not containing the letter M?
SELECT first_name FROM employees WHERE first_name NOT LIKE '%M%'
What is the college pick for 213?
SELECT college FROM table_name_23 WHERE pick = 213
In the game with 31 points, how many goals were conceded?
SELECT COUNT(goals_conceded) FROM table_18018214_4 WHERE points = 31
What's the HC for the Euro I standard?
SELECT hc__g_kwh_ FROM table_2780146_6 WHERE standard = "Euro I"
What was the result of the match on grass in 1955?
SELECT outcome FROM table_2139023_2 WHERE surface = "Grass" AND year = 1955
What is the earliest season where Aisha Jefcoate was the runner-up?
SELECT MIN(season) FROM table_name_13 WHERE runner_up = "aisha jefcoate"
Home of dallas happened on what date?
SELECT date FROM table_name_95 WHERE home = "dallas"
What was the dew point on the day the most units of item no.5 were sold in store no.3 in 2012?
SELECT dewpoint FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T2.store_nbr = 3 AND SUBSTR(T1.`date`, 1, 4) = '2012' AND T1.item_nbr = 5 ORDER BY units DESC LIMIT 1
Show the minimum, maximum, and average age for all people.
SELECT min(age) , max(age) , avg(age) FROM people
Find employee with ID and name of the country presently where (s)he is working.
SELECT T1.employee_id , T4.country_name 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 JOIN countries AS T4 ON T3.country_id = T4.country_id
How many players are from Australia?
SELECT COUNT(CASE WHEN T2.Country_Name = 'Australia' THEN T1.Player_Id ELSE NULL END) FROM Player AS T1 INNER JOIN Country AS T2 ON T1.Country_Name = T2.Country_Id
Which Record has a Time (ET) of 1:00pm, and an Opponent of kansas city chiefs?
SELECT record FROM table_name_25 WHERE time___et__ = "1:00pm" AND opponent = "kansas city chiefs"
What seasons in series 7 did David E. Kelley write ?
SELECT COUNT(season__number) FROM table_23279434_1 WHERE written_by = "David E. Kelley" AND series__number = 7
What are the different driver ids and nationalities of all drivers who had a laptime of more than 100000 milliseconds?
SELECT DISTINCT T1.driverid , T1.nationality FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds > 100000
Between the stores under weather station 12, what is the percentage of item 5 sold in store 10 in 2014?
SELECT CAST(SUM(CASE WHEN T2.store_nbr = 10 THEN units * 1 ELSE 0 END) AS REAL) * 100 / SUM(units) FROM relation AS T1 INNER JOIN sales_in_weather AS T2 ON T1.store_nbr = T2.store_nbr WHERE station_nbr = 12 AND item_nbr = 5 AND T2.`date` LIKE '%2014%'
What are the alias of the cities with 0 population in 2010?
SELECT DISTINCT T1.alias FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.population_2010 = 0
What was the location and attendance of the game when High Assists were Andre Miller (7)?
SELECT location_attendance FROM table_17323042_11 WHERE high_assists = "Andre Miller (7)"
Return the unit of measure for 'Herb' products.
SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code = "Herbs"
WHAT IS THE HOME TEAM ON APRIL 25?
SELECT home_team FROM table_name_52 WHERE date = "april 25"
What is the title of the course that is a prerequisite for Mobile Computing?
SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'Mobile Computing')
What is the venue when Geelong is the away team?
SELECT venue FROM table_name_27 WHERE away_team = "geelong"
What are the attributes when the type is "DOMNodeRemoved"?
SELECT attribute FROM table_1507852_1 WHERE type = "DOMNodeRemoved"
List the method, date and amount of all the payments, in ascending order of date.
SELECT Payment_Method_Code, Date_Payment_Made, Amount_Payment FROM Payments ORDER BY Date_Payment_Made
What is the smallest number of matches with Bonus Pts of 19 and Total Points greater than 421?
SELECT MIN(matches) FROM table_name_36 WHERE bonus_pts = 19 AND total_points > 421
Please give all the list prices of the product LL Fork.
SELECT T2.ListPrice FROM Product AS T1 INNER JOIN ProductListPriceHistory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'LL Fork'
Of all the teams that played as a team away against Caen in the 2010 season, which one has the highest winning percentage?
SELECT AwayTeam FROM matchs WHERE HomeTeam = 'Caen' AND season = 2010 AND FTR = 'A' GROUP BY AwayTeam ORDER BY COUNT(AwayTeam) DESC LIMIT 1
What is the Musical Guest/Song with a pilot of 3?
SELECT musical_guest_song_performed FROM table_name_99 WHERE pilot = "3"
For period September 2009, what is the other Mozilla total number?
SELECT COUNT(other_mozilla) FROM table_1876262_10 WHERE period = "September 2009"
Show the total number of rooms of the apartments in the building with short name "Columbus Square".
SELECT sum(T2.room_count) FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_short_name = "Columbus Square"
When was Too Hop to Handle released?
SELECT release_date FROM table_name_68 WHERE title = "too hop to handle"
Okay, what are the dates for the apartment in building 225 ?
SELECT T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE t2.building_id = "225"
What's the sales breakdown for Nintendo's Mario Kart DS?
SELECT sales_breakdown FROM table_21458142_1 WHERE publisher = "Nintendo" AND title = "Mario Kart DS"
Name the number of party for new york 29
SELECT COUNT(party) FROM table_1341423_32 WHERE district = "New York 29"
What are the distinct positions of the players from a country whose capital is Dublin?
SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Capital = "Dublin"
Show the property type descriptions of properties belonging to that code.
SELECT T2.property_type_description FROM Properties AS T1 JOIN Ref_Property_Types AS T2 ON T1.property_type_code = T2.property_type_code GROUP BY T1.property_type_code
Van Meter has a water(sqmi) of 0 and a longitude larger than -98.444062, what was their highest ANSI code?
SELECT MAX(ansi_code) FROM table_name_63 WHERE water__sqmi_ = 0 AND township = "van meter" AND longitude > -98.444062
Which Sydney has Auckland cancelled and Perth yes?
SELECT sydney FROM table_name_73 WHERE auckland = "cancelled" AND perth = "yes"
What are the last names of faculty in building Barton, sorted by last name?
SELECT Lname FROM FACULTY WHERE Building = "Barton" ORDER BY Lname
Which PBA team has a College of nu?
SELECT pba_team FROM table_name_61 WHERE college = "nu"
List all people names in the order of their date of birth from old to young.
SELECT name FROM people ORDER BY date_of_birth
Which community area has the least population?
SELECT community_area_name FROM Community_Area ORDER BY population ASC LIMIT 1
What language is Sky Cinema Passion television service n. 308?
SELECT language FROM table_15887683_5 WHERE television_service = "Sky Cinema Passion" AND n° = "308"
What sport name do they play?
SELECT T1.sportname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.onscholarship = 'Y'
Name the date for postponed attendance
SELECT date FROM table_name_7 WHERE attendance = "postponed"
How many performers are 29 that made it to the semi finals?
SELECT semifinal__week_ FROM table_28180840_15 WHERE age_s_ = "29"
What are the descriptions for the aircrafts?
SELECT Description FROM aircraft
What is the position of the player with a round less than 20 from the school/club Washington?
SELECT position FROM table_name_17 WHERE round < 20 AND school_club_team = "washington"
what is the name of the episode whose writer is Timothy J. Lea and the director is Norberto Barba?
SELECT title FROM table_22580855_1 WHERE written_by = "Timothy J. Lea" AND directed_by = "Norberto Barba"
What was the date of A. Benes loss to the Rockies?
SELECT date FROM table_name_19 WHERE loss = "a. benes" AND opponent = "rockies"
What are their city codes?
SELECT city_code FROM Student WHERE sex = "F"
Which Format has a Label of columbia, and a Catalog smaller than 88697411432, and a Date of october 24, 2008?
SELECT format FROM table_name_89 WHERE label = "columbia" AND catalog < 88697411432 AND date = "october 24, 2008"
Please list any three businesses with their IDs that are located in Dallas City.
SELECT T2.BusinessEntityID FROM Address AS T1 INNER JOIN BusinessEntityAddress AS T2 ON T1.AddressID = T2.AddressID WHERE T1.City = 'Dallas' LIMIT 3
What is 1989, when 1999 is F, and when 1994 is 2R?
SELECT 1989 FROM table_name_39 WHERE 1999 = "f" AND 1994 = "2r"
Which Country has a Prominence (m) smaller than 1540, and a Height (m) smaller than 3530, and a Range of virunga mountains, and a Mountain of nyiragongo?
SELECT country FROM table_name_12 WHERE prominence__m_ < 1540 AND height__m_ < 3530 AND range = "virunga mountains" AND mountain = "nyiragongo"
Find products with max page size as "A4" or pages per minute color smaller than 5.
SELECT product FROM product WHERE max_page_size = "A4" OR pages_per_minute_color < 5
What is the longitude with a latitude of 47.985154?
SELECT longitude FROM table_18600760_15 WHERE latitude = "47.985154"