sentence
stringlengths
3
347
sql
stringlengths
18
804
What are the names of all storms?
SELECT name FROM storm
What was the attendance for the home team of Walsall?
SELECT attendance FROM table_name_48 WHERE home_team = "walsall"
Which driver has grid value of 18?
SELECT driver FROM table_name_45 WHERE grid = "18"
What is the Song choice when there is an Order # of 4?
SELECT song_choice FROM table_name_26 WHERE order__number = "4"
Can you tell me the names of the professors that make more than Valtchev?
SELECT name FROM instructor WHERE salary > ( SELECT salary FROM instructor WHERE name = "Valtchev" )
Which syndicate is associated with the stars & stripes yacht?
SELECT syndicate FROM table_name_8 WHERE yacht = "stars & stripes"
what is the budget for chandler?
SELECT budget from department where building = "Chandler"
Which Wins is the lowest one that has Events larger than 30?
SELECT MIN(wins) FROM table_name_70 WHERE events > 30
List the distinct ranges of the mountains with the top 3 prominence.
SELECT DISTINCT Range FROM mountain ORDER BY Prominence DESC LIMIT 3
And which schools don't have a goalie player?
SELECT cName FROM tryout WHERE pPos ! = "goalie"
Show the average amount of transactions for different lots, ordered by average amount of transactions.
SELECT T2.lot_id , avg(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id ORDER BY avg(amount_of_transaction)
What's the description of user 85981819's movie list with the most followers?
SELECT T1.list_description FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.list_id = T2.list_id AND T1.user_id = T2.user_id WHERE T1.user_id = 85981819 ORDER BY T1.list_followers DESC LIMIT 1
How many product ids have the lowest price?
SELECT COUNT(DISTINCT ProductID) FROM Products WHERE Price = ( SELECT MAX(Price) FROM Products )
What is the largest crowd when melbourne plays at home?
SELECT MAX(crowd) FROM table_name_98 WHERE home_team = "melbourne"
What was the categorie in 2002 at the Berlin international Film Festival that Danielle Darrieux was in?
SELECT categorie FROM table_name_39 WHERE year = 2002 AND awards = "berlin international film festival"
show a list of the invoice numbers
SELECT invoice_number from Shipments
What is channel 33.7's official call sign?
SELECT call_sign FROM table_1404984_1 WHERE virtual_channel = "33.7"
what is the total rank on airdate march 30, 2011?
SELECT COUNT(rank_timeslot_) FROM table_27987623_4 WHERE airdate = "March 30, 2011"
Name the city for los angeles stadium
SELECT city FROM table_28281704_1 WHERE stadium = "Los Angeles stadium"
Find the brand and name for each camera lens, and sort in descending order of maximum aperture.
SELECT brand , name FROM camera_lens ORDER BY max_aperture DESC
What is the average departure delay time of flights operated by American Airlines Inc.?
SELECT AVG(T1.DEP_DELAY) 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'
What is the number of the sub categories for bikes?
SELECT COUNT(*) FROM ProductCategory AS T1 INNER JOIN ProductSubcategory AS T2 ON T1.ProductCategoryID = T2.ProductCategoryID WHERE T1.Name = 'Bikes'
How about the names of all artists that prefer the genre tagore?
SELECT artist_name FROM artist WHERE preferred_genre = "tagore"
What was the highest peak position for the album one of the boys?
SELECT MAX(peak_position) FROM table_name_48 WHERE album = "one of the boys"
What are the titles of all the papers Google published?
SELECT t3.title FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid where t1.name = "Google"
Great! Can you put them in descending order of total number of stock?
SELECT T2.Name FROM phone_market AS T1 JOIN phone AS T2 ON T1.Phone_ID = T2.Phone_ID GROUP BY T2.Name HAVING sum ( T1.Num_of_stock ) > 2000 ORDER BY sum ( T1.Num_of_stock ) DESC
what is the molecules when the percent mass is 1.0?
SELECT molecules FROM table_name_8 WHERE percent_of_mass = "1.0"
What was the place when the score was 71-69-71=211?
SELECT place FROM table_name_22 WHERE score = 71 - 69 - 71 = 211
In 1997, what was the final total?
SELECT total FROM table_name_57 WHERE year_s__won = "1997"
Please give the ids of the oldest films that got the most ratings.
SELECT DISTINCT T1.movieid FROM u2base AS T1 INNER JOIN movies AS T2 ON T1.movieid = T2.movieid WHERE T1.rating = 5 AND T2.year = 1
How many different cities do have some airport in the country of Greenland?
SELECT COUNT(DISTINCT city) FROM airports WHERE country = 'Greenland'
How many countries uses the 1968 System of National Accounts methodology?
SELECT COUNT(CountryCode) FROM Country WHERE SystemOfNationalAccounts = 'Country uses the 1968 System of National Accounts methodology.'
When arthur collins is the winner what is the reason?
SELECT reason FROM table_28898948_3 WHERE winner = "Arthur Collins"
Show origin and destination for flights with price higher than 300.
SELECT origin , destination FROM Flight WHERE price > 300
What is the network with the play-by-play Marv Albert before 1994?
SELECT network FROM table_name_66 WHERE play_by_play = "marv albert" AND year < 1994
How many pa were blank ends 7 and 5?
SELECT COUNT(pa) FROM table_24475186_2 WHERE blank_ends = 7 AND l = 5
How many teams finished in 8th in 2008?
SELECT COUNT(team) FROM table_20140132_1 WHERE position_in_2008 = "8th"
Name the minimum wins
SELECT MIN(wins) FROM table_19001175_1
Name the most total for south korea
SELECT MAX(total) FROM table_30007505_1 WHERE country_territory = "South Korea"
What position does allister brown play.
SELECT position FROM table_2850912_12 WHERE player = "Allister Brown"
what is the salary and name of the employee who has the most number of aircraft certificates?
SELECT T1.name , T1.salary FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid GROUP BY T1.eid ORDER BY count(*) DESC LIMIT 1
Can you add up the room counts for each distinct apartment type code and display those values along with their respective department type codes?
SELECT apt_type_code , sum ( room_count ) FROM Apartments GROUP BY apt_type_code
What is the score for the southern home team?
SELECT score FROM table_name_78 WHERE home_team = "southern"
What is the rank of the film directed by Kevin Costner?
SELECT COUNT(rank) FROM table_name_14 WHERE director = "kevin costner"
What is the Physician name of the following Position Staff Internist ? tell me the SSN, and Employee ID, | Do you want the name, SSN, and employee ID? | yes
select name,SSN,employeeid from physician where position = "Staff Internist"
What team has a Rank Ret, and rider Frank A Applebee?
SELECT team FROM table_name_92 WHERE rank = "ret" AND rider = "frank a applebee"
What is the Score with a Home of colorado, and a Date with may 11?
SELECT score FROM table_name_72 WHERE home = "colorado" AND date = "may 11"
what is the capacity of Codling? | Did you mean the capacity of the cinema with a name of Coding? | yes
SELECT capacity FROM cinema where name = "Codling"
What is the Chassis from before 1997 with a Lamborghini v12 engine?
SELECT chassis FROM table_name_98 WHERE year < 1997 AND engine = "lamborghini v12"
In what state is it located?
SELECT T1.State_County FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID WHERE T1.City_Town = "Feliciaberg"
How many employees have that job title?
SELECT count ( * ) from employees where title = "Sales Manager"
What is the high score for the player with 0 stumps, 4 catches, more than 14 inns and an average smaller than 56.1?
SELECT SUM(high_score) FROM table_name_52 WHERE stump = 0 AND catches = 4 AND average < 56.1 AND inns > 14
Are there any other amenities that the dorm features? | For this dorm? Or for all dorms? | For this dorm.
SELECT T1.dorm_name,T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T1.dorm_name = 'Fawlty Towers'
Return the apartment numbers of the apartments with type code "Flat".
SELECT apt_number FROM Apartments WHERE apt_type_code = "Flat"
Which competition occurred after 1980 with a score of 0:5 in Jerusalem?
SELECT competition FROM table_name_51 WHERE year > 1980 AND score = "0:5" AND location = "jerusalem"
What is the average height of the players from the college named 'Yale University'?
SELECT avg(T1.height) FROM player AS T1 JOIN player_college AS T2 ON T1.player_id = T2.player_id JOIN college AS T3 ON T3.college_id = T2.college_id WHERE T3.name_full = 'Yale University';
Please give me a list of cities whose regional population is over 10000000.
SELECT city FROM city WHERE regional_population > 10000000
What is the gender of the majority of Vivo phone users?
SELECT T.gender FROM ( SELECT T2.gender, COUNT(T2.gender) AS num FROM phone_brand_device_model2 AS T1 INNER JOIN gender_age AS T2 ON T2.device_id = T1.device_id WHERE T1.phone_brand = 'vivo' GROUP BY T2.gender ) AS T ORDER BY T.num DESC LIMIT 1
What is the low silver medal total for nations with over 1 bronze ranked above 11?
SELECT MIN(silver) FROM table_name_80 WHERE bronze > 1 AND rank < 11
how many artist are there in total?
SELECT count ( * ) from artist
How many of the movies rated 5 are rated by a user between the ages of 25 and 35?
SELECT COUNT(T1.movieid) FROM u2base AS T1 INNER JOIN users AS T2 ON T1.userid = T2.userid WHERE T1.rating = 5 AND T2.age BETWEEN 25 AND 35
Can you tell me the Record that has the Game of 19?
SELECT record FROM table_name_72 WHERE game = 19
What is the text of the tweet that got the most `likes`?
SELECT text FROM twitter WHERE Likes = ( SELECT MAX( Likes) FROM twitter )
What are all percentages of overweight or obese adults for obesity rank of 21?
SELECT overweight__incl_obese__adults FROM table_18958648_1 WHERE obesity_rank = 21
What are the names of the vendors to which the company purchased its women's tights products?
SELECT DISTINCT T4.Name FROM Product AS T1 INNER JOIN ProductVendor AS T2 ON T1.ProductID = T2.ProductID INNER JOIN ProductSubcategory AS T3 ON T1.ProductSubcategoryID = T3.ProductSubcategoryID INNER JOIN Vendor AS T4 ON T2.BusinessEntityID = T4.BusinessEntityID WHERE T1.MakeFlag = 0 AND T1.Style = 'W' AND T3.Name = 'Tights'
Where was the game when Police S.A. was the opponent?
SELECT location FROM table_name_78 WHERE opponent_team = "police s.a."
Which country has the most restaurants with Italian food?
SELECT T2.county FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.food_type = 'Italian' GROUP BY T2.county ORDER BY COUNT(T1.id_restaurant) DESC LIMIT 1
What are the result description of the project whose detail is 'sint'?
SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code JOIN Projects AS T3 ON T2.project_id = T3.project_id WHERE T3.project_details = 'sint'
How many penalty minutes did the Montreal Canadiens have on average in the Stanley Cup Finals?
SELECT CAST(SUM(T2.PIM) AS REAL) / COUNT(T2.PIM) FROM Teams AS T1 INNER JOIN TeamsSC AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.name = 'Montreal Canadiens'
How many employees are under Gregory Cardenas?
SELECT COUNT(T1.employee_id) FROM employee AS T1 WHERE T1.supervisor = ( SELECT employee_id FROM employee WHERE first_name = 'Gregory' AND last_name = 'Cardenas' )
Please list the names of all the universities in Australia.
SELECT T1.university_name FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE T2.country_name = 'Australia'
What are the titles of films that do not have a film market estimation?
SELECT Title FROM film WHERE Film_ID NOT IN (SELECT Film_ID FROM film_market_estimation)
what's Lyla last name?
SELECT last_name FROM teachers where first_name = "Lyla"
What are the names of workshop groups in which services with product name "film" are performed?
SELECT T1.Store_Phone , T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T2.Product_Name = "film"
How many points and bonuses did Kurt Busch get?
SELECT pts_bns FROM table_27940569_1 WHERE driver = "Kurt Busch"
Which month has the most happy hours?
SELECT MONTH FROM happy_hour GROUP BY MONTH ORDER BY count(*) DESC LIMIT 1
* I have left the chat *
SELECT sum ( T1.attendance ) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id group by T1.team_id ORDER BY sum ( T1.attendance ) desc limit 1
Which Award Ceremony has a Nominee of sarah travis, and a Category of the best orchestrations?
SELECT award_ceremony FROM table_name_87 WHERE nominee = "sarah travis" AND category = "best orchestrations"
List the business' name and risk category of businesses with a score greater than the 80% of average score of all businesses.
SELECT DISTINCT T1.name, T3.risk_category FROM businesses AS T1 INNER JOIN inspections AS T2 ON T1.business_id = T2.business_id INNER JOIN violations AS T3 ON T1.business_id = T3.business_id WHERE T2.score > 0.8 * ( SELECT AVG(score) FROM inspections )
How many different degree names are offered?
SELECT COUNT(DISTINCT degree_summary_name) FROM Degree_Programs
If Crazy In Love is the song choice, what is the theme?
SELECT theme FROM table_22736523_1 WHERE song_choice = "Crazy In Love"
Thanks! I would be fine just know which is the tallest building. | Do you mean you want to know the name of the tallest building? Or anything else? | Yes! I want to know the name of the tallest building please.
SELECT Name FROM building ORDER BY Height_feet DESC LIMIT 1
How many apartments are there?
SELECT count ( * ) FROM Apartments
When fc oberau is the oberbayern a what is the oberpfalz?
SELECT oberpfalz FROM table_23224961_1 WHERE oberbayern_a = "FC Oberau"
What was the crowd size at Junction Oval?
SELECT MAX(crowd) FROM table_name_78 WHERE venue = "junction oval"
What is the average rank of the movie from Paramount Studios that grossed $200,512,643?
SELECT AVG(rank) FROM table_name_26 WHERE studio = "paramount" AND gross = "$200,512,643"
Can you add the resident other detail to the results?
SELECT T1.resident_id , T1.other_details , count ( * ) FROM Residents AS T1 JOIN Residents_Services AS T2 ON T1.resident_id = T2.resident_id GROUP BY T1.resident_id ORDER BY count ( * ) DESC
Find the name of the department that has the fewest members.
SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MEMBER_OF AS T2 ON T1.DNO = T2.DNO GROUP BY T2.DNO ORDER BY count(*) ASC LIMIT 1
What is the highest amount of gold medals awarded to a team with more than 9 silver, 7 bronze and more than 13 medals total?
SELECT MAX(gold) FROM table_name_72 WHERE total > 13 AND silver > 9 AND bronze = 7
Among the 4 clubs, how many members are there in total?
select count ( * ) from member_of_club
Score of 2–3 ot on what date?
SELECT date FROM table_name_76 WHERE score = "2–3 ot"
What is the name of the poll source with the earliest date?
SELECT Poll_Source FROM candidate ORDER BY Date DESC LIMIT 1
Which week has a result showing L 24-10?
SELECT week FROM table_name_82 WHERE result = "l 24-10"
I would like to know the names of all the physicians
SELECT name FROM physician
Show the carriers that have both phones with memory smaller than 32 and phones with memory bigger than 64.
SELECT Carrier FROM phone WHERE Memory_in_G < 32 INTERSECT SELECT Carrier FROM phone WHERE Memory_in_G > 64
What is the surface when the us open is the championship in the year 1979?
SELECT surface FROM table_22860698_2 WHERE championship = "US Open" AND year = 1979
Name the game cost for merged with new york central to form penn central
SELECT game_cost FROM table_243664_1 WHERE real_life_eventual_outcome = "Merged with New York Central to form Penn Central"
What are the first, middle, and last names, along with the ids, of all students who enrolled in 2 degree programs in one semester?
SELECT T1.first_name , T1.middle_name , T1.last_name , T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING count(*) = 2
List the names of wrestlers that have not been eliminated.
SELECT Name FROM wrestler WHERE Wrestler_ID NOT IN (SELECT Wrestler_ID FROM elimination)
State the name of u id 2 on the list?
SELECT name FROM useracct WHERE u_id = 2