sentence
stringlengths
3
347
sql
stringlengths
18
804
How many problems are there for product voluptatem?
SELECT count(*) FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id WHERE T1.product_name = "voluptatem"
What is the start date of the care plan of the patient whose maiden name is Adams?
SELECT DISTINCT T1.START FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.maiden = 'Adams'
What is the population of Aibonito?
SELECT Population FROM county_public_safety WHERE County_ID = ( select County_ID from city where Name = 'Aibonito' )
How many original titles did Marriage Italian-Style have?
SELECT COUNT(original_title) FROM table_10321805_1 WHERE film_title_used_in_nomination = "Marriage Italian-Style"
What are the names of all people who do not have friends?
SELECT name FROM person EXCEPT SELECT name FROM PersonFriend
For the cars with 4 cylinders, which model has the largest horsepower?
SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Cylinders = 4 ORDER BY T2.horsepower DESC LIMIT 1;
What is the highest Win #, when Winner is "Knoxville Cherokees", when Playoff Result is "Lost 1st Round ( LOU )", and when Points is less than 94?
SELECT MAX(win__number) FROM table_name_87 WHERE winner = "knoxville cherokees" AND playoff_result = "lost 1st round ( lou )" AND points < 94
Which match was the final score 7–6 (7–0) , 6–7 (5–7) , 4–6, 6–2, 6–7 (5–7)?
SELECT no FROM table_26202812_7 WHERE score_in_the_final = "7–6 (7–0) , 6–7 (5–7) , 4–6, 6–2, 6–7 (5–7)"
What were the total games in the Big Ten conference when Nebraska lost fewer than 488 games and had a Pct less than 0.7014?
SELECT SUM(total_games) FROM table_name_68 WHERE conference = "big ten" AND lost < 488 AND team = "nebraska" AND pct < 0.7014
Between 1/1/2012 to 12/31/2014, which date recorded the hottest temperature in weather station 1?
SELECT `date` FROM weather WHERE station_nbr = 1 AND CAST(SUBSTR(`date`, 1, 4) AS int) BETWEEN 2012 AND 2014 ORDER BY tmax DESC LIMIT 1
Hmmm...can you also please tell me the address id for this same property?
SELECT T1.address_id FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id where T2.monthly_rental = 1297.807
Which Quantity has a Designation of type 4?
SELECT AVG(quantity) FROM table_name_82 WHERE designation = "type 4"
how many games has kansas state and depaul played against each other
SELECT COUNT(games_played) FROM table_15740666_6 WHERE kansas_state_vs = "DePaul"
What was the place ranking for the player from Australia?
SELECT place FROM table_name_43 WHERE country = "australia"
what's the evening gown where preliminaries is 8.977
SELECT evening_gown FROM table_12094609_1 WHERE preliminaries = "8.977"
what are the start date and end of date of the booking that has booked the product named 'book collection A'?
SELECT T3.booking_start_date , T3.booking_end_date FROM Products_for_hire AS T1 JOIN products_booked AS T2 ON T1.product_id = T2.product_id JOIN bookings AS T3 ON T2.booking_id = T3.booking_id WHERE T1.product_name = 'Book collection A'
What party was Dewey Short associated with?
SELECT party FROM table_1342198_25 WHERE incumbent = "Dewey Short"
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 Date, when Opponent is At Saskatchewan Roughriders?
SELECT date FROM table_name_13 WHERE opponent = "at saskatchewan roughriders"
How many police officers are in Albonito? | Do you mean 'Aibonito' not 'Albonito'? | Yes Aibonito, my mistake
SELECT Police_officers FROM county_public_safety WHERE County_ID = ( select County_ID from city where Name = 'Aibonito' )
What is the lowest episode number?
SELECT MIN(episode__number) FROM table_2501754_4
Show minimum, maximum, and average market value for all companies.
SELECT MIN(market_value), MAX(market_value), AVG(market_value) FROM company
WHAT ARE THE DISTINCT POSITIONS OF THE PLAYERS FROM COUNTRY WHOSE CAPITAL IS DUBLIN
SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Capital = "Dublin"
What is Location, when Opponent is "Jonathan Goulet"?
SELECT location FROM table_name_12 WHERE opponent = "jonathan goulet"
Which Centennial has a Altadeña of panthers?
SELECT centennial FROM table_name_4 WHERE altadeña = "panthers"
Find the total revenue for each manufacturer.
SELECT SUM(revenue), name FROM manufacturers GROUP BY name
What is the largest attendance that has tigers as the opponent and a loss of leiter (0-1)?
SELECT MAX(attendance) FROM table_name_75 WHERE opponent = "tigers" AND loss = "leiter (0-1)"
From which country was the player whose year(s) won was 1983?
SELECT country FROM table_name_9 WHERE year_s__won = "1983"
What is the name of the project that has a scientist assigned to it whose name contains 'Smith'?
SELECT T2.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name LIKE '%Smith%'
Which Score has a Game larger than 32, and Points smaller than 42, and a December larger than 19, and a Record of 18–12–5?
SELECT score FROM table_name_28 WHERE game > 32 AND points < 42 AND december > 19 AND record = "18–12–5"
Can you left join the Assessment Notes table with the Teachers table on teacher_id?
SELECT * FROM Assessment_Notes AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id
Which Avoirdupois value is translated to grain?
SELECT avoirdupois_value FROM table_name_76 WHERE translation = "grain"
What is the Established date of the Brian Timmis Stadium?
SELECT COUNT(established) FROM table_name_57 WHERE venue = "brian timmis stadium"
Which podiums did the alfa romeo team have?
SELECT podiums FROM table_10753917_1 WHERE team = "Alfa Romeo"
What were all the away teams when the crowd was 13304?
SELECT away_team FROM table_16388478_2 WHERE crowd = 13304
what is the name of album id 3
SELECT name from tracks where album_id = 3
display the country ID and number of cities for each country.
SELECT country_id , COUNT(*) FROM locations GROUP BY country_id
What Label has a Format of cd, and a Catalog of crgd 86136?
SELECT label FROM table_name_88 WHERE format = "cd" AND catalog = "crgd 86136"
What is the maximum miles per gallon of the car with 8 cylinders or produced before 1980 ?
select max(mpg) from cars_data where cylinders = 8 or year < 1980
What are all the results where Robert Bauman is the incumbent politician?
SELECT result FROM table_1341690_20 WHERE incumbent = "Robert Bauman"
What is the Game with a Record of 19-15?
SELECT game FROM table_name_71 WHERE record = "19-15"
What is the category and typical buying price of the product with name "cumin"?
SELECT product_category_code , typical_buying_price FROM products WHERE product_name = "cumin"
Which acquisition via has a position of forward and is on the state school or club?
SELECT acquisition_via FROM table_name_79 WHERE position = "forward" AND school_club_team = "state"
What are the employee ids, full names, and job ids for employees who make more than the highest earning employee with title PU_MAN?
SELECT employee_id , first_name , last_name , job_id FROM employees WHERE salary > ( SELECT max(salary) FROM employees WHERE job_id = 'PU_MAN' )
Find the first name and age of students who have a dog but do not have a cat as a pet.
SELECT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog' AND T1.stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat')
Among the male legislators born between 1955 to 1965, what is the percentage of the legislators with an independent party?
SELECT CAST(SUM(CASE WHEN T2.party = 'Independent' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.party) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.gender_bio = 'M' AND strftime('%Y', T1.birthday_bio) BETWEEN '1955' AND '1965'
What is the program where the focus is general management?
SELECT program FROM table_12591022_2 WHERE focus = "General Management"
How many total items were requested for the Onslow Co School District urban metro school projects?
SELECT SUM(T1.item_quantity) FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.school_metro = 'urban' AND T2.school_district = 'Onslow Co School District'
How many latest released dramas and action movies?
SELECT COUNT(T1.movieid) FROM movies2directors AS T1 INNER JOIN movies AS T2 ON T1.movieid = T2.movieid WHERE T2.year = 4 AND T1.genre IN ('Action', 'drama')
What is the average high temperature for each day of week?
SELECT avg(high_temperature) , day_of_week FROM weekly_weather GROUP BY day_of_week
For how many times has the customer RUTH MARTINEZ rented a film?
SELECT COUNT(T2.rental_id) FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = 'RUTH' AND T1.last_name = 'MARTINEZ'
Which parts have more than 2 faults? Show the part name and id.
SELECT T1.part_name, T1.part_id FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_id HAVING COUNT(*) > 2
Who is the Shirt Back Sponsor if the Shorts Sponsor is Telestet?
SELECT shirt_back_sponsor FROM table_name_69 WHERE shorts_sponsor = "telestet"
Identify the players with the same height as Brian Gionta. How tall are they?
SELECT T2.PlayerName, T1.height_in_cm FROM height_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.height_id = T2.height WHERE T2.height = ( SELECT height FROM PlayerInfo WHERE PlayerName = 'Brian Gionta' )
Which overall's pick number was 14?
SELECT overall FROM table_name_65 WHERE pick__number = 14
Ok, and how many drafts are associated with Kenyon?
SELECT count ( * ) FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id where Employee_name = "Kenyon"
What are the opening hours of business number 53 on Friday?
SELECT T1.closing_time - T1.opening_time AS "opening hours" FROM Business_Hours AS T1 INNER JOIN Days AS T2 ON T1.day_id = T2.day_id WHERE T2.day_of_week LIKE 'Friday' AND T1.business_id = 53
What is Date, when H/A/N is "H", and when Score is 112-118?
SELECT date FROM table_name_77 WHERE h_a_n = "h" AND score = "112-118"
What is every current club for the player Artūrs Štālbergs?
SELECT current_club FROM table_23670057_7 WHERE player = "Artūrs Štālbergs"
What date has w 20-17 as the result, and 1-0 as the record?
SELECT date FROM table_name_32 WHERE result = "w 20-17" AND record = "1-0"
What is the categorization in 2010 when it was A in 2008 and 20011 while being QF in 2012?
SELECT 2010 FROM table_name_10 WHERE 2008 = "a" AND 2011 = "a" AND 2012 = "qf"
can you show me average of the distances?
SELECT avg ( distance ) FROM Flight
List every city in San Mateo County.
SELECT city FROM geographic WHERE county = 'san mateo county'
How many rooms whose capacity is less than 50 does the Lamberton building have?
SELECT COUNT(*) FROM classroom WHERE building = 'Lamberton' AND capacity < 50
Please list the time when event no.2 happened on a vivo device.
SELECT T1.timestamp FROM events AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.event_id = T2.device_id WHERE T2.phone_brand = 'vivo' AND T1.event_id = '2'
Which Winners club has an Event of hang tight?
SELECT winners_club FROM table_name_68 WHERE event = "hang tight"
How many podcasts are there in the category which has the most podcasts?
SELECT COUNT(podcast_id) FROM categories WHERE category = ( SELECT category FROM categories GROUP BY category ORDER BY COUNT(podcast_id) DESC LIMIT 1 )
How many caps have a Position of prop, and a Player of rui cordeiro?
SELECT COUNT(caps) FROM table_name_6 WHERE position = "prop" AND player = "rui cordeiro"
What was the lowest attendance by the game that had an away team of Vida?
SELECT MIN(attendance) FROM table_name_47 WHERE away = "vida"
Can you list me all the username of users with the most popular role?
SELECT user_name FROM users GROUP BY role_code ORDER BY count ( * ) DESC LIMIT 1
what is the school color of barker college
SELECT school_colors from school where school = "Barker College"
What is the Date of Catalog 573 194-2?
SELECT date FROM table_name_76 WHERE catalog = "573 194-2"
Thank you! That's a lot of people! Can you filter the list to show me only the active customers?
SELECT first_name FROM customer WHERE customer_id IN ( SELECT customer_id FROM rental WHERE rental_date < '2005-08-23 02:06:01' ) AND active = 1
When hittite old kingdom , minoan eruption is the ubaid period in mesopotamia what is the copper age?
SELECT copper_age FROM table_23537091_1 WHERE ubaid_period_in_mesopotamia = "Hittite Old Kingdom , Minoan eruption"
What is the average age of all gymnasts?
SELECT AVG(T2.Age) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID
Thank you. And what are the names of the players who play for those schools?
SELECT Player FROM match_season
How many employees whose performance is poor have a salary of over $50,000 per year?
SELECT COUNT(*) FROM employee WHERE performance = 'Poor' AND CAST(REPLACE(SUBSTR(salary, 4), ',', '') AS REAL) > 50000
What's the total of Sweden (SWE) having less than 1 silver?
SELECT MIN(total) FROM table_name_21 WHERE nation = "sweden (swe)" AND silver < 1
Can you tell me the sum of Pick # that has the Position of sb, and the College of minnesota?
SELECT SUM(pick__number) FROM table_name_20 WHERE position = "sb" AND college = "minnesota"
Who was the player who was pick number 147?
SELECT player FROM table_name_40 WHERE pick = 147
What is the income of female customers ages from 30 to 55 years old and has an occupation of machine-op-inspct?
SELECT T2.INCOME_K FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.SEX = 'Female' AND T1.age >= 30 AND T1.age <= 55 AND T1.OCCUPATION = 'Machine-op-inspct'
Please list the first name of the players from the NBA league with the forward position.
SELECT DISTINCT T1.firstName FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE (T1.pos = 'F' OR T1.pos = 'F-C') AND T2.lgID = 'NBA'
What was the attendance of the Hawthorn as the away team?
SELECT SUM(crowd) FROM table_name_92 WHERE away_team = "hawthorn"
How many departments do you have?
SELECT count ( * ) from department
What is the average calorie count for all recipes using coarsely ground black pepper?
SELECT AVG(T3.calories) FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T2.ingredient_id = T1.ingredient_id INNER JOIN Nutrition AS T3 ON T3.recipe_id = T2.recipe_id WHERE T1.name = 'coarsely ground black pepper'
Name the total number of production code by david richardson and todd holland
SELECT COUNT(production_code) FROM table_1876825_2 WHERE written_by = "David Richardson" AND directed_by = "Todd Holland"
In what years were the clients who demanded more problems with Certificate of deposit born?
SELECT T1.year FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Sub-product` = '(CD) Certificate of deposit' GROUP BY T1.year ORDER BY COUNT(T1.year) DESC LIMIT 1
For the item that has a Gecko of 'font', what is the KHTML value?
SELECT khtml FROM table_name_11 WHERE gecko = "font"
Which students play video games?
SELECT distinct StuID FROM Plays_games
In what place did the player with a score of 66-67=133 come in?
SELECT place FROM table_name_98 WHERE score = 66 - 67 = 133
Show the name and distance of the aircrafts with more than 5000 distance and which at least 5 people have its certificate.
SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid = T1.aid WHERE T2.distance > 5000 GROUP BY T1.aid ORDER BY COUNT(*) >= 5
What's the nationality of Livio Berruti?
SELECT nationality FROM table_name_53 WHERE athlete = "livio berruti"
How much money did reestore request ?
SELECT money_requested__£_ FROM table_name_59 WHERE company_or_product_name = "reestore"
What is the score for Fitzroy when they are the home team?
SELECT home_team AS score FROM table_name_53 WHERE home_team = "fitzroy"
What was the crowd size for the game with a score of 101-105?
SELECT crowd FROM table_name_13 WHERE score = "101-105"
What goods were sold to customers in accordance with sales order number 43660?
SELECT T1.Name FROM Product AS T1 INNER JOIN SalesOrderDetail AS T2 ON T1.ProductID = T2.ProductID WHERE T2.SalesOrderID = 43660
What is the description of the role named "Proof Reader"?
SELECT role_description FROM ROLES WHERE role_name = "Proof Reader"
Whats the number of platforms do london waterloo has ?
SELECT Number_of_Platforms FROM station where name = "London Waterloo"
List out the birth name of crews who are co-executive producer and higher than 1.60 meters.
SELECT T1.birth_name FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T2.role = 'co-executive producer' AND T1.height_meters > 1.60;
What is the name when winter is the transfer window?
SELECT name FROM table_name_47 WHERE transfer_window = "winter"