sentence
stringlengths
3
347
sql
stringlengths
18
804
What is the lowest attendance that East End Park has ever had?
SELECT MIN(lowest) FROM table_11207040_5 WHERE stadium = "East End Park"
what is the rank when bronze is less than 1 and silver is less than 1?
SELECT rank FROM table_name_52 WHERE bronze < 1 AND silver < 1
Please show the most common occupation of players.
SELECT Occupation FROM player GROUP BY Occupation ORDER BY COUNT(*) DESC LIMIT 1
What is the total of Industrial and Commercial Panels that have a Labour Panel greater than 1, a Nominated by the Taoiseach lesss than 11 and a Cultural and Educational Panel smaller than 0
SELECT COUNT(industrial_and_commercial_panel) FROM table_name_45 WHERE labour_panel > 1 AND nominated_by_the_taoiseach < 11 AND cultural_and_educational_panel < 0
What project has the most staff?
SELECT project_id from Project_Staff group by project_id order by count ( staff_id ) DESC limit 1
Which positions have made 4 touchdowns?
SELECT position FROM table_14342592_5 WHERE touchdowns = 4
How many total goals conceded are there when the points are greater than 58, less than 27 wins, and less than 1 draws?
SELECT SUM(goals_conceded) FROM table_name_16 WHERE points > 58 AND wins < 27 AND draws < 1
Find the SSN and name of scientists who are assigned to the project with the longest hours.
SELECT T3.ssn , T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects)
How many car numbers were listed for Rusty Wallace?
SELECT COUNT(car__number) FROM table_1769428_2 WHERE winning_driver = "Rusty Wallace"
What team plays at home at Windy Hill?
SELECT home_team FROM table_name_28 WHERE venue = "windy hill"
Which TV season has a Season smaller than 8, and a Household (in millions) of 15.92 (17.1 rating)?
SELECT tv_season FROM table_name_61 WHERE season < 8 AND households__in_millions_ = "15.92 (17.1 rating)"
Please list all the links to the ratings on the movie "A Way of Life" with a critic.
SELECT T1.rating_url FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'A Way of Life' AND T1.critic IS NOT NULL
How many eastbound trains have rectangular-shaped head cars?
SELECT COUNT(T.train_id) FROM (SELECT T1.train_id FROM cars AS T1 INNER JOIN trains AS T2 ON T1.train_id = T2.id WHERE T1.position = 1 AND T2.direction = 'east' AND T1.shape = 'rectangle' GROUP BY T1.train_id)as T
What was the background of the contestant whose result was 11th place?
SELECT background FROM table_19810459_1 WHERE result = "11th place"
When tracy mcgrady (8) is leading in assists what is the date?
SELECT date FROM table_17288825_6 WHERE high_assists = "Tracy McGrady (8)"
What years did two or more churches open in?
SELECT open_date FROM church GROUP BY open_date HAVING count ( * ) > = 2
How many companies operates airlines in each airport?
SELECT T3.id , count(*) FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id JOIN airport AS T3 ON T2.airport_id = T3.id GROUP BY T3.id
Which breed do the most dogs have? Give me the breed name.
SELECT T1.breed_name FROM Breeds AS T1 JOIN Dogs AS T2 ON T1.breed_code = T2.breed_code GROUP BY T1.breed_name ORDER BY count(*) DESC LIMIT 1
What is the opening time of the active businesses in Surprise that has a low review count.
SELECT T2.opening_time 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 T1.city LIKE 'Surprise' AND T1.active LIKE 'TRUE' AND T1.review_count LIKE 'Low' GROUP BY T2.opening_time
WHAT OPPONENT HAD A SCORE OF 5:5?
SELECT opponent FROM table_name_47 WHERE score = "5:5"
What is the used id 1? | Do you mean what is the name of the user with id 1? | yes
SELECT name FROM useracct WHERE u_id = 1
What is the name of that airline?
SELECT T1.name FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T1.name ORDER BY count ( * ) DESC LIMIT 1
Which students are unaffected by allergies?
SELECT StuID FROM Student EXCEPT SELECT StuID FROM Has_allergy
Of all the nonessential genes that are not of the motorprotein class and whose phenotype is cell cycle defects, how many do not have a physical type of interaction?
SELECT COUNT(T1.GeneID) FROM Genes AS T1 INNER JOIN Interactions AS T2 ON T1.GeneID = T2.GeneID1 WHERE T2.Type != 'Physical' AND T1.Phenotype = 'Cell cycle defects' AND T1.Class != 'Motorproteins' AND T1.Essential = 'Non-Essential'
What is the name of tracks whose genre is Rock?
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock";
How many adults stay in the room CONRAD SELBIG checked in on Oct 23, 2010?
SELECT Adults FROM Reservations WHERE CheckIn = "2010-10-23" AND FirstName = "CONRAD" AND LastName = "SELBIG";
Okay. How many had jobs in the past?
SELECT count ( * ) FROM employees WHERE employee_id IN ( SELECT employee_id FROM job_history )
What is the smallest bronze value associated with golds over 0, silvers over 11, and totals of 36?
SELECT MIN(bronze) FROM table_name_63 WHERE gold > 0 AND total = 36 AND silver > 11
What years had a ranking of 1?
SELECT years FROM table_name_99 WHERE ranking = 1
Where are they located?
SELECT T2.Shop_Name,Location FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY COUNT ( * ) DESC LIMIT 1
Among the active businesses in Arizona, how many businesses work after 12PM?
SELECT COUNT(DISTINCT T2.business_id) FROM Business_Hours AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id INNER JOIN Business_Categories AS T3 ON T2.business_id = T3.business_id INNER JOIN Categories AS T4 ON T3.category_id = T4.category_id WHERE T2.active = 'true' AND T2.state = 'AZ' AND T1.opening_time > '12PM'
What is the position of the team player from Aik?
SELECT position FROM table_name_69 WHERE team_from = "aik"
What are the clubs with 46 matches?
SELECT clubs FROM table_name_57 WHERE matches = 46
Name the cyrillic name for lazarevo
SELECT cyrillic_name_other_names FROM table_2562572_35 WHERE settlement = "Lazarevo"
What is the Country of the Player in Place 1?
SELECT country FROM table_name_39 WHERE place = "1"
Calculate the percentage of American cars among all cars.
SELECT CAST(SUM(CASE WHEN T3.country = 'USA' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country
What is the name of the department with the most credits?
SELECT dept_name FROM course GROUP BY dept_name ORDER BY sum(credits) DESC LIMIT 1
Show the names of editors that are on at least two journal committees.
SELECT T1.Name FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID = T2.Editor_ID GROUP BY T1.Name HAVING COUNT(*) >= 2
How many weapons violation crimes have occurred in the Calumet district?
SELECT SUM(CASE WHEN T3.district_name = 'Calumet' THEN 1 ELSE 0 END) FROM IUCR AS T1 INNER JOIN Crime AS T2 ON T2.iucr_no = T1.iucr_no INNER JOIN District AS T3 ON T3.district_no = T2.district_no WHERE T1.primary_description = 'WEAPONS VIOLATION'
What department does employee 163 work under?
SELECT department_id FROM employees WHERE employee_id = 163
the episode directed by art dielhenn was what number in the series?
SELECT no_in_series FROM table_2818164_8 WHERE directed_by = "Art Dielhenn"
What away has toronto downtown dingos as the home?
SELECT away FROM table_name_71 WHERE home = "toronto downtown dingos"
how many times is the building type residential and the locale yashodham?
SELECT COUNT(sr_no) FROM table_name_22 WHERE building_type = "residential" AND locale = "yashodham"
Which Height has a Player of mike bibby?
SELECT height FROM table_name_43 WHERE player = "mike bibby"
Which character won before 2006?
SELECT character FROM table_name_44 WHERE result = "won" AND year < 2006
What is the original date of the repeat air date of 26/01/1969?
SELECT originalairdate FROM table_13403120_1 WHERE repeatairdate_s_ = "26/01/1969"
How many different types of transactions are there?
SELECT count(DISTINCT transaction_type) FROM Financial_Transactions
what is the age of George Gilchrist
SELECT age FROM journalist WHERE Name = "George Gilchrist"
Find all the distinct district names ordered by city area in descending.
SELECT DISTINCT District_name FROM district ORDER BY city_area DESC
What was the population of the area that was formerly under the authority of the Audenshaw Urban District?
SELECT population FROM table_name_65 WHERE former_local_authority = "audenshaw urban district"
What is the care plan for the patient with social security number 999-15-3685?
SELECT DISTINCT T1.DESCRIPTION FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.ssn = '999-15-3685'
What is bool's attribute name? | Do you mean the attribute names for attributes whose attribute data type is bool? | Yes please
SELECT attribute_name FROM Attribute_Definitions WHERE attribute_data_type = "Bool"
Finally, could you add the average booked count for the products?
SELECT max ( booked_count ) , min ( booked_count ) , avg ( booked_count ) FROM products_booked
What team did the suns play on April 21?
SELECT team FROM table_29997127_4 WHERE date = "April 21"
What is the average number of book pages written by Zilpha Keatley Snyder?
SELECT AVG(T3.num_pages) FROM book_author AS T1 INNER JOIN author AS T2 ON T1.author_id = T2.author_id INNER JOIN book AS T3 ON T3.book_id = T1.book_id WHERE T2.author_name = 'Zilpha Keatley Snyder'
How many schools are in Walkerton?
select count ( * ) from school where location = "Walkerton"
How many points for when the points was 53?
SELECT points_for FROM table_13564637_4 WHERE points = "53"
What is the rating of the season 10?
SELECT rating FROM table_name_12 WHERE season = "season 10"
What is the Heat of the 34 Rank swimmer with a Time of 49.49 or less?
SELECT AVG(heat) FROM table_name_97 WHERE rank = 34 AND time < 49.49
Which Points difference has Points against of 786?
SELECT points_difference FROM table_name_20 WHERE points_against = "786"
What was the maximum number of wins?
SELECT MAX(wins) FROM table_22081847_1
Name the record with result of w 13-11
SELECT record FROM table_name_51 WHERE result = "w 13-11"
What Location Attendance has a Game of 4?
SELECT location_attendance FROM table_name_9 WHERE game = "4"
Provide the publisher name of the book with ISBN 76092025986.
SELECT T2.publisher_name FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T1.isbn13 = 76092025986
Show project ids and the number of documents in each project.
SELECT project_id , count(*) FROM Documents GROUP BY project_id
Who was placed third when the ruuner up was Guangzhou Apollo?
SELECT third_place FROM table_17632217_2 WHERE runners_up = "Guangzhou Apollo"
Name the hdtv for sky famiglia and dar 16:9 for mydeejay
SELECT hdtv FROM table_15887683_10 WHERE package_option = "Sky Famiglia" AND dar = "16:9" AND television_service = "myDeejay"
What is the loan start source when the loan club is fulham?
SELECT start_source FROM table_name_42 WHERE loan_club = "fulham"
How many French customers does Gerard Hernandez take care of?
SELECT COUNT(t1.customerNumber) FROM customers AS t1 INNER JOIN employees AS t2 ON t1.salesRepEmployeeNumber = t2.employeeNumber WHERE t1.country = 'France' AND t2.firstName = 'Gerard' AND t2.lastName = 'Hernandez'
How many kinds of violations did "Stacks Restaurant" have on 2016/10/4?
SELECT COUNT(DISTINCT T1.violation_type_id) FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.name = 'Stacks Restaurant' AND T1.`date` = '2016-10-04'
What is the earliest April date with a game less than 76?
SELECT MIN(april) FROM table_name_10 WHERE game < 76
In which region were the assistant location managers born?
SELECT T2.birth_region FROM Credit AS T1 INNER JOIN Person AS T2 ON T2.person_id = T1.person_id WHERE T1.role = 'president of NBC West Coast'
What is the incident type description for the incident type with code "VIOLENCE"?
SELECT incident_type_description FROM Ref_Incident_Type WHERE incident_type_code = "VIOLENCE"
State top 3 emails of UK Sales Rep who have the highest credit limit.
SELECT T2.email FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE T2.jobTitle = 'Sales Rep' AND T1.country = 'UK' GROUP BY T1.customerName, T2.email ORDER BY SUM(T1.creditLimit) DESC LIMIT 3
Can you also add the name associated with that people id into the table?
SELECT people_id, name, weight from people order by weight desc limit 1
Find the number of users in each role.
SELECT count(*) , role_code FROM users GROUP BY role_code
What is the total 1961 number of the plandište Macedonian population with a 1981 value greater than 1027?
SELECT COUNT(1961) FROM table_name_47 WHERE macedonian_population_in_vojvodina = "plandište" AND 1981 > 1027
What is the number of employees from each city?
SELECT count(*) , city FROM employee GROUP BY city
What is the gender of the youngest user?
SELECT gender FROM gender_age WHERE age = ( SELECT MIN(age) FROM gender_age )
Out of those games, how many of them were played in Columbia Park? | Did you mean how many games were played in park "Columbia Park" in 1907 | Yes please.
SELECT count ( * ) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 1907 AND T2.park_name = 'Columbia Park'
What is the internet when the position is more than 13?
SELECT internet FROM table_name_12 WHERE position > 13
What is the average height of player who were born in 1990 and after? Compare the average height with players who were born before 1990.
SELECT AVG(IIF(birthYear < 1990, height, NULL)) - AVG(IIF(birthYear >= 1990, height, NULL)) FROM Master
What was the earliest year that had a start of Saint-Gaudens and a stage smaller than 15?
SELECT MIN(year) FROM table_name_56 WHERE start = "saint-gaudens" AND stage < 15
Tell me the the date when the first claim was made.
SELECT Date_Claim_Made FROM Claims ORDER BY Date_Claim_Made ASC LIMIT 1
Who was the opponent on June 29?
SELECT opponent FROM table_name_86 WHERE date = "june 29"
What was the record in the game where the opponent wasd the atlanta falcons?
SELECT record FROM table_name_40 WHERE opponent = "atlanta falcons"
In the 1936 summer Olympics what was the date of a match that ended with a score of 6-1?
SELECT date FROM table_name_33 WHERE competition = "1936 summer olympics" AND score = "6-1"
List all the product names with the color description "white".
SELECT t1.product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = "white"
Wonderful! Can you show me the associated structure code for each of those document names?
SELECT document_structure_code FROM documents
Whatis the number of total goals maximum?
SELECT MAX(total_goals) FROM table_10240125_2
For each distinct product name, show its average product price.
SELECT Product_Name , avg(Product_Price) FROM PRODUCTS GROUP BY Product_Name
Find the name and active to date of the customers that use email as the contact channel.
SELECT t1.customer_name , t2.active_to_date FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t2.channel_code = 'Email'
Give me all the information about hiring.
SELECT * FROM hiring
How many customers with a canceled shipment have a credit limit greater than 115,000?
SELECT COUNT(T1.customerNumber) FROM customers AS T1 INNER JOIN orders AS T2 ON T1.customerNumber = T2.customerNumber WHERE T2.status = 'Cancelled' AND T1.creditLimit > 115000
What are the visit date and details of the visitor whose detail is 'Vincent'?
SELECT T2.Visit_Date , T2.Visit_Details FROM VISITORS AS T1 JOIN VISITS AS T2 ON T1.Tourist_ID = T2.Tourist_ID WHERE T1.Tourist_Details = "Vincent"
What is the role of K Goel in the match ID 335992?
SELECT T3.Role_Desc FROM Player AS T1 INNER JOIN Player_Match AS T2 ON T2.Player_Id = T1.Player_Id INNER JOIN Rolee AS T3 ON T3.Role_Id = T2.Role_Id WHERE T2.Match_Id = 335992 AND T1.Player_Name = 'K Goel'
What is the city located in Bay Area of Santa Clara?
SELECT city FROM geographic WHERE region = 'bay area' AND county = 'santa clara county'
Who won Miss Universe Philippines when Regina Hahn was second runner-up?
SELECT miss_universe_philippines FROM table_name_86 WHERE second_runner_up = "regina hahn"
What is Jake Johnson's position?
SELECT position FROM table_name_60 WHERE players = "jake johnson"
Who are the top 3 players in terms of overall rating?
SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id ORDER BY overall_rating DESC LIMIT 3