sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
In what week was the attendance 25,000? | SELECT week FROM table_name_92 WHERE attendance = "25,000" |
Which furniture has the highest price? | The id of the furniture with the highest price is 7. | What is the name of the manufacturer that sells that furniture? | SELECT t1.Name FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id ORDER BY t2.Price_in_Dollar DESC LIMIT 1 |
What is the lowest First Year, when Model is "Quattroporte (2.8)"? | SELECT MIN(first_year) FROM table_name_15 WHERE model = "quattroporte (2.8)" |
List the maximum weight and type for each type of pet. | SELECT max(weight) , petType FROM pets GROUP BY petType |
What were Sébastien Bourdais' lowest points when there were less than 63 laps? | SELECT MIN(points) FROM table_name_16 WHERE driver = "sébastien bourdais" AND laps < 63 |
Write down the title, summary, and air date of the episode that garnered 72 10-star votes. | SELECT T2.title, T2.summary, T2.air_date FROM Vote AS T1 INNER JOIN Episode AS T2 ON T2.episode_id = T1.episode_id WHERE T1.stars = 10 AND T1.votes = 72 |
Which title aired on 18 dec 2006- 10 feb 2007? | SELECT english_title__chinese_title_ FROM table_name_67 WHERE airing_date = "18 dec 2006- 10 feb 2007" |
What is the max gross weight of the Robinson R-22? | SELECT max_gross_weight FROM table_10006830_1 WHERE aircraft = "Robinson R-22" |
In which event did Fabuleux 5 get a result smaller than 70.88? | SELECT event FROM table_name_69 WHERE horse = "fabuleux 5" AND result < 70.88 |
Return the title and director of the movie released in the year 2000 or earlier that had the highest worldwide gross. | SELECT title , director FROM movie WHERE YEAR <= 2000 ORDER BY gross_worldwide DESC LIMIT 1 |
What is the lowest year with tyres in g and less than 0 points? | SELECT MIN(year) FROM table_name_32 WHERE tyres = "g" AND points < 0 |
WHAT IS THE SCORE WITH A RECORD OF 1-0? | SELECT score FROM table_name_94 WHERE record = "1-0" |
How many members gained university status in 1900? | SELECT COUNT(research_funding__) AS £, 000 AS _ FROM table_142950_1 WHERE gained_university_status = 1900 |
Provide the alias and elevation of the city with zip code 1028. | SELECT T1.alias, T2.elevation FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.zip_code = 1028 |
Name the branch with least membership amount.? | SELECT Name FROM branch ORDER BY membership_amount ASC LIMIT 1 |
What are all the songs in albums under label "Universal Music Group"? | SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE t1.label = "Universal Music Group" |
What is the average height of people from USA? | SELECT AVG(height_meters) FROM Person WHERE birth_country = 'USA'; |
What are the details of the shops that can be accessed by walk? | SELECT T1.Shop_Details FROM SHOPS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Shop_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = "walk" |
What was the record at the game against the Los Angeles Rams? | SELECT record FROM table_name_25 WHERE opponent = "los angeles rams" |
Give the district numbers with an Anti-Administration party. | SELECT district FROM `historical-terms` WHERE party = 'Anti-Administration' GROUP BY district |
What is the MSRP for the laptop with storage of 128-512 GB SSD? | SELECT msrp FROM table_name_2 WHERE storage = "128-512 gb ssd" |
What are the first names of all history professors who do not teach? | SELECT T1.emp_fname FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T3.dept_name = 'History' EXCEPT SELECT T4.emp_fname FROM employee AS T4 JOIN CLASS AS T5 ON T4.emp_num = T5.prof_num |
Which Country has a Score of 69, and a Player of mick soli? | SELECT country FROM table_name_92 WHERE score = 69 AND player = "mick soli" |
What was the status of rank 20? | SELECT status FROM table_24431348_18 WHERE rank = 20 |
What was the date of airing for episodes with ratings under 10.1 and production number of 96 5-09? | SELECT original_airing FROM table_name_74 WHERE rating < 10.1 AND episode_number_production_number = "96 5-09" |
What are the first names for students who have an "a" in their first name? | SELECT DISTINCT Fname FROM STUDENT WHERE Fname LIKE '%a%' |
What are the names of stadiums that some Australian swimmers have been to? | SELECT t4.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id JOIN event AS t3 ON t2.event_id = t3.id JOIN stadium AS t4 ON t4.id = t3.stadium_id WHERE t1.nationality = 'Australia' |
How many students are there? | SELECT count(*) FROM student |
Find the average yearly order by customer Weimei Corp for 2018, 2019 and 2020. | SELECT COUNT(T1.OrderNumber) / 3 FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID WHERE (T1.OrderDate LIKE '%/%/18' AND T2.`Customer Names` = 'Weimei Corp') OR (T1.OrderDate LIKE '%/%/19' AND T2.`Customer Names` = 'Weimei Corp') OR (T1.OrderDate LIKE '%/%/20' AND T2.`Customer Names` = 'Weimei Corp') |
What are the daily hire costs for the products with substring 'Book' in its name? | SELECT daily_hire_cost FROM Products_for_hire WHERE product_name LIKE '%Book%' |
What is the lowest pick number of John Scully? | SELECT MIN(pick__number) FROM table_name_45 WHERE name = "john scully" |
Total larger than 3, and a Rank of 4, and a Silver larger than 0 has what average gold? | SELECT AVG(gold) FROM table_name_2 WHERE total > 3 AND rank = "4" AND silver > 0 |
Name the number of against for portuguesa santista | SELECT COUNT(against) FROM table_15319684_1 WHERE team = "Portuguesa Santista" |
how many city there | SELECT count ( distinct City ) from city |
Find the name and email of the user whose name contains the word ‘Swift’. | SELECT name , email FROM user_profiles WHERE name LIKE '%Swift%' |
Which claims caused more than 2 settlements? Please list the date the claim was made and the claim id? | SELECT T1.Date_Claim_Made , T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.Claim_id HAVING count ( * ) > 2 |
What was the score when the place was t8? | SELECT score FROM table_name_96 WHERE place = "t8" |
Find the name of companies that do not make DVD drive. | SELECT name FROM manufacturers EXCEPT SELECT T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T1.name = 'DVD drive' |
Which two countries share the second highest mountain? Give the country code. | SELECT T1.Code FROM country AS T1 INNER JOIN geo_mountain AS T2 ON T1.Code = T2.Country WHERE T2.Mountain = ( SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1, 1 ) |
Name the finish with Laps more than 200 | SELECT finish FROM table_name_17 WHERE laps > 200 |
Find the zip code in which the average mean visibility is lower than 10. | SELECT zip_code FROM weather GROUP BY zip_code HAVING avg(mean_visibility_miles) < 10 |
How many points does Clark have? | SELECT points FROM table_14342592_3 WHERE player = "Clark" |
What team did the Red Sox play against on June 3? | SELECT opponent FROM table_name_16 WHERE date = "june 3" |
show me the ages of pilots in the center team position | select age from pilot where position = "Center Team" |
In which venue did the competition on 11 October 2008 take place? | SELECT venue FROM table_name_47 WHERE date = "11 october 2008" |
What are the maximum duration and resolution of songs grouped and ordered by languages? | SELECT max ( T1.duration ) , max ( T2.resolution ) , T2.languages FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.languages ORDER BY T2.languages |
what is the position of John Dorian | SELECT Position FROM Physician WHERE Name = "John Dorian" |
What final round had a weight of 245? | SELECT final_round FROM table_name_61 WHERE weight = 245 |
What is the sum of the difference for 9 draws and over 18 played? | SELECT SUM(diff) FROM table_name_48 WHERE drawn = 9 AND played > 18 |
Name the score in the final for runner-up and hard surface with opponents being michaël llodra nenad zimonjić | SELECT score_in_the_final FROM table_name_1 WHERE outcome = "runner-up" AND surface = "hard" AND opponents_in_the_final = "michaël llodra nenad zimonjić" |
Tell me the Hindu for ethnic group for white irish | SELECT hindu FROM table_name_4 WHERE ethnic_group = "white irish" |
Which nominee was nominated in the Outstanding Director of a Musical category? | SELECT nominee FROM table_name_17 WHERE category = "outstanding director of a musical" |
How much To par has a Total larger than 149, and a Country of united states, and a Year(s) won of 1997? | SELECT SUM(to_par) FROM table_name_32 WHERE total > 149 AND country = "united states" AND year_s__won = "1997" |
What is the name of the 3 employees who get paid the least? | SELECT name FROM Employee ORDER BY salary ASC LIMIT 3 |
How many different municipal mayors were there in the municipality with an area of 42.66 km2? | SELECT COUNT(municipal_mayor) FROM table_216776_2 WHERE area__km²_ = "42.66" |
Which headquarter's truck has the highest shipments in year 2016? | SELECT CASE WHEN T2.make = 'Peterbilt' THEN 'Texas (TX)' WHEN T2.make = 'Mack' THEN 'North Carolina (NC)' WHEN T2.make = 'Kenworth' THEN 'Washington (WA)' END AS "result" FROM shipment AS T1 INNER JOIN truck AS T2 ON T1.truck_id = T2.truck_id WHERE CAST(T1.ship_date AS DATE) = 2016 GROUP BY T2.make ORDER BY COUNT(T1.ship_id) DESC LIMIT 1 |
List the name of actors whose age is not 20. | SELECT Name FROM actor WHERE Age != 20 |
Who did the high rebounds in the game against Boston? | SELECT high_rebounds FROM table_27704187_7 WHERE team = "Boston" |
What daft pick number is the player coming from Regina Pats (WHL)? | SELECT pick__number FROM table_2850912_1 WHERE college_junior_club_team = "Regina Pats (WHL)" |
What are the names of wines that are more expensive then all wines made in the year 2006? | SELECT Name FROM WINE WHERE Price > (SELECT max(Price) FROM WINE WHERE YEAR = 2006) |
Find the team names of the universities whose enrollments are smaller than the average enrollment size. | SELECT t2.team_name FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE enrollment < (SELECT avg(enrollment) FROM university) |
How many Car numbers have a Driver of erik darnell, and a Pos smaller than 2? | SELECT COUNT(car__number) FROM table_name_93 WHERE driver = "erik darnell" AND pos < 2 |
Name the analysts | SELECT s_analyst FROM table_22654139_2 |
When South Melbourne was the home team, who was the away team? | SELECT away_team FROM table_name_80 WHERE home_team = "south melbourne" |
Among the players who played 72 games, how many are left-shooters? | SELECT COUNT(T2.ELITEID) FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.GP = 72 AND T2.shoots = 'L' |
who is the player when the position is p and the team is oakland athletics? | SELECT player FROM table_name_99 WHERE position = "p" AND team = "oakland athletics" |
What are the ids of the stations in San Francisco that normally have more than 10 bikes available? | SELECT id FROM station WHERE city = "San Francisco" INTERSECT SELECT station_id FROM status GROUP BY station_id HAVING avg(bikes_available) > 10 |
What is the sum of Capacity, when Team is "Denizlispor"? | SELECT SUM(capacity) FROM table_name_58 WHERE team = "denizlispor" |
List down the cities that belong to the country with a life expectancy of 66.4. | SELECT T2.Name FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T1.LifeExpectancy = 66.4 |
What is the 1994 finish for the Miami tournament? | SELECT 1994 FROM table_name_14 WHERE tournament = "miami" |
What is the total sales amount for Reflector? | SELECT SUM(T1.Price * T2.quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'Reflector' |
Who was away team at the home game of south melbourne? | SELECT away_team FROM table_name_99 WHERE home_team = "south melbourne" |
What are the names of storms that did not affect two or more regions? | SELECT name FROM storm EXCEPT 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 |
Damani Ralph is associated with which lowest pick #? | SELECT MIN(pick__number) FROM table_name_39 WHERE player = "damani ralph" |
Find the first and last name of students who are not in the largest major. | SELECT fname , lname FROM student WHERE major != (SELECT major FROM student GROUP BY major ORDER BY count(*) DESC LIMIT 1) |
Which Overall is the average one that has a Name of vance walker? | SELECT AVG(overall) FROM table_name_95 WHERE name = "vance walker" |
What is the Place of the Song by Artist Rosie Hunter with a Draw of 1 or larger? | SELECT COUNT(place) FROM table_name_10 WHERE artist = "rosie hunter" AND draw > 1 |
is γолемата вода nominated for anything? | SELECT result FROM table_14928423_1 WHERE original_title = "Γолемата Вода" |
What are the first names of the students that minor in the department with DNO 140? | SELECT T2.Fname FROM MINOR_IN AS T1 JOIN STUDENT AS T2 ON T1.StuID = T2.StuID WHERE T1.DNO = 140 |
Which movies have 'Deleted Scenes' as a substring in the special feature? | SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%' |
find the full name of employees who report to Nancy Edwards? | SELECT T2.first_name , T2.last_name FROM employees AS T1 JOIN employees AS T2 ON T1.id = T2.reports_to WHERE T1.first_name = "Nancy" AND T1.last_name = "Edwards"; |
Find the name and age of the person who is a friend of Dan or Alice. | SELECT DISTINCT T1.name, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Dan' OR T2.friend = 'Alice' |
What are the different grant amounts for documents sent before '1986-08-26 20:49:27' and after the grant ended on '1989-03-16 18:27:16'? | SELECT T1.grant_amount FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id WHERE T2.sent_date < '1986-08-26 20:49:27' INTERSECT SELECT grant_amount FROM grants WHERE grant_end_date > '1989-03-16 18:27:16' |
How many flights of Alaska Airlines were delayed on 2018/8/2? | SELECT COUNT(*) FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code WHERE T1.FL_DATE = '2018/8/2' AND T2.Description = 'Alaska Airlines Inc.: AS' AND T1.DEP_DELAY > 0 |
What is the highest total when there is less than 1 championship? | SELECT MAX(total) FROM table_name_80 WHERE championship < 1 |
Which Player has a Round smaller than 4, and a College/junior/club team (league) of usa u-18? | SELECT player FROM table_name_48 WHERE round < 4 AND college_junior_club_team__league_ = "usa u-18" |
Count the number of customers that have an email containing "gmail.com". | SELECT COUNT(*) FROM CUSTOMER WHERE Email LIKE "%gmail.com%" |
What was the dose of that medication? | SELECT dose FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.Brand = "X" |
Which rank has a Total GDP (€ bn) of €11.243?? | SELECT rank FROM table_name_98 WHERE total_gdp__€_bn__ = "€11.243" |
What is the distance/duration on sept 5 of le grand prix de trois-rivières? | SELECT distance_duration FROM table_name_3 WHERE date = "sept 5" AND race_title = "le grand prix de trois-rivières" |
Name the gender for elsthorpe school | SELECT gender FROM table_name_63 WHERE name = "elsthorpe school" |
Which format is in St. George with a frequency of 0 107.3 fm? | SELECT format FROM table_name_31 WHERE city_of_license = "st. george" AND frequency = "0 107.3 fm" |
Give the genre and popularity of movies whose revenue is at least 120,000,000 between 2012 and 2015. | SELECT T3.genre_name, T1.popularity FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T2.genre_id = T3.genre_id WHERE T1.revenue > 120000000 AND T1.release_date BETWEEN '2012-01-01' AND '2015-12-31' |
Name the round for southampton opponents | SELECT round FROM table_name_43 WHERE opponents = "southampton" |
What is the Score for the game with a record of 38-18? | SELECT score FROM table_name_84 WHERE record = "38-18" |
What are the names of the dorm that does not have a TV Lounge? | SELECT dorm_name FROM dorm EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' |
What are the names of all colleges with a larger enrollment than the largest college in Florida? | SELECT cName FROM college WHERE enr > (SELECT max(enr) FROM college WHERE state = 'FL') |
Which Bronze has a Silver of 15, and a Total smaller than 54? | SELECT MIN(bronze) FROM table_name_23 WHERE silver = 15 AND total < 54 |
I want the trailers for motors of 145 | SELECT trailers FROM table_name_92 WHERE motors = "145" |
What was the TV time for the road game against Phoenix where the score was 98-99? | SELECT tv_time FROM table_name_30 WHERE home_team = "phoenix" AND result = "98-99" |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.