sentence
stringlengths
3
347
sql
stringlengths
18
804
What round did the spartak moscow club play?
SELECT round FROM table_name_12 WHERE club = "spartak moscow"
Which owner had MRT 1 HD?
SELECT owner FROM table_name_73 WHERE name = "mrt 1 hd"
Who is moving to Chelsea on loan?
SELECT name FROM table_name_84 WHERE type = "loan" AND moving_to = "chelsea"
Awesome! That's great! Can you filter this list to show only the employee IDs and correpsonding salaries that are above the average salary?
SELECT employee_id , salary FROM employees WHERE salary > ( SELECT AVG ( salary ) FROM employees )
Show the names and ages of editors and the theme of journals for which they serve on committees, in ascending alphabetical order of theme.
SELECT T2.Name , T2.age , T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID ORDER BY T3.Theme ASC
How many games for keith j. miller, who debuted after 1974 with less than 1 goal?
SELECT AVG(games) FROM table_name_28 WHERE goals < 1 AND player = "keith j. miller" AND debut_year > 1974
how many members are from united states or canada
SELECT count ( Name ) FROM member WHERE Country = "United States" OR Country = "Canada"
Find the checking balance of the accounts whose savings balance is higher than the average savings balance.
SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name IN ( SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance > ( SELECT avg ( balance ) FROM savings ) )
When 6.66 is the amount of viewers what is the lowest production code?
SELECT MIN(production_code) FROM table_24781886_2 WHERE viewers = "6.66"
what is the capacity when the home city is zagreb and the manager is zlatko kranjčar?
SELECT AVG(capacity) FROM table_name_88 WHERE home_city = "zagreb" AND manager = "zlatko kranjčar"
Great! Can you tell me how many of these artists above age 46 joined after 1990?
SELECT count ( * ) FROM artist WHERE age > 46 AND Year_Join > 1990
What was the lowest crowd size when Carlton was the away team.
SELECT MIN(crowd) FROM table_name_65 WHERE away_team = "carlton"
Who is the husband of the image of renata of lorraine?
SELECT husband FROM table_name_87 WHERE image = "renata of lorraine"
Which grades have 4 or more high schoolers?
SELECT grade FROM Highschooler GROUP BY grade HAVING count(*) >= 4
Who directed the film that had phyllis welch as the leading lady?
SELECT director_s_ FROM table_name_74 WHERE leading_lady = "phyllis welch"
How many grand final dual television commentators were there in 1961?
SELECT COUNT(grand_final_dual_television_commentator) FROM table_1368649_9 WHERE year_s_ = 1961
Show storm name with at least two regions and 10 cities affected.
SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING COUNT(*) >= 2 INTERSECT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING SUM(T2.number_city_affected) >= 10
What's the highest League Cup with an FA Cup thats larger than 2?
SELECT MAX(league) AS Cup FROM table_name_95 WHERE fa_cup > 2
how many title are presented on the table
SELECT count ( title ) FROM papers
List the first Name and last name of all players not from USA and who are born in 1990 .
SELECT firstName, lastName FROM Master WHERE birthYear = 1990 AND birthCountry != 'USA'
On what Week was the Detroit Lions the Opponent?
SELECT week FROM table_name_66 WHERE opponent = "detroit lions"
Find the id and city of the student address with the highest average monthly rental.
SELECT T2.address_id , T1.city FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id GROUP BY T2.address_id ORDER BY AVG(monthly_rental) DESC LIMIT 1
What is stanford's average overall?
SELECT AVG(overall) FROM table_name_66 WHERE college = "stanford"
WHAT EPISODE HAS A REGION NUMBER BIGGER THAN 1, AND 32 DVDS?
SELECT episode_no FROM table_name_58 WHERE region_no > 1 AND no_of_dvds = "32"
Which 2005 has a Güzelçamlı’s Lost Panther of green fairy?
SELECT 2005 FROM table_name_76 WHERE güzelçamlı’s_lost_panther = "green fairy"
What was the position for team corinthians with over 14 against?
SELECT AVG(position) FROM table_name_90 WHERE team = "corinthians" AND against > 14
stae the least number of wins in 1986
SELECT MIN(wins) FROM table_19864214_3 WHERE seasons = "1986"
list all dates available
SELECT Date FROM performance
List the full name and age of the player when he won the "Finals MVP" in 2003.
SELECT T1.firstName, T1.middleName, T1.lastName , 2003 - strftime('%Y', T1.birthDate) FROM awards_players AS T2 JOIN players AS T1 ON T2.playerID = T1.playerID WHERE T2.award = 'Finals MVP' AND T2.year = 2003
Find the top 3 products which have the largest number of problems?
SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name ORDER BY COUNT(*) DESC LIMIT 3
now please show the product type codes which have at least two products
SELECT product_type_code FROM products GROUP BY product_type_code HAVING count ( * ) > = 2
Among all the tweets posted from Buenos Aires, how many of them were posted on Thursdays?
SELECT COUNT(T1.TweetID) FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T2.City = 'Buenos Aires' AND T1.Weekday = 'Thursday'
What is the smallest amount of silver?
SELECT MIN(silver) FROM table_22355_29
What is the average, maximum, and minimum budget for all movies before 2000.
SELECT AVG(budget_million), MAX(budget_million), MIN(budget_million) FROM movie WHERE YEAR < 2000
Which area has a telephone of (052) of 3862279?
SELECT area__km_2__ FROM table_name_1 WHERE telephone__052_ = "3862279"
Show the train name and station name for each train
SELECT T2.name , T3.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id
What is the total number of draws when there are fewer than 3 wins?
SELECT COUNT(draws) FROM table_name_20 WHERE wins < 3
Who won the Paris-Roubaix in 2006?
SELECT paris_roubaix___fra__ FROM table_name_33 WHERE year = 2006
List categories that have at least two books after year 1989.
SELECT category FROM book_club WHERE YEAR > 1989 GROUP BY category HAVING count(*) >= 2
What is the title of Amenemhat II?
SELECT title FROM table_name_78 WHERE name = "amenemhat ii"
Give the advisor with the most students.
SELECT advisor FROM Student GROUP BY advisor ORDER BY count(*) DESC LIMIT 1
What is the Opponent in final with an All England Open Outcome?
SELECT opponent_in_the_final FROM table_name_58 WHERE outcome = "all england open"
How many games had three pointers where the number of points was 581?
SELECT COUNT(three_pointers) FROM table_22824324_2 WHERE points = 581
Can you show all the events that have one, two or three notes with their property ids?
SELECT T1.Customer_Event_ID , T1.property_id FROM Customer_Events AS T1 JOIN Customer_Event_Notes AS T2 ON T1.Customer_Event_ID = T2.Customer_Event_ID GROUP BY T1.customer_event_id HAVING count ( * ) BETWEEN 1 AND 3
For score 7–6 (7–3) , 6–4 please mention total number of outcome
SELECT COUNT(outcome) FROM table_27877656_7 WHERE score = "7–6 (7–3) , 6–4"
How many section titles are there for the document "David CV"?
SELECT count ( t2.section_title ) FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code WHERE t1.document_name = "David CV"
What are the allergies and their types that the student with first name Lisa has? And order the result by name of allergies.
SELECT T1.Allergy, T1.AllergyType FROM Allergy_type AS T1 JOIN Has_allergy AS T2 ON T1.Allergy = T2.Allergy JOIN Student AS T3 ON T3.StuID = T2.StuID WHERE T3.Fname = "Lisa" ORDER BY T1.Allergy
What is the name of a league in the sport of baseball?
SELECT league FROM table_name_96 WHERE sport = "baseball"
Can you display the first and last names associated with those staff ids?
SELECT staff_id,first_name, last_name FROM Staff WHERE staff_address_id = 14
An attendance larger than 33,684 and an opponent of Hamilton Academical had this listed as a result?
SELECT result FROM table_name_55 WHERE opponent = "hamilton academical" AND attendance > 33 OFFSET 684
What was the score for the game in which Emeka Okafor (10) had high rebounds?
SELECT score FROM table_11907963_6 WHERE high_rebounds = "Emeka Okafor (10)"
How about the average?
SELECT avg ( HS ) FROM Player
What was the venue when the home team was footscray?
SELECT venue FROM table_name_81 WHERE home_team = "footscray"
Name the total number of high assists for fedexforum 11,283
SELECT COUNT(high_assists) FROM table_27756474_6 WHERE location_attendance = "FedExForum 11,283"
What is the series name of the TV Channel that shows the cartoon "The Rise of the Blue Beetle"?
SELECT T1.series_name FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Title = "The Rise of the Blue Beetle!";
How many playlists in this table?
SELECT count ( id ) from playlists
Who won the mountains classification when Maarten Tjallingii won most corageous?
SELECT mountains_classification FROM table_25055040_22 WHERE most_courageous = "Maarten Tjallingii"
Find all airlines that have flights from both airports 'APG' and 'CVO'.
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "APG" INTERSECT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "CVO"
Count the number of customers.
SELECT count(*) FROM Customers
For the tweet which got a reach number of 547851, which country did it come from?
SELECT T2.Country FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T1.Reach = 547851
what is average of volume?
SELECT avg ( volume ) FROM music_festival
What are the names of the reviewers who have rated a movie more than 3 stars before?
SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars > 3
What is Roy Hall's highest round?
SELECT MAX(round) FROM table_name_67 WHERE name = "roy hall"
WHich Rules has a Method of ko (punch)?
SELECT rules FROM table_name_26 WHERE method = "ko (punch)"
What is the constructor when the Q1 order is 4?
SELECT constructor FROM table_1706942_1 WHERE q1_order = 4
Waht was the away team when the home team is colchester united?
SELECT away_team FROM table_name_95 WHERE home_team = "colchester united"
What is Lijsttrekker, when Cabinet is "Hans Van Mierlo", and when Fractievoorzitter is "Thom De Graaf"?
SELECT lijsttrekker FROM table_name_81 WHERE cabinet = "hans van mierlo" AND fractievoorzitter = "thom de graaf"
Which Score has an Opponent of melanie south?
SELECT score FROM table_name_58 WHERE opponent = "melanie south"
Show me the names | Do you mean the name of all the person? | name of all the persons
SELECT name FROM Person
What district is Samuel A. Bridges ( D ) assigned to as a successor?
SELECT district FROM table_228439_4 WHERE successor = "Samuel A. Bridges ( D )"
How many transactions have a share count larger than 50?
SELECT count ( * ) FROM TRANSACTIONS WHERE share_count >50
Where are the headquarters of the company whose sales were 69.2 billion?
SELECT headquarters FROM table_1682026_3 WHERE sales__billion_$_ = "69.2"
What is the song in the volume with the maximum weeks on top?
SELECT Song FROM volume ORDER BY Weeks_on_Top DESC LIMIT 1
Which Winners is the highest one that has a Rank larger than 7, and a Third smaller than 1?
SELECT MAX(winners) FROM table_name_44 WHERE rank > 7 AND third < 1
What player was on the Grizzlies from 2009-2013?
SELECT player FROM table_16494599_1 WHERE years_for_grizzlies = "2009-2013"
What is the total number of golds having a total of 1, bronzes of 0, and from West Germany?
SELECT COUNT(gold) FROM table_name_61 WHERE total = 1 AND bronze < 1 AND nation = "west germany"
Find the average ram mib size of the chip models that are never used by any phone.
SELECT avg(RAM_MiB) FROM chip_model WHERE model_name NOT IN (SELECT chip_model FROM phone)
How many countries belong to the Algeria region?
SELECT COUNT(T1.r_name) FROM region AS T1 INNER JOIN nation AS T2 ON T1.r_regionkey = T2.n_regionkey WHERE T2.n_name = 'ALGERIA'
How many people are guest 1 on episodes where guest 4 is Des Kelly?
SELECT COUNT(guest_1) FROM table_20466963_9 WHERE guest_4 = "Des Kelly"
Calculate the total salary for employees from UK.
SELECT SUM(Salary) FROM Employees WHERE Country = 'UK'
What is the meaning of the constellation that has puppis /ˈpʌpɨs/ as genitive?
SELECT meaning FROM table_287159_1 WHERE genitive = "Puppis /ˈpʌpɨs/"
What is the total number of ratings that has more than 3 stars?
SELECT count(*) FROM Rating WHERE stars > 3
Which AFL team has a pick 4 for the offensive tackle position?
SELECT afl_team FROM table_name_14 WHERE position = "offensive tackle" AND pick = 4
What is the Man of the Match of the Competition with a Result of lost 2-5?
SELECT man_of_the_match FROM table_name_73 WHERE result = "lost 2-5"
Serge Beaudoin was drafted when in the 1972 NHL draft
SELECT MIN(pick__number) FROM table_1473672_7 WHERE player = "Serge Beaudoin"
what is the average points when the goal difference is less than 17, the club is getafe cf and the goals for is more than 30?
SELECT AVG(points) FROM table_name_86 WHERE goal_difference < 17 AND club = "getafe cf" AND goals_for > 30
Find the names of users whose emails contain ‘superstar’ or ‘edu’.
SELECT name FROM user_profiles WHERE email LIKE '%superstar%' OR email LIKE '%edu%'
What is the cell phone number of the student whose address has the lowest monthly rental?
SELECT T2.cell_mobile_number FROM Student_Addresses AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.monthly_rental ASC LIMIT 1
Name the total number of districts for first elected being 1998
SELECT COUNT(district) FROM table_25030512_24 WHERE first_elected = "1998"
What is the total salary expenses of team Boston Red Stockings in 2010?
SELECT sum(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2010
What is the 2nd leg that Team 1 is Union Berlin?
SELECT 2 AS nd_leg FROM table_name_46 WHERE team_1 = "union berlin"
Which products have problems reported by both the staff named Lacey Bosco and the staff named Kenton Champlin?
SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T3.staff_first_name = "Lacey" AND T3.staff_last_name = "Bosco" INTERSECT SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T3.staff_first_name = "Kenton" AND T3.staff_last_name = "Champlin"
Find the different first names and cities of the students who have allergy to milk or cat.
SELECT DISTINCT T1.fname, T1.city_code FROM Student AS T1 JOIN Has_Allergy AS T2 ON T1.stuid = T2.stuid WHERE T2.Allergy = "Milk" OR T2.Allergy = "Cat"
Which country is Harvard University in?
SELECT T2.country_name FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE T1.university_name = 'Harvard University'
How many more scenes are there in Act 1 than in Act 5 in Twelfth Night?
SELECT SUM(IIF(T2.Act = 1, 1, 0)) - SUM(IIF(T2.Act = 5, 1, 0)) AS more FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.Title = 'Twelfth Night'
ID 1 is for which Campus?
SELECT campus FROM campuses where id = '1'
What is the council area for the Larkhall urban sub-area?
SELECT council_area FROM table_name_51 WHERE urban_sub_area = "larkhall"
Who is the opponent of the submission (triangle choke) method of submission?
SELECT opponent FROM table_name_41 WHERE method = "submission (triangle choke)"
Yes.
SELECT grade from list where FirstName like "%MAUDE%"
What affiliation is Erie, Pennsylvania?
SELECT affiliation FROM table_16381914_1 WHERE location = "Erie, Pennsylvania"