sentence
stringlengths
3
347
sql
stringlengths
18
804
What catalogs were done on these dates?
select catalog_name from Catalogs where date_of_latest_revision in ( SELECT date_of_latest_revision FROM Catalogs GROUP BY date_of_latest_revision HAVING count ( * ) > 1 )
What is the fewest number of points scored by Goulds' Garage (Bristol), engines of Maserati Straight-6, in years before 1956?
SELECT MIN(points) FROM table_name_41 WHERE entrant = "goulds' garage (bristol)" AND engine = "maserati straight-6" AND year < 1956
What was the score of the game when Blackpool was away?
SELECT score FROM table_name_77 WHERE away_team = "blackpool"
Which employees were hired after September 7th, 1987?
SELECT * FROM employees WHERE hire_date > '1987-09-07'
If the team is Worcestershire and the Matched had were 5, what is the highest score?
SELECT highest_score FROM table_27268238_4 WHERE matches = 5 AND team = "Worcestershire"
When el cibao is the geographical region and the height is 1.80 who is the contestant?
SELECT contestant FROM table_18618707_1 WHERE height = "1.80" AND geographical_regions = "El Cibao"
What is the score of the game on January 12?
SELECT score FROM table_name_46 WHERE date = "january 12"
What is the name of the artist who joined latest?
SELECT name FROM artist ORDER BY year_join DESC LIMIT 1
What is the total number of Against, when Date is "16/03/1996"?
SELECT COUNT(against) FROM table_name_88 WHERE date = "16/03/1996"
On which date was the Dodge Dealers Grand Prix GTS class race?
SELECT date FROM table_name_46 WHERE race = "dodge dealers grand prix" AND class = "gts"
What is Position, when Caps is Example, and When Player is Shane Kelly?
SELECT position FROM table_name_66 WHERE caps = "example" AND player = "shane kelly"
WHAT ARE THE MANAGER'S FIRST NAME LAST NAME AND ID WHO WON THE MOST MANAGER AWARD
SELECT T1.name_first , T1.name_last , T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY count ( * ) DESC LIMIT 1
If the equation is 1 × 9² + 4 × 9 + 0, what is the 2nd throw?
SELECT 2 AS nd_throw FROM table_17265535_7 WHERE equation = "1 × 9² + 4 × 9 + 0"
What was the result of the game that took place on april 26, 2003?
SELECT result FROM table_name_83 WHERE date = "april 26, 2003"
How many points for did the club that had 77 tries for have ?
SELECT points_for FROM table_name_43 WHERE tries_for = "77"
What is the sum of Avg/G for Dan Dierking when the Loss is 0 and the Gain is more than 34?
SELECT SUM(avg_g) FROM table_name_95 WHERE loss = 0 AND name = "dan dierking" AND gain > 34
What is the oldest age of male clients?
SELECT MAX(age) FROM client WHERE sex = 'Male'
Whate place has 18 points with lost less than 8?
SELECT COUNT(place) FROM table_name_12 WHERE points = 18 AND lost < 8
How many games did BMG Interactive Entertainment release in 2012?
SELECT COUNT(DISTINCT T2.game_id) FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id INNER JOIN game_platform AS T3 ON T2.id = T3.game_publisher_id WHERE T3.release_year = 2012
For the gte northwest classic with the score of 207 (-9), what is the average 1st prize ($)
SELECT AVG(1 AS st_prize__) AS $__ FROM table_name_71 WHERE score = "207 (-9)" AND tournament = "gte northwest classic"
Show me the numbers of all trains that go to Chennai
SELECT count ( * ) FROM train WHERE destination = 'Chennai'
Who was the Opponent at the Game Site Indianapolis Hoosierdome?
SELECT opponent FROM table_name_21 WHERE game_site = "indianapolis hoosierdome"
What is the average revenue made by Latin movies?
SELECT AVG(T1.revenue) FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id INNER JOIN language AS T3 ON T2.language_id = T3.language_id WHERE T3.language_name = 'Latin'
What are the names of artists who have not released any albums?
SELECT Name FROM ARTIST EXCEPT SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId
Who was the Home team at the Western Oval location?
SELECT home_team FROM table_name_62 WHERE venue = "western oval"
show the location name and code with the least documents.
SELECT T2.location_name , T1.location_code FROM Document_locations AS T1 JOIN Ref_locations AS T2 ON T1.location_code = T2.location_code GROUP BY T1.location_code ORDER BY count ( * ) ASC LIMIT 1
Leeds City Council is the local authority for what type of location?
SELECT type FROM table_2273738_1 WHERE local_authority = "Leeds city Council"
Where is the coordinate (41.66236555, -87.63470194) located? Give the name of the district.
SELECT T2.district_name FROM Crime AS T1 INNER JOIN District AS T2 ON T1.district_no = T2.district_no WHERE T1.longitude = '-87.63470194' AND T1.latitude = '41.66236555'
what are the dorm ids?
SELECT dormid FROM dorm WHERE student_capacity > 300
What are the names of all cartoons directed by Ben Jones?
SELECT Title FROM Cartoon WHERE Directed_by = "Ben Jones";
Which Coach has a Most Improved of rory thompson?
SELECT coach FROM table_name_75 WHERE most_improved = "rory thompson"
What is the Player with a Pick that is 6?
SELECT player FROM table_name_15 WHERE pick = 6
What was the least amount of wins?
SELECT MIN(wins) FROM table_24937583_1
Claim number 801 had 4 settlements, what was the largest one? | Do you mean largest in terms of the amount claimed or amount settled? | Yes, both.
SELECT T2.settlement_id,T2.amount_claimed,T2.amount_settled FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id where T1.claim_id = 801
What is the average price for the order line?
SELECT AVG(price) FROM order_line
What are the names of customers with accounts, and how many checking accounts do each of them have?
SELECT count(*) , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid GROUP BY T1.name
What is the highest draw number when there are more than 31 points, a rank greater than 6, and the English translation is listen to me?
SELECT MAX(draw) FROM table_name_83 WHERE points > 31 AND place > 6 AND english_translation = "listen to me"
What explosion had an altitude of 539 km?
SELECT explosion FROM table_148578_1 WHERE altitude__km_ = "539"
Who was home on November 26?
SELECT home FROM table_name_73 WHERE date = "november 26"
How many times is the nation china and bronze more than 0?
SELECT COUNT(rank) FROM table_name_4 WHERE nation = "china" AND bronze > 0
What are the enrollment and primary conference for the university which was founded the earliest?
SELECT enrollment , primary_conference FROM university ORDER BY founded LIMIT 1
How many picks are there with an affiliation is the University of California Norcal Lamorinda United?
SELECT COUNT(pick__number) FROM table_25518547_2 WHERE affiliation = "University of California NorCal Lamorinda United"
Which address has both members younger than 30 and members older than 40?
SELECT address FROM member WHERE age < 30 INTERSECT SELECT address FROM member WHERE age > 40
What's the downstream rate for the Itu g.992.2 having a version of ADSL?
SELECT downstream_rate FROM table_name_2 WHERE version = "adsl" AND standard_name = "itu g.992.2"
List the products whereby the standard cost is $80 more than previous standard cost in history.
SELECT T1.Name FROM Product AS T1 INNER JOIN ProductCostHistory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.StandardCost - T2.StandardCost > 80 GROUP BY T1.Name
What is the 1989 result of the tournament in which Katerina finished nh in 1986?
SELECT 1989 FROM table_name_94 WHERE 1986 = "nh"
How much did the away team b3 score on August 12, 2014?
SELECT score FROM table_name_17 WHERE away_team = "b3" AND date = "august 12, 2014"
What Score has an Opponent of @ Blue Jays with a Date of June 7?
SELECT score FROM table_name_16 WHERE opponent = "@ blue jays" AND date = "june 7"
What is Lost, when Points For is "205"?
SELECT lost FROM table_name_16 WHERE points_for = "205"
What race did eugenio silvani win?
SELECT name FROM table_name_7 WHERE winning_driver = "eugenio silvani"
What is the type for the Cathay Pacific Holidays company, an incorporation of Hong Kong and listed activities as Travel Agency?
SELECT type FROM table_name_42 WHERE incorporated_in = "hong kong" AND principal_activities = "travel agency" AND company = "cathay pacific holidays"
Which country was the source of Pjandsh River? Give the full name of the country.
SELECT T1.Name FROM country AS T1 INNER JOIN located AS T2 ON T1.Code = T2.Country WHERE T2.River = 'Pjandsh'
who were the candidates for district ohio 6?
SELECT candidates FROM table_1341598_36 WHERE district = "Ohio 6"
Who is the rider with 22 laps and a +19.435 time/retired?
SELECT rider FROM table_name_86 WHERE laps = "22" AND time_retired = "+19.435"
How many rebounds does Fedor likholitov have with a rank greater than 8?
SELECT SUM(rebounds) FROM table_name_21 WHERE name = "fedor likholitov" AND rank > 8
Find the names of patients who are not using the medication of Procrastin-X.
SELECT name FROM patient EXCEPT SELECT T1.name FROM patient AS T1 JOIN Prescribes AS T2 ON T2.Patient = T1.SSN JOIN Medication AS T3 ON T2.Medication = T3.Code WHERE T3.name = 'Procrastin-X'
Tell me the name for first elected more than 1988 and district of mason
SELECT name FROM table_name_4 WHERE first_elected > 1988 AND district = "mason"
What is the total number of points combined from the teams that played over 14 games?
SELECT COUNT(points) FROM table_name_52 WHERE played > 14
Name the outgoing manager for mutual consent and position 16th
SELECT outgoing_manager FROM table_27225944_3 WHERE manner_of_departure = "Mutual consent" AND position_in_table = "16th"
Name the lowest 2008 for guizhou when 2005 is less than 31
SELECT MIN(2008) FROM table_name_45 WHERE year = "guizhou" AND 2005 < 31
For the film made in 1964: (37th), what was the result?
SELECT result FROM table_name_11 WHERE year = "1964: (37th)"
How much is his salary?
SELECT salary FROM instructor where dept_name = "Statistics" order by salary desc limit 1
How many followers does the list created by the user whose user_avatar_image_url is https://assets.mubicdn.net/images/avatars/74983/images-w150.jpg?1523895214 have?
SELECT SUM(T2.list_followers) FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T1.user_avatar_image_url = 'https://assets.mubicdn.net/images/avatars/74983/images-w150.jpg?1523895214'
Show the names of phones and the districts of markets they are on, in ascending order of the ranking of the market.
SELECT T3.Name , T2.District FROM phone_market AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID JOIN phone AS T3 ON T1.Phone_ID = T3.Phone_ID ORDER BY T2.Ranking
What is Swimmer, when Year is less than 2011, and when Time is "53.06"?
SELECT swimmer FROM table_name_64 WHERE year < 2011 AND time = "53.06"
I want to know the highest rank with placings more than 123 and points greater than 88.06
SELECT MAX(rank) FROM table_name_75 WHERE placings > 123 AND points > 88.06
Count the number of dogs that went through a treatment.
SELECT count(DISTINCT dog_id) FROM Treatments
How many regions have a capital of matanzas and a 2005 population under 670427?
SELECT COUNT(area__km²_) FROM table_name_85 WHERE capital = "matanzas" AND population__2005_ < 670427
When carlton was the home team what was the lowest crowd turnout?
SELECT MIN(crowd) FROM table_name_72 WHERE home_team = "carlton"
Hi - can you please tell me the average room count of all Provisional bookings?
SELECT avg ( room_count ) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = "Provisional"
Which Date has a Game site of shea stadium, and a Week of 5?
SELECT date FROM table_name_18 WHERE game_site = "shea stadium" AND week = 5
What are the names of the five cities with the greatest proportion of white people?
SELECT Name FROM city ORDER BY White DESC LIMIT 5
how many bosnian in cook islands is sri lankan
SELECT bosnian FROM table_24807774_1 WHERE cook_islands = "Sri Lankan"
What is the Category of the Rodez, France Tournament?
SELECT category FROM table_name_69 WHERE tournament = "rodez, france"
What event has european championships as the tournament, with 2006 as the year?
SELECT event FROM table_name_61 WHERE tournament = "european championships" AND year = 2006
On what dates was the final score of the game L 14–24?
SELECT date FROM table_25380472_2 WHERE final_score = "L 14–24"
Name the head of household that has married filing separately of $104,426–$186,475
SELECT head_of_household FROM table_name_89 WHERE married_filing_separately = "$104,426–$186,475"
Which attraction type does the most tourist attractions belong to? Tell me its attraction type description and code.
SELECT T1.Attraction_Type_Description , T2.Attraction_Type_Code FROM Ref_Attraction_Types AS T1 JOIN Tourist_Attractions AS T2 ON T1.Attraction_Type_Code = T2.Attraction_Type_Code GROUP BY T2.Attraction_Type_Code ORDER BY COUNT(*) DESC LIMIT 1
List down the customers that purchased the product named Xerox 23 in the South region.
SELECT DISTINCT T2.`Customer Name` FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T1.Region = 'South' AND T3.`Product Name` = 'Xerox 23'
OK,List out the all player id and college name
SELECT T1.cName, T3.pID FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName JOIN player AS T3 ON T2.pID = T3.pID
How many models do not have the wifi function?
SELECT count(*) FROM chip_model WHERE wifi = 'No'
How many cities have a population under 5000000?
SELECT count ( city ) FROM city WHERE regional_population < 5000000
What region has the label of alfa records and the date of January 23, 1987?
SELECT region FROM table_name_46 WHERE label = "alfa records" AND date = "january 23, 1987"
Calculate the percentage of sold blades in the total number of transactions.
SELECT CAST(SUM(IIF(T1.Name = 'Blade', T2.Quantity, 0)) AS REAL) * 100 / SUM(T2.Quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID
How many overs did Oliver Hannon-Dalby have?
SELECT overs FROM table_15893020_2 WHERE player = "Oliver Hannon-Dalby"
What are the names of all playlists that have more than 100 tracks?
SELECT T2.name FROM playlist_tracks AS T1 JOIN playlists AS T2 ON T2.id = T1.playlist_id GROUP BY T1.playlist_id HAVING count(T1.track_id) > 100;
What was the average pick with Ed O'Bannon and a round smaller than 1?
SELECT AVG(pick) FROM table_name_74 WHERE player = "ed o'bannon" AND round < 1
What is the number of clubs before 2003 with a 4th place winner of Shenzhen Jianlibao?
SELECT AVG(number_of_clubs) FROM table_name_66 WHERE fourth_placed = "shenzhen jianlibao" AND season < 2003
Jack Nicklaus finished in what place?
SELECT finish FROM table_name_18 WHERE player = "jack nicklaus"
How many mountains are there in Indonesia?
SELECT COUNT(DISTINCT T2.Mountain) FROM country AS T1 INNER JOIN geo_mountain AS T2 ON T1.Code = T2.Country WHERE T1.Name = 'Indonesia'
Where did the teams play on October 16, 1977?
SELECT game_site FROM table_13259034_2 WHERE date = "October 16, 1977"
WHAT IS THE RIDER WITH A 21 GRID?
SELECT rider FROM table_name_5 WHERE grid = "21"
How many cities are there in the country with the surface area of 652090?
SELECT T2.Name, COUNT(T1.Name) FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.SurfaceArea = 652090 GROUP BY T2.Name
What is the interaction type of the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'?
SELECT T1.interaction_type FROM medicine_enzyme_interaction AS T1 JOIN medicine AS T2 ON T1.medicine_id = T2.id JOIN enzyme AS T3 ON T1.enzyme_id = T3.id WHERE T3.name = 'ALA synthase' AND T2.name = 'Aripiprazole'
Find all years that have a movie that received a rating of 4 or 5, and sort them in increasing order of year.
SELECT DISTINCT YEAR FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars >= 4 ORDER BY T1.year
Excellent! Can you filter this list to include only the rows that contain the most common (most frequently occurring) year of creation?
select Department_ID, Name, Creation from department where creation = ( SELECT creation FROM department GROUP BY creation ORDER BY count ( * ) DESC LIMIT 1 )
What is the total number of tiers for the postseason of semifinalist?
SELECT SUM(tier) FROM table_name_45 WHERE postseason = "semifinalist"
What heat and what lane is thi hue pham in?
SELECT heat_ & _lane FROM table_name_25 WHERE name = "thi hue pham"
How many values of hosted have a highest value of 42659?
SELECT COUNT(hosted) FROM table_2472711_32 WHERE highest = 42659
From which hometowns did both people older than 23 and younger than 20 come from?
SELECT Hometown FROM people WHERE Age > 23 INTERSECT SELECT Hometown FROM people WHERE Age < 20