sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
How much is the total goals for player with player ID aaltoan01 and how old is this person? | SELECT SUM(T2.G), STRFTIME('%Y', CURRENT_TIMESTAMP) - T1.birthyear FROM Master AS T1 INNER JOIN Scoring AS T2 ON T1.playerID = T2.playerID WHERE T1.playerID = 'aaltoan01' GROUP BY T1.birthyear |
Please show the nominee who has been nominated the greatest number of times. | SELECT Nominee FROM musical GROUP BY Nominee ORDER BY COUNT(*) DESC LIMIT 1 |
what is languages for Prity and genre? | Do you mean the song with the artist name Prity? | yes | SELECT languages, genre_is from song where artist_name = "Prity" |
Can you tell me where the history Doctorate's office is? | SELECT prof_office from professor where dept_code = "HIST" and prof_high_degree = "Ph.D." |
Which entrant had a Brabham BT10 chassis before 1965? | SELECT entrant FROM table_name_12 WHERE year < 1965 AND chassis = "brabham bt10" |
I want the driver for ferrari who made Laps less than 26 and grids more than 9 | SELECT driver FROM table_name_69 WHERE grid > 9 AND laps < 26 AND constructor = "ferrari" |
Which poles were there for the 8th position? | SELECT poles FROM table_name_47 WHERE position = "8th" |
How many medications are prescribed for each brand? | SELECT count(*) , T1.name FROM medication AS T1 JOIN prescribes AS T2 ON T1.code = T2.medication GROUP BY T1.brand |
Can you tell me the Capacity that has the Position in 2005 of 8? | SELECT capacity FROM table_name_88 WHERE position_in_2005 = "8" |
WHAT IS THE DRAW FOR u ritmu ljubavi, POINTS LARGER THAN 87? | SELECT MAX(draw) FROM table_name_73 WHERE song = "u ritmu ljubavi" AND points > 87 |
How many outcome have a score of 7–6 (9–7) , 6–3? | SELECT COUNT(outcome) FROM table_22834834_3 WHERE score_in_the_final = "7–6 (9–7) , 6–3" |
What is the number of nations that use English and Dutch? | SELECT COUNT(*) FROM (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "Dutch") |
What is the week for the stadium that had an attendance of 22,286? | SELECT AVG(week) FROM table_name_26 WHERE attendance = "22,286" |
Name the country for pieroni | SELECT country FROM table_name_46 WHERE name = "pieroni" |
what is the employee name of employee ID 30 | SELECT Employee_Name from Employees where Employee_ID = 30 |
Name the 2005 for 2003 of a and 2011 of 3r | SELECT 2005 FROM table_name_82 WHERE 2003 = "a" AND 2011 = "3r" |
Tell me the title for the production code less than 706 with series number more than 175 | SELECT title FROM table_name_78 WHERE series__number > 175 AND production_code < 706 |
What is the postal code of the address 692 Joliet Street? | SELECT postal_code FROM address WHERE address = '692 Joliet Street' |
Name the number of bush % for elko | SELECT COUNT(bush__percentage) FROM table_23014476_1 WHERE county = "Elko" |
Tell me the average spectators for 2006-06-21 and time more than 21 | SELECT AVG(spectators) FROM table_name_56 WHERE date = "2006-06-21" AND time_cet_ > 21 |
Which player's pick is 160? | SELECT player FROM table_name_48 WHERE pick = 160 |
Of the customers who are from Canada, how many used Federal Shipping? | SELECT COUNT(T3.CustomerID) FROM Shippers AS T1 INNER JOIN Orders AS T2 ON T1.ShipperID = T2.ShipVia INNER JOIN Customers AS T3 ON T2.CustomerID = T3.CustomerID WHERE T2.ShipName = 'Federal Shipping' |
What is the most common sport name those students played? | SELECT sportName,count ( * ) from sportsinfo where stuid in ( select stuid from student where age < 20 ) group by sportname order by count ( * ) desc limit 1 |
Which employee has showed up in most circulation history documents. List the employee's name and the number of drafts and copies. | SELECT Employees.employee_name, COUNT(*) FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id GROUP BY Circulation_History.document_id, Circulation_History.draft_number, Circulation_History.copy_number ORDER BY COUNT(*) DESC LIMIT 1 |
What bridge is a pratt pony through truss tyoe bridge? | SELECT name FROM table_name_4 WHERE type = "pratt pony through truss" |
seems like everybody will have some rain here.. then could you please let me know what is the lowest precipitation we have on the table? | SELECT min ( precipitation ) FROM weekly_weather |
What are the last names and ids of all drivers who had 11 pit stops and participated in more than 5 races? | SELECT T1.surname , T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING count(*) = 11 INTERSECT SELECT T1.surname , T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING count(*) > 5 |
When the opposing team was SSC-R what was the statistic? | SELECT statistic FROM table_name_79 WHERE opponent = "ssc-r" |
Where did v kent play? | SELECT venue FROM table_name_4 WHERE opponents = "v kent" |
How many total minutes has the Brooklyn-born player, known by the name of Superman, played during all of his NBA All-Star seasons? | SELECT SUM(T2.minutes) FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID WHERE T1.birthCity = 'Brooklyn' AND T1.nameNick LIKE '%Superman%' |
List the names of technicians who have not been assigned to repair machines. | SELECT Name FROM technician WHERE technician_id NOT IN (SELECT technician_id FROM repair_assignment) |
With the score of 6–3, 2–6, [10–8] and played on clay who was the opponent? | SELECT opponent FROM table_name_69 WHERE surface = "clay" AND score = "6–3, 2–6, [10–8]" |
What is the Nationality of the Aracataca Ship? | SELECT nationality FROM table_name_17 WHERE ship = "aracataca" |
How many shipments with weight of no more than 1,000 pounds were shipped by the oldest truck? | SELECT COUNT(*) FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id WHERE T2.weight < 1000 ORDER BY T1.model_year ASC LIMIT 1 |
Hello! Can you show me a list of all of the years for which there is data? | SELECT DISTINCT YEAR FROM degrees |
What is the birth date of Ty Conklin? | SELECT Birth_Place FROM people where Name = 'Ty Conklin' |
What are their names, please? | select Name from member where level in ( SELECT LEVEL FROM member GROUP BY LEVEL ORDER BY count ( * ) DESC LIMIT 1 ) |
What is the try bonus when the tries against are 17? | SELECT try_bonus FROM table_17625749_3 WHERE tries_against = "17" |
How many businesses ID sell beer and wine? | SELECT COUNT(business_id) FROM Business_Attributes WHERE attribute_id = 1 AND attribute_value = 'beer_and_wine' |
How many people in total have attended games at Kardinia Park? | SELECT SUM(crowd) FROM table_name_93 WHERE venue = "kardinia park" |
How many continents are there? | SELECT count(*) FROM CONTINENTS; |
What is the date of the game when the venue is Kardinia Park? | SELECT date FROM table_name_13 WHERE venue = "kardinia park" |
What was the score of the replay at Millwall? | SELECT score FROM table_name_23 WHERE tie_no = "replay" AND home_team = "millwall" |
What was the date of the home game for Colorado? | SELECT date FROM table_name_67 WHERE home = "colorado" |
Thank you! Can you please list player ids for all of the left-footed players with heights between 180cm and 190cm? | SELECT player_api_id FROM Player WHERE height > = 180 AND height < = 190 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE preferred_foot = "left" |
Return the first name, last name and email of the owners living in a state whose name contains the substring 'North'. | SELECT first_name , last_name , email_address FROM Owners WHERE state LIKE '%North%' |
How tall is the Torre Reforma? | SELECT Stories FROM buildings where name = "Torre Reforma" |
What is the Parts-per example of 2×10 −6? | SELECT parts_per_example FROM table_name_75 WHERE value_of_quantity = "2×10 −6" |
When indianapolis, indiana is the location what is the institution? | SELECT institution FROM table_28211213_2 WHERE location = "Indianapolis, Indiana" |
What was the category of the award that John Frank Levey was nominated for after 1995? | SELECT category FROM table_name_73 WHERE nominee_s_ = "john frank levey" AND year > 1995 |
Who was the opponent in week 3? | SELECT opponent FROM table_name_34 WHERE week = 3 |
On episodes where guest 1 is Jim White, who was guest 3? | SELECT guest_3 FROM table_20466963_9 WHERE guest_1 = "Jim White" |
Which CBSAs have more than 10 zip codes? | SELECT T1.CBSA_name FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA GROUP BY T1.CBSA HAVING COUNT(T2.zip_code) > 10 |
How many different degrees are offered? | SELECT count(DISTINCT degree_summary_name) FROM Degree_Programs |
If the episode is 6x03, what is the first broadcast total number? | SELECT COUNT(first_broadcast) FROM table_23575917_7 WHERE episode = "6x03" |
What is the amount difference between the bottles of root beer sold from Louisiana and Missouri? | SELECT ( SELECT COUNT(T1.BrandID) FROM rootbeer AS T1 INNER JOIN rootbeerbrand AS T2 ON T1.BrandID = T2.BrandID WHERE T2.State = 'LA' AND T1.ContainerType = 'Bottle' ) - ( SELECT COUNT(T3.BrandID) FROM rootbeer AS T3 INNER JOIN rootbeerbrand AS T4 ON T3.BrandID = T4.BrandID WHERE T4.State = 'MO' AND T3.ContainerType = 'Bottle' ) AS DIFFERENCE |
What is the average assets in billions of the company Bank of America, which has less than 49.01 billions in sales? | SELECT AVG(assets__billion_) AS $_ FROM table_name_70 WHERE company = "bank of america" AND sales__billion_$_ < 49.01 |
What is the highest average monthly rental? | what do you mean by "highest average monthly rental" | sorry, highest monthly rental | select max ( monthly_rental ) from student_addresses |
Where is Business Entity ID No.4 located at? Give the address down to street. | SELECT AddressLine1, AddressLine2 FROM Address WHERE AddressID IN ( SELECT AddressID FROM BusinessEntityAddress WHERE BusinessEntityID = 4 ) |
What status is shown for Cadeby? | SELECT status FROM table_name_17 WHERE name = "cadeby" |
Show different builders of railways, along with the corresponding number of railways using each builder. | SELECT Builder , COUNT(*) FROM railway GROUP BY Builder |
Which show director has 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 |
Show the number of document types. | SELECT COUNT(*) FROM Ref_document_types |
Which city held the game in Old Trafford before 1907 when the Opposition was sussex? | SELECT city FROM table_name_49 WHERE year < 1907 AND venue = "old trafford" AND opposition = "sussex" |
Which police forces operate in both counties that are located in the East and in the West? | SELECT Police_force FROM county_public_safety WHERE LOCATION = "East" INTERSECT SELECT Police_force FROM county_public_safety WHERE LOCATION = "West" |
What are the names of the students that have the incident type code "VIOLENCE"? | Do you mean last name or first name? | Both, please. | SELECT T2.first_name , T2.last_name FROM Behavior_Incident AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T1.incident_type_code = "VIOLENCE" |
how may customer payment cash method | SELECT count ( * ) from Customers where payment_method = "Cash" |
Name the model for specification of dl-066 | SELECT model FROM table_name_54 WHERE specification = "dl-066" |
What drug is administered more often to treat child attention deficit disorder? | SELECT DESCRIPTION FROM medications WHERE REASONDESCRIPTION = 'Child attention deficit disorder' GROUP BY DESCRIPTION ORDER BY COUNT(DESCRIPTION) DESC LIMIT 1 |
Find the dates of assessment notes for students with first name "Fanny". | SELECT T1.date_of_notes FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.first_name = "Fanny" |
Which address has members younger than 30 and older than 40? | SELECT address FROM member WHERE age < 30 INTERSECT SELECT address FROM member WHERE age > 40 |
What is the English title for season 6? | SELECT title__english_ FROM table_name_91 WHERE number_of_season = 6 |
What team has 59.372 for qual 1? | SELECT team FROM table_name_37 WHERE qual_1 = "59.372" |
what is the age of Bob? | SELECT age FROM Person WHERE name = 'Bob' |
What are the highest and lowest prices of products, grouped by and alphabetically ordered by product type? | SELECT max ( product_price ) , min ( product_price ) FROM products GROUP BY product_type_code ORDER BY product_type_code |
Name the pure tamil for enga athilae | SELECT pure_tamil FROM table_name_97 WHERE how_other_iyers_say_it = "enga athilae" |
Customer No.129301 made an order on 1996/7/27, what was the delivery time for the first part of that order? | SELECT JULIANDAY(T2.l_receiptdate) - JULIANDAY(T2.l_commitdate) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T1.o_custkey = '129301' AND T1.o_orderdate = '1996-07-27' |
What are the products that are supplied by Aux joyeux ecclsiastiques? | SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Aux joyeux ecclsiastiques' |
Thank you for that! Can you filter that list to show only the rows that correspond to Fall of 2010? | SELECT * FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id = T2.course_id WHERE building = 'Chandler' AND semester = 'Fall' AND YEAR = 2010 |
Away team Swindon Town had a Tie no listing of Replay with what as an Attendance? | SELECT attendance FROM table_name_74 WHERE tie_no = "replay" AND away_team = "swindon town" |
What is the smallest number? | SELECT MIN(_number) FROM table_18424435_5 |
Which Programming is on a channel less than 26.5, has a Video of 480i and a PSIP Short Name of jtv? | SELECT programming FROM table_name_89 WHERE channel < 26.5 AND video = "480i" AND psip_short_name = "jtv" |
Which Name had a Games of 2008 beijing, and a Medal of gold? | SELECT name FROM table_name_37 WHERE games = "2008 beijing" AND medal = "gold" |
How many items did receive reviews? | select count ( distinct i_id ) from review |
Show the types of schools that have two schools. | SELECT TYPE FROM school GROUP BY TYPE HAVING count(*) = 2 |
What is the colonized date for the n/a charter range for appalachian state? | SELECT colonized FROM table_name_61 WHERE charter_range = "n/a" AND school = "appalachian state" |
What are the average and maximum number of tickets bought in all visits? | SELECT avg(num_of_ticket) , max(num_of_ticket) FROM visit |
What is the total number of Laps when collision shows for time for Switzerland and less than 11 for grid? | SELECT COUNT(laps) FROM table_name_39 WHERE time = "collision" AND team = "switzerland" AND grid < 11 |
Achievement of m (ft), and a Type of mi-10r, and a Pilot of v.p. koloshenko, and a Date of 28 may 1965 had what record description? | SELECT record_description FROM table_name_96 WHERE achievement = "m (ft)" AND type = "mi-10r" AND pilot = "v.p. koloshenko" AND date = "28 may 1965" |
Name the least amount of int yards | SELECT MIN(int) AS yards FROM table_15581223_8 |
Find the estimated inflation rate that was used to adjust the 1995 box office revenue for Disney's films. | SELECT SUM(CAST(REPLACE(trim(inflation_adjusted_gross, '$'), ',', '') AS REAL)) / SUM(CAST(REPLACE(trim(total_gross, '$'), ',', '') AS REAL)) FROM movies_total_gross WHERE SUBSTR(release_date, LENGTH(release_date) - 3, LENGTH(release_date)) = '1995' GROUP BY SUBSTR(release_date, LENGTH(release_date) - 3, LENGTH(release_date)) = '1995' |
In countries where there is more than one ethnic group, name the ethnic group with the greatest presence in each country and the country to which it corresponds. | SELECT Country, Name FROM ethnicGroup AS T1 WHERE Percentage < 100 AND Percentage = ( SELECT MAX(Percentage) FROM ethnicGroup AS T2 WHERE T1.Country = T2.Country ) |
Give the title and credits for the course that is taught in the classroom with the greatest capacity. | SELECT T3.title , T3.credits FROM classroom AS T1 JOIN SECTION AS T2 ON T1.building = T2.building AND T1.room_number = T2.room_number JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T1.capacity = (SELECT max(capacity) FROM classroom) |
Which countries do not have a stadium that was opened after 2006? | SELECT country FROM stadium EXCEPT SELECT country FROM stadium WHERE opening_year > 2006 |
What is theW-L of the tournament listed as A for 1976? | SELECT career_w_l FROM table_name_82 WHERE 1976 = "a" |
Name the hebrew for tisʕ- | SELECT hebrew FROM table_26919_6 WHERE arabic = "tisʕ-" |
What are the three journals that the papers written by Andrew Cain were published in? Please provide your answer with the full name of each journal. | SELECT T3.FullName FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Journal AS T3 ON T1.JournalId = T3.Id WHERE T2.Name = 'Andrew Cain' |
Hello! Can you show me the top 3 school with the largest enrollment? | SELECT * FROM university ORDER BY enrollment DESC LIMIT 3 |
How many gas station are opened between 2000 and 2005? | SELECT count(*) FROM gas_station WHERE open_year BETWEEN 2000 AND 2005 |
How many drivers drove 300 laps at average speed of 103.594? | SELECT COUNT(driver) FROM table_2175858_1 WHERE laps = "300" AND average_speed__mph_ = "103.594" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.