sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
list the party themes available | SELECT Party_Theme FROM party |
What is the per capita income of the county with a median family income of $40,492? | SELECT per_capita_income FROM table_name_61 WHERE median_family_income = "$40,492" |
What is the smallest track number? | SELECT MIN(track) FROM table_11839306_2 |
How many laps in total does the driver named Eddie Irvine have? | SELECT COUNT(laps) FROM table_name_7 WHERE driver = "eddie irvine" |
Show the statement detail and the corresponding document name for the statement with detail 'Private Project'. | SELECT T1.statement_details , T2.document_name FROM Statements AS T1 JOIN Documents AS T2 ON T1.statement_id = T2.document_id WHERE T1.statement_details = 'Private Project' |
Can you tell me the Score that has the Game of 40? | SELECT score FROM table_name_33 WHERE game = 40 |
Find the number of distinct name of losers. | SELECT COUNT(DISTINCT loser_name) FROM matches |
What category was Kasautii Zindagii Kay nominated for after 2005? | SELECT category FROM table_name_20 WHERE year > 2005 AND for_the_show = "kasautii zindagii kay" |
List the city of the business where they open from 1 pm to 6 pm on Saturday. | SELECT T1.city FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id INNER JOIN Days AS T3 ON T2.day_id = T3.day_id WHERE T2.closing_time LIKE '6PM' AND T2.opening_time LIKE '1PM' AND T3.day_of_week LIKE 'Saturday' |
which Film has a Category of best actress – musical or comedy, and a Lost to of nicole kidman ( moulin rouge! )? | SELECT film FROM table_name_23 WHERE category = "best actress – musical or comedy" AND lost_to = "nicole kidman ( moulin rouge! )" |
List the student's email with grade of B in a course with difficulty greater than the 80% of average difficulty of all courses. | SELECT T2.email FROM registration AS T1 INNER JOIN student AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T1.course_id = T3.course_id WHERE T1.grade = 'B' GROUP BY T3.diff HAVING T3.diff > AVG(T3.diff) * 0.8 |
What is the total number of rounds at 5:36? | SELECT COUNT(round) FROM table_name_29 WHERE time = "5:36" |
What is the last name of the musician who was in the most songs? | SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY lastname ORDER BY count(*) DESC LIMIT 1 |
What is the report corresponding to the game that had the Townsville Crocodiles as home team? | SELECT report FROM table_name_59 WHERE home_team = "townsville crocodiles" |
What is Wheel Arrangement, when Manufacturer is "Baldwin", and when Quantity Made is 12? | SELECT wheel_arrangement FROM table_name_52 WHERE manufacturer = "baldwin" AND quantity_made = "12" |
Tell me the wkts for econ of 4.23 | SELECT wkts FROM table_name_13 WHERE econ = "4.23" |
How many different results are there for the battles? | SELECT count(DISTINCT RESULT) FROM battle |
How many districts for rené l. derouen? | SELECT COUNT(district) FROM table_1342315_17 WHERE incumbent = "René L. DeRouen" |
Can you tell me the Record that has the Location of fleetcenter, and the Date of fri. apr. 5? | SELECT record FROM table_name_16 WHERE location = "fleetcenter" AND date = "fri. apr. 5" |
Tell me the venue for north melbourne | SELECT venue FROM table_name_85 WHERE away_team = "north melbourne" |
How many candidates were elected first in 1980? | SELECT COUNT(candidates) FROM table_1341453_20 WHERE first_elected = 1980 |
What is the first episode with a netflix episode code of s02e20? | SELECT MIN(episode) FROM table_15187735_4 WHERE netflix = "S02E20" |
When 1233 is the population of 2011 what is the land area in kilometers squared? | SELECT land_area__km²_ FROM table_189598_7 WHERE population__2011_ = 1233 |
Find the max and min grade point for all letter grade. | SELECT max(gradepoint) , min(gradepoint) FROM GRADECONVERSION |
What are Unit 2's dates of commissioning? | SELECT COUNT(date_of_commissioning) FROM table_28672269_1 WHERE unit_number = 2 |
Show ids for all documents with budget types described as 'Government'. | SELECT T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_Budget_Codes AS T2 ON T1.Budget_Type_code = T2.Budget_Type_code WHERE T2.budget_type_Description = "Government" |
What is the type where the name is bojan? | SELECT type FROM table_11891841_2 WHERE name = "Bojan" |
When was a competition held at Pietermaritzburg? | SELECT date FROM table_name_83 WHERE venue = "pietermaritzburg" |
What is the lowest swimsuit score a contestant from Rhode Island with an average larger than 9.235 has? | SELECT MIN(swimsuit) FROM table_name_66 WHERE state = "rhode island" AND average > 9.235 |
How many goals did the club from Hawthorn score in the 1971 season? | SELECT goals FROM table_name_5 WHERE club = "hawthorn" AND season = "1971" |
How many tree species are there when the total plant species is 113? | SELECT COUNT(tree_species) FROM table_16577990_1 WHERE total_plant_species = 113 |
What is maximum, minimum and average amount of outstanding of customer? | SELECT max(amount_outstanding) , min(amount_outstanding) , avg(amount_outstanding) FROM Customers; |
Who was the opponent in the math that was played in Nice on a clay court? | SELECT opponent FROM table_name_23 WHERE surface = "clay" AND tournament = "nice" |
How many players born in USA are right-handed batters? That is, have the batter value 'R'. | SELECT COUNT(*) FROM player WHERE birth_country = 'USA' AND bats = 'R' |
What's the report for the Silverstone circuit? | SELECT report FROM table_1140117_5 WHERE circuit = "Silverstone" |
Which team appointed a person on 23 December 2008? | SELECT team FROM table_18788823_5 WHERE date_of_appointment = "23 December 2008" |
Name the high assists for may 21 | SELECT high_assists FROM table_17622423_12 WHERE date = "May 21" |
How many orders in total have the customers in the household segment made? | SELECT COUNT(T1.o_orderkey) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_mktsegment = 'HOUSEHOLD' |
Among the authors affiliated with Soongsil University, list the authors' names and papers published during the year 2000. | SELECT T2.Title, T1.Name FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T1.Affiliation = 'Soongsil University' AND T2.Year = 2000 |
What is the maximum number of wins in the season with 22 starts? | SELECT MAX(wins) FROM table_1637041_6 WHERE starts = 22 |
When was Color of green first issued? | SELECT MIN(first_issued) FROM table_name_51 WHERE color = "green" |
Provide the tokenized name of the method "Sky.Excel.ExcelBook.TypeConvert". | SELECT NameTokenized FROM Method WHERE Name = 'Sky.Excel.ExcelBook.TypeConvert' |
What is the surface of the tournament with a runner-up outcome and dudi sela as the opponent? | SELECT surface FROM table_name_59 WHERE outcome = "runner-up" AND opponent = "dudi sela" |
What is the average number of top-10s for the major with 2 top-25s and fewer than 10 cuts made? | SELECT AVG(top_10) FROM table_name_31 WHERE top_25 = 2 AND cuts_made < 10 |
What was Barreto's song choice when the theme was samba? | SELECT song_choice FROM table_27614571_1 WHERE theme = "Samba" |
How many entries are shown for an air date when the team guest captain was stephen k amos? | SELECT COUNT(air_date) FROM table_25816476_2 WHERE team_guest_captain = "Stephen K Amos" |
Incumbent Tim Holden belonged to what party? | SELECT party FROM table_1341453_40 WHERE incumbent = "Tim Holden" |
What is the smallest Pick with Overall of 244? | SELECT MIN(pick) FROM table_name_33 WHERE overall = 244 |
What date did the away team Bristol Rovers play? | SELECT date FROM table_name_63 WHERE away_team = "bristol rovers" |
List down the movie titles that were produced in Canada. | SELECT T1.title FROM movie AS T1 INNER JOIN production_COUNTry AS T2 ON T1.movie_id = T2.movie_id INNER JOIN COUNTry AS T3 ON T2.COUNTry_id = T3.COUNTry_id WHERE T3.COUNTry_name = 'Canada' |
List the document type code, document name, and document description for the document with name 'Noel CV' or name 'King Book'. | SELECT document_type_code , document_name , document_description FROM Documents WHERE document_name = 'Noel CV' OR document_name = 'King Book' |
Among the teams whose shorthanded goals are between 1 to 5, which player is the most trustworthy in the critical moment? | SELECT T2.nameGiven, T2.lastName FROM Scoring AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID WHERE T1.SHG BETWEEN 1 AND 5 ORDER BY T1.GWG DESC LIMIT 1 |
What are the city name, id, and number of addresses corresponding to the city with the most addressed? | SELECT T2.city , count(*) , T1.city_id FROM address AS T1 JOIN city AS T2 ON T1.city_id = T2.city_id GROUP BY T1.city_id ORDER BY count(*) DESC LIMIT 1 |
What is Home Team, when Tie No is "7"? | SELECT home_team FROM table_name_5 WHERE tie_no = "7" |
Who won the Suntree Seniors Classic? | SELECT winner FROM table_11622924_1 WHERE tournament = "Suntree Seniors Classic" |
What is the height for club Havk Mladost? | SELECT height FROM table_name_49 WHERE club = "havk mladost" |
What is Name, when Bonus is greater than 1, when Only Point is greater than 7, and when Total Point is less than 21? | SELECT name FROM table_name_10 WHERE bonus > 1 AND only_point > 7 AND total_point < 21 |
How many exhibition are there in year 2005 or after? | SELECT count(*) FROM exhibition WHERE YEAR >= 2005 |
What is the unformatted capacity per side if the size is 8in? | SELECT unformatted_capacity_per_side FROM table_name_42 WHERE size = "8in" |
Which league did player id"adamsja01" play in 1920? | SELECT lgID FROM ScoringSC WHERE playerID = 'adamsja01' AND year = 1920 |
In which country does Roberto Almeida? | SELECT country FROM customers WHERE first_name = "Roberto" AND last_name = "Almeida"; |
What is the id of the bike that traveled the most in 94002? | SELECT bike_id FROM trip WHERE zip_code = 94002 GROUP BY bike_id ORDER BY COUNT(*) DESC LIMIT 1 |
Which average attendance has stoneman (0-2) as the loss? | SELECT AVG(attendance) FROM table_name_18 WHERE loss = "stoneman (0-2)" |
What are the titles of all movies that have rating star is between 3 and 5? | SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars BETWEEN 3 AND 5 |
Where is Dynamo-2 located? | SELECT location FROM table_name_38 WHERE team = "dynamo-2" |
What round of the draft was Stan Adams selected? | SELECT AVG(round) FROM table_name_59 WHERE player = "stan adams" |
How many episodes aired Saturday, July 11, 2009 | SELECT COUNT(episode__number) FROM table_17525955_2 WHERE us_air_date = "Saturday, July 11, 2009" |
Which building has most faculty members? | SELECT building FROM Faculty GROUP BY building ORDER BY count(*) DESC LIMIT 1 |
Which season was one of the players rated +98? | SELECT season FROM table_name_6 WHERE rating = "+98" |
Who sponsors driver neil bonnett? | SELECT sponsor FROM table_name_18 WHERE driver = "neil bonnett" |
Mention the genre of the 2Xtreme. | SELECT T2.id FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T1.game_name = '2Xtreme' |
How many teams are listed for 3rd wickets? | SELECT COUNT(batting_team) FROM table_1670921_1 WHERE wicket = "3rd" |
What is the venue for the friendly competition at Dreisamstadion, Freiburg? | SELECT score FROM table_name_52 WHERE competition = "friendly" AND venue = "dreisamstadion, freiburg" |
What is the role with the smallest number of employees? Find the role codes. | SELECT role_code FROM Employees GROUP BY role_code ORDER BY count(*) ASC LIMIT 1 |
What is the number of students playing as a goalie? | SELECT count(*) FROM tryout WHERE pPos = 'goalie' |
What is Astrid Gruber's email and phone number? | SELECT email , phone FROM customers WHERE first_name = "Astrid" AND last_name = "Gruber"; |
How many donations of more than $100 were made for an honoree? | SELECT COUNT(donationid) FROM donations WHERE dollar_amount = '100_and_up' AND for_honoree = 't' |
How many white patients whose birth year is 1935 have a stroke? | SELECT COUNT(DISTINCT T1.patient) FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.patient WHERE strftime('%Y', T1.birthdate) = '1935' AND T1.race = 'white' AND T2.DESCRIPTION = 'Stroke' |
What are the descriptions and names of the courses that have student enrollment bigger than 2? | SELECT T1.course_description , T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) > 2 |
Show director with the largest number of show times in total. | SELECT T2.directed_by FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.directed_by ORDER BY SUM(T1.show_times_per_day) DESC LIMIT 1 |
Which weapon was used when the Battle of the Planets was Jason? | SELECT weapon FROM table_name_48 WHERE battle_of_the_planets = "jason" |
What is the maximum sweep volume of a car that costs less than $30000? | SELECT MAX(T1.displacement / T1.cylinders) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T2.price < 30000 |
What was the team classification where andré greipel was the winner and had the points classification? | SELECT team_classification FROM table_25655781_17 WHERE winner = "André Greipel" AND points_classification = "André Greipel" |
What did the home team score at MCG? | SELECT home_team AS score FROM table_name_39 WHERE venue = "mcg" |
What is Brendan Locke's College/Junior/Club Team (League)? | SELECT college_junior_club_team__league_ FROM table_name_11 WHERE player = "brendan locke" |
What is the average year needed by a user with uber fans to become an elite user? | SELECT CAST(SUM(T2.year_id - T1.user_yelping_since_year) AS REAL) / COUNT(T1.user_id) FROM Users AS T1 INNER JOIN Elite AS T2 ON T1.user_id = T2.user_id WHERE T1.user_fans = 'Uber' |
How many customers have a credit limit of not more than 100,000 and which customer made the highest total payment amount for the year 2004? | SELECT ( SELECT COUNT(customerNumber) FROM customers WHERE creditLimit <= 100000 AND customerNumber IN ( SELECT customerNumber FROM payments WHERE STRFTIME('%Y', paymentDate) = '2004' ) ), T1.customerName FROM customers AS T1 INNER JOIN payments AS T2 ON T1.customerNumber = T2.customerNumber WHERE T1.creditLimit <= 100000 AND STRFTIME('%Y', T2.paymentDate) = '2004' GROUP BY T1.customerNumber, T1.customerName ORDER BY SUM(T2.amount) DESC LIMIT 1 |
In 2012 what was the average finish? | SELECT avg_finish FROM table_1012730_1 WHERE year = 2012 |
Who is the player in guard position from Stephen F. Austin in a round less than 8? | SELECT player FROM table_name_60 WHERE round < 8 AND position = "guard" AND school_club_team = "stephen f. austin" |
Find the maximum and minimum monthly rental for all student addresses. | SELECT max(monthly_rental) , min(monthly_rental) FROM Student_Addresses |
How many scores have a Place of t5? | SELECT COUNT(score) FROM table_name_2 WHERE place = "t5" |
Who was the away team that played Northampton Town at home with a tie number of replay? | SELECT away_team FROM table_name_53 WHERE tie_no = "replay" AND home_team = "northampton town" |
When John Aalberg took part in the 1994 Winter Olympic Game, how old was he? | SELECT T2.age FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.full_name = 'John Aalberg' AND T1.games_name = '1994 Winter' |
Which Date has a Location of davos, and a Time of 45.7? | SELECT date FROM table_name_86 WHERE location = "davos" AND time = "45.7" |
What is the average year for the Olympic Games? | SELECT AVG(year) FROM table_name_68 WHERE competition = "olympic games" |
Find the response status to customer whose geographic ID of 134. | SELECT T2.RESPONSE FROM Customers AS T1 INNER JOIN mailings3 AS T2 ON T1.ID = T2.REFID WHERE T1.GEOID = 134 |
How many architects are female? | SELECT count(*) FROM architect WHERE gender = 'female' |
Return the names of conductors that do not have the nationality "USA". | SELECT Name FROM conductor WHERE Nationality != 'USA' |
How many employees in total are in charge of the sales in the Eastern Region? | SELECT COUNT(T.EmployeeID) FROM ( SELECT T3.EmployeeID FROM Region AS T1 INNER JOIN Territories AS T2 ON T1.RegionID = T2.RegionID INNER JOIN EmployeeTerritories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T1.RegionDescription = 'Eastern' GROUP BY T3.EmployeeID ) T |
Select all the data from the products and each product's manufacturer. | SELECT * FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.