sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What is the fewest number of 2005 subscribers for Vodafone? | SELECT MIN(subscribers__2005___thousands_) FROM table_29395291_2 WHERE provider = "Vodafone" |
Calculate the total payment amount by Diane Collins. | SELECT SUM(T2.amount) FROM customer AS T1 INNER JOIN payment AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = 'Diane' AND T1.last_name = 'Collins' |
Who was the winner when Niki Lauda held pole position? | SELECT race AS Winner FROM table_name_48 WHERE pole_position = "niki lauda" |
What is the branding of the callsign DWBA-TV? | SELECT branding FROM table_2610582_3 WHERE callsign = "DWBA-TV" |
Which opponent was played on week 9? | SELECT opponent FROM table_name_46 WHERE week = 9 |
What is the highest amount of order made by the sales representative in Boston? Please give the name of the product and amount. | SELECT T2.productName, T1.quantityOrdered * T1.priceEach FROM orderdetails AS T1 INNER JOIN products AS T2 ON T1.productCode = T2.productCode INNER JOIN orders AS T3 ON T1.orderNumber = T3.orderNumber INNER JOIN customers AS T4 ON T3.customerNumber = T4.customerNumber WHERE T4.city = 'Boston' AND T4.salesRepEmployeeNumber IN ( SELECT employeeNumber FROM employees WHERE jobTitle = 'Sales Rep' ) ORDER BY T1.quantityOrdered DESC LIMIT 1 |
what is the order date of order id 1? | SELECT Order_Date FROM Customer_Orders where Order_ID = 1 |
What day did the person who finished in 12th place leave on? | SELECT exited FROM table_name_53 WHERE finished = "12th" |
What is Nationality, when Round is 6? | SELECT nationality FROM table_name_5 WHERE round = 6 |
What is the average capacity? | SELECT avg ( capacity ) from cinema |
How many countries using the 1993 System of National Accounts methodology? | SELECT COUNT(CountryCode) FROM Country WHERE SystemOfNationalAccounts = 'Country uses the 1993 System of National Accounts methodology.' |
What are the names of all employees who can fly both the Boeing 737-800 and the Airbus A340-300? | SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = "Boeing 737-800" INTERSECT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = "Airbus A340-300" |
Give me the description of the service type that offers not only the photo product but also the film product. | SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Name = 'photo' INTERSECT SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Name = 'film' |
What is the channel with a 2011 rating of 8.5? | SELECT channel FROM table_name_64 WHERE 2011 = "8.5" |
How many students in the Air Force? | SELECT COUNT(name) FROM enlist WHERE organ = 'air_force' |
Which address type does "Fun Toys and Bikes" fall under? | SELECT T2.Name FROM BusinessEntityAddress AS T1 INNER JOIN AddressType AS T2 ON T1.AddressTypeID = T2.AddressTypeID INNER JOIN Store AS T3 ON T1.BusinessEntityID = T3.BusinessEntityID WHERE T3.Name = 'Fun Toys and Bikes' |
What is the total price of Sales Order ID 46625 with Volume Discount 11 to 14 and Product ID 716? | SELECT T2.UnitPrice * T2.OrderQty FROM SpecialOffer AS T1 INNER JOIN SalesOrderDetail AS T2 ON T1.SpecialOfferID = T2.SpecialOfferID WHERE T1.Description = 'Volume Discount 11 to 14' AND T1.SpecialOfferID = 2 AND T2.ProductID = 716 AND T2.SalesOrderID = 46625 |
What is the Director of the Filmography The Iceman Ducketh? | SELECT director FROM table_name_82 WHERE title = "the iceman ducketh" |
how many afghan in banglash is hungarian | SELECT afghan FROM table_24807774_1 WHERE bangladeshi = "Hungarian" |
Who was the opponent with a series of 1-0? | SELECT opponent FROM table_name_79 WHERE series = "1-0" |
What are the different types of video games? | SELECT DISTINCT gtype FROM Video_games |
How much does each charge type costs? List both charge type and amount. | SELECT charge_type, charge_amount FROM Charges |
What set 2 has 15:33 as the time? | SELECT set_2 FROM table_name_14 WHERE time = "15:33" |
what is the listing for 2012 when 2004 is more than 0, 2008 is more than 1 1994 is 8 and 2005 is less than 11? | SELECT MIN(2012) FROM table_name_8 WHERE 2004 > 0 AND 2008 > 1 AND 1994 = 8 AND 2005 < 11 |
What are the dates of ceremony at music festivals corresponding to volumes that lasted more than 2 weeks on top? | SELECT T1.Date_of_ceremony FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T2.Weeks_on_Top > 2 |
For each player, show the team and the location of school they belong to. | SELECT T1.Team , T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID; |
How many different outcomes did the final with Paul McNamee as a partner have? | SELECT COUNT(outcome) FROM table_2201541_3 WHERE partner = "Paul McNamee" |
What are the names and average salaries for departments with average salary higher than 42000? | SELECT dept_name , AVG (salary) FROM instructor GROUP BY dept_name HAVING AVG (salary) > 42000 |
In the district of Pennsylvania 1, what is the total number of political parties? | SELECT COUNT(party) FROM table_1805191_39 WHERE district = "Pennsylvania 1" |
how many level 5 managers does United States have? | SELECT count ( * ) FROM manager WHERE Country = 'United States' and Level = 5 |
When was the private/non-sectarian school founded? | SELECT founded FROM table_1971074_1 WHERE type = "Private/Non-sectarian" |
Give me the name for the student 1001 | Do you want the last name or first name? | first name and the last name please | SELECT lname, fname from student where stuID = "1001" |
Who made the latest order? | SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.order_date DESC LIMIT 1 |
What are the first names of the students who live in Haiti permanently or have the cell phone number 09700166582 ? | select t1.first_name from students as t1 join addresses as t2 on t1.permanent_address_id = t2.address_id where t2.country = 'haiti' or t1.cell_mobile_number = '09700166582' |
thanks..how about one last one...what is median salary across all teams? | SELECT avg ( salary ) from salary |
Which rank has the smallest number of faculty members? | SELECT rank FROM Faculty GROUP BY rank ORDER BY count(*) ASC LIMIT 1 |
What was the team #1 for the match that had a result of 0-3? | SELECT team__number1 FROM table_name_17 WHERE res = "0-3" |
What is the ISHAA class for the International School? | SELECT ihsaa_class FROM table_name_64 WHERE school = "international" |
How many products have been discountinued by New Orleans Cajun Delights? | SELECT COUNT(T1.Discontinued) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'New Orleans Cajun Delights' |
What was South Melbourne's away team score? | SELECT away_team AS score FROM table_name_7 WHERE away_team = "south melbourne" |
What is the time for 18 laps and 5 grids? | SELECT time FROM table_name_52 WHERE laps = 18 AND grid = 5 |
How many stations does Mountain View city has? | SELECT COUNT(*) FROM station WHERE city = "Mountain View" |
What home team has a tie no of 20? | SELECT home_team FROM table_name_44 WHERE tie_no = "20" |
What is the termination of mission date of the representative with a presentation of credentials date on July 4, 1898? | SELECT termination_of_mission FROM table_name_58 WHERE presentation_of_credentials = "july 4, 1898" |
Which film has a role named Taylor? | SELECT film FROM table_name_68 WHERE role = "taylor" |
How many stadiums are there? | SELECT COUNT(*) FROM stadium |
How many tracks are in the playlist "movies"? | SELECT count ( * ) FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T3.id = T2.playlist_id WHERE T3.name = "Movies" |
What is the sum of lost when against is less than 37, drawn is more than 2, and played is more than 20? | SELECT COUNT(lost) FROM table_name_93 WHERE against < 37 AND drawn > 2 AND played > 20 |
what is the minimum pick # where position is defensive tackle | SELECT MIN(pick__number) FROM table_10650711_1 WHERE position = "Defensive Tackle" |
Which Spanish voice actor does the same character as French voice actor Véronique Desmadryl? | SELECT spanish_voice_actor FROM table_name_4 WHERE french_voice_actor = "véronique desmadryl" |
Indicate the percentage of inactive customers at store no.1. | SELECT CAST(SUM(CASE WHEN active = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(customer_id) FROM customer WHERE store_id = 1 |
for country of spain and iata of ibz, what's the city? | SELECT city FROM table_name_29 WHERE country = "spain" AND iata = "ibz" |
What are the dates of the exhibitions who have an attendance of more than 100? | SELECT T1.date FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance > 100 |
Which visitors have a leading scorer of roy : 25 | SELECT visitor FROM table_11964047_7 WHERE leading_scorer = "Roy : 25" |
What is the smallest total for a nation with more than 1 silver? | SELECT MIN(total) FROM table_name_75 WHERE silver > 1 |
How many students don't have a soy allergy? | SELECT count ( * ) FROM Student WHERE StuID NOT IN ( SELECT StuID FROM Has_allergy WHERE Allergy = "Soy" ) |
Provide the names of the students enlisted in the fire department. | SELECT name FROM enlist WHERE organ = 'fire_department' |
What is the timeslor rank for the episode with larger than 2.9 rating, rating/share of 2.6/8 and rank for the night higher than 5? | SELECT AVG(rank__timeslot_) FROM table_name_2 WHERE rating > 2.9 AND rating / SHARE(18 - 49) = 2.6 / 8 AND rank__night_ > 5 |
What is number 4's title? | SELECT title FROM table_name_36 WHERE number = 4 |
What is the average number of attendees for performances? | SELECT avg(Attendance) FROM performance |
What are the ids and names of all countries that either have more than 3 car makers or produce fiat model ? | select t1.countryid , t1.countryname from countries as t1 join car_makers as t2 on t1.countryid = t2.country group by t1.countryid having count(*) > 3 union select t1.countryid , t1.countryname from countries as t1 join car_makers as t2 on t1.countryid = t2.country join model_list as t3 on t2.id = t3.maker where t3.model = 'fiat'; |
How many customers are manufacturer? | SELECT COUNT(*) FROM customer WHERE cust_type = 'manufacturer' |
what is the City of license that has a 1,400 watts Power | SELECT city_of_license FROM table_name_93 WHERE power = "1,400 watts" |
What is the s B share for Handelsbanken funds incl XACT? | SELECT s_b_share FROM table_206419_3 WHERE shareholder = "Handelsbanken funds incl XACT" |
What is the description and film title of ID 996? | SELECT description, title FROM film_text WHERE film_id = 996 |
How many times have coaches who were from CHI been awarded as NBA Coach of the Year? | SELECT COUNT(DISTINCT T2.coachID) FROM coaches AS T1 INNER JOIN awards_coaches AS T2 ON T1.coachID = T2.coachID WHERE T1.tmID = 'CHI' AND T2.award = 'NBA Coach of the Year' |
List the object sample IDs of image ID 17 with coordinates (0,0). | SELECT OBJ_SAMPLE_ID FROM IMG_OBJ WHERE IMG_ID = 17 AND X = 0 AND Y = 0 |
Count the number of rooms in Lamberton with capacity lower than 50. | SELECT count(*) FROM classroom WHERE building = 'Lamberton' AND capacity < 50 |
Which city was the host of 1936 Winter Olympic Games? | SELECT T2.city_name FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id INNER JOIN games AS T3 ON T1.games_id = T3.id WHERE T3.games_name = '1936 Winter' |
What is the Week when the winner was mary joe fernández 6–4, 7–5? | SELECT week_of FROM table_name_88 WHERE winner = "mary joe fernández 6–4, 7–5" |
Which Home has a Visitor of nashville? | SELECT home FROM table_name_44 WHERE visitor = "nashville" |
What is the product ID for the booked amount 102.76? | select product_id from products_booked where booked_amount = 102.76 |
What are the distinct names and nationalities of the architects who have ever built a mill? | SELECT DISTINCT T1.name, T1.nationality FROM architect AS T1 JOIN mill AS t2 ON T1.id = T2.architect_id |
What was the losing bonus that had 53 points? | SELECT losing_bonus FROM table_17941032_2 WHERE points = "53" |
What are the first names of all the students? | SELECT DISTINCT fname FROM student |
What is the class of Fabuleux 5 get less than 70.277 in the freestyle test? | SELECT class FROM table_name_11 WHERE event = "freestyle test" AND result < 70.277 AND horse = "fabuleux 5" |
what's the country with es mulatto being 3.5% | SELECT country FROM table_1333612_1 WHERE es_mulatto = "3.5%" |
what are the order id and customer id of the oldest order? | SELECT order_id , customer_id FROM orders ORDER BY date_order_placed LIMIT 1 |
What is the name and price of the cheapest product? | SELECT name , price FROM Products ORDER BY price ASC LIMIT 1 |
What is the air force cross when you recieve the Aerial achievement medal? | SELECT air_force_cross FROM table_2104176_1 WHERE homeland_security_distinguished_service_medal = "Aerial Achievement Medal" |
how many years has сенки been nominated? | SELECT COUNT(year__ceremony_) FROM table_14928423_1 WHERE original_title = "Сенки" |
OK, can you show me the first year and last year of parties with theme of both " Spring" and "Teqnology"? | SELECT First_year , Last_year FROM party WHERE Party_Theme = "Spring" OR Party_Theme = "Teqnology" |
How many poems did Shakespeare write? | SELECT COUNT(id) FROM works WHERE GenreType = 'Poem' |
Where can I find the movie list "Short and pretty damn sweet"? | SELECT list_url FROM lists WHERE list_title = 'Short and pretty damn sweet' |
What about the violin player who attended the least performances? | select T1.name from member as T1 join member_attendance as T2 on T1.Member_id = T2.Member_id group by T2.Member_id order by count ( * ) asc limit 1 |
List the names of journalists in ascending order of years working. | SELECT Name FROM journalist ORDER BY Years_working ASC |
How many simplified names are there for xin county? | SELECT COUNT(simplified) FROM table_2847477_2 WHERE english_name = "Xin County" |
What is the highest latitude when there are more than 0.518 square miles of water, a longitude less than -99.830606, and a population of 18? | SELECT MAX(latitude) FROM table_name_69 WHERE water__sqmi_ > 0.518 AND longitude < -99.830606 AND pop__2010_ = 18 |
Find the location and all games score of the school that has Clemson as its team name. | SELECT t2.All_Games , t1.location FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE team_name = 'Clemson' |
what is the title when the rank is less than 17 and the worldwide gross is $299,288,605? | SELECT title FROM table_name_11 WHERE rank < 17 AND worldwide_gross = "$299,288,605" |
What are all the characteristic names of product "sesame"? | SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "sesame" |
Who is the manufacturer of the zip drive? | SELECT Manufacturer FROM Products where Name = 'ZIP drive' |
Can you tell me the highest Lost that has the Pool/Round of pool 2, and the Played smaller than 6? | SELECT MAX(lost) FROM table_name_43 WHERE pool_round = "pool 2" AND played < 6 |
What is Actor, when Role is "Kate Manfredi"? | SELECT actor FROM table_name_28 WHERE role = "kate manfredi" |
How many perpetrators are there? | SELECT count(*) FROM perpetrator |
What date was the match on a clay surface against Andrea Hlaváčková? | SELECT date FROM table_name_55 WHERE surface = "clay" AND opponent = "andrea hlaváčková" |
Show all distinct location names. | SELECT DISTINCT Location_Name FROM LOCATIONS |
What are the maximum and minimum age of students with major 600? | SELECT max(Age) , min(Age) FROM STUDENT WHERE Major = 600 |
How many players are from the country of Brazil? | SELECT COUNT(position) FROM table_24565004_15 WHERE nationality² = "Brazil" |
Return the apartment number with the largest number of bedrooms. | SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.