sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What are the names of students who took a course in the Fall of 2003? | SELECT name FROM student WHERE id IN (SELECT id FROM takes WHERE semester = 'Fall' AND YEAR = 2003) |
List the author's name of the books published by Abrams. | SELECT T3.author_name FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id INNER JOIN publisher AS T4 ON T4.publisher_id = T1.publisher_id WHERE T4.publisher_name = 'Abrams' |
What is the name of the place that has a census ranking of 1,229 of 5,008? | SELECT official_name FROM table_name_63 WHERE census_ranking = "1,229 of 5,008" |
State the shipping company of order id 10260. | SELECT T2.CompanyName FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.OrderID = 10260 |
Tell me the name that has 17 floors | SELECT name FROM table_name_25 WHERE floors = 17 |
What is the quantity preserved when 4 were made of class F-21? | SELECT quantity_preserved FROM table_name_76 WHERE quantity_made = "4" AND class = "f-21" |
What location of school name Bremen? | SELECT location FROM school where School_name = "Bremen" |
What is the locale of the language of the page titled "Anys 90"? | SELECT T1.locale FROM langs AS T1 INNER JOIN pages AS T2 ON T1.lid = T2.lid WHERE T2.title = 'Anys 90' |
Name the sscore for world cup qualifying october 15, 2008 | SELECT score FROM table_name_49 WHERE competition = "world cup qualifying" AND date = "october 15, 2008" |
What is the lowest Rank of Denmark County with a Total smaller than 1? | SELECT MIN(rank) FROM table_name_2 WHERE country = "denmark" AND total < 1 |
What are their ages? | SELECT T1.age FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid NOT IN ( SELECT T3.dormid FROM has_amenity AS T3 JOIN dorm_amenity AS T4 ON T3.amenid = T4.amenid WHERE T4.amenity_name = 'TV Lounge' ) |
Which state has the most customers? | SELECT state FROM customers GROUP BY state ORDER BY COUNT(*) LIMIT 1 |
What is the second word in the pair of words number 1 and 8968? | SELECT word FROM words WHERE wid = 8968 |
Which publisher published Barry Eisler's book? | SELECT T4.publisher_name FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id INNER JOIN publisher AS T4 ON T4.publisher_id = T1.publisher_id WHERE T3.author_name = 'Barry Eisler' |
Who's the actor for the Archers having a character of Martha Woodford? | SELECT actor FROM table_name_14 WHERE soap_opera = "the archers" AND character = "martha woodford" |
What is the resolution of the network Canal de las Estrellas? | SELECT resolution FROM table_name_96 WHERE network = "canal de las estrellas" |
Find courses that ran in Fall 2009 or in Spring 2010. | SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 UNION SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010 |
Name the left day 9 finish for eliminated | SELECT eliminated FROM table_25920798_2 WHERE finish = "Left Day 9" |
What round is player phil graham in? | SELECT round FROM table_name_8 WHERE player = "phil graham" |
Among the active businesses located at Mesa, AZ, list the category and attributes of business with a low review count. | SELECT T3.category_name FROM Business AS T1 INNER JOIN Business_Categories AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T2.category_id = T3.category_id WHERE T1.review_count = 'Low' AND T1.city = 'Mesa' AND T1.active = 'true' AND T1.state = 'AZ' |
what is the race when the jockey is frankie dettori, the margin is more than 3 and the course is yarmouth? | SELECT race FROM table_name_48 WHERE jockey = "frankie dettori" AND margin > 3 AND course = "yarmouth" |
And where are they located? | SELECT T2.state FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "Red" AND T2.price > 50 |
How many of the users hold neutral attitude on "10 Best Foods for You" app and what category is this app? | SELECT COUNT(T2.App), T1.Category FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = '10 Best Foods for You' AND T2.Sentiment = 'Neutral' |
List the vehicle flight number, date and pilot of all the flights, ordered by altitude. | SELECT vehicle_flight_number , date , pilot FROM flight ORDER BY altitude ASC |
What is the average laps that had a time/retired of +5 laps? | SELECT AVG(laps) FROM table_name_27 WHERE time_retired = "+5 laps" |
How many customers are there? | SELECT count(*) FROM customers |
Which type of transaction was it for the "LL Road Handlebars" order happened in 2012/11/3? | SELECT T1.TransactionType FROM TransactionHistoryArchive AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Name = 'LL Road Handlebars' AND STRFTIME('%Y-%m-%d',T1.TransactionDate) = '2012-11-03' |
Which method had Travis Fulton as an opponent? | SELECT method FROM table_name_68 WHERE opponent = "travis fulton" |
What is the average Entre Ríos Municipality with less than 9 Pojo Municipalities? | SELECT AVG(entre_ríos_municipality) FROM table_name_99 WHERE pojo_municipality < 9 |
List all active vendors who offer a purchasing web service. | SELECT Name FROM Vendor WHERE ActiveFlag = 1 |
For episode number 2-03, what are the names of the cast? | SELECT cast FROM table_2570269_2 WHERE episode__number = "2-03" |
What is the max pressure of the .38 long colt cartridge? | SELECT max_pressure FROM table_173103_1 WHERE cartridge = ".38 Long Colt" |
What is the full address of the customer who commented that DHL be used for the order that was shipped on April 4, 2005? | SELECT T1.addressLine1, T1.addressLine2 FROM customers AS T1 INNER JOIN orders AS T2 ON T1.customerNumber = T2.customerNumber WHERE T2.shippedDate = '2005-04-04' AND T2.status = 'Shipped' |
How many credit cards does customer Blanche Huels have? | SELECT count(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Blanche" AND T2.customer_last_name = "Huels" AND T1.card_type_code = "Credit" |
Of all the All-star players who played in the Eastern Conference for no more than 5 minutes, how many went to Illinois College? | SELECT COUNT(DISTINCT T1.playerID) FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID WHERE T2.conference = 'East' AND T2.minutes <= 5 AND T1.college = 'Illinois' |
What is the highest top-25 with more than 9 top-10 but less than 29 events? | SELECT MAX(top_25) FROM table_name_17 WHERE top_10 > 9 AND events < 29 |
What are the three colleges from which the most players are from? | SELECT College FROM match_season GROUP BY College ORDER BY count(*) DESC LIMIT 3 |
Who is every high rebound when the team is Mount St. Mary's? | SELECT high_rebounds FROM table_29846807_4 WHERE team = "Mount St. Mary's" |
How many different positions of players are there? | SELECT count(DISTINCT POSITION) FROM player |
Which three sales regions have generated the most revenue thus far? | SELECT TerritoryID FROM SalesTerritory ORDER BY SalesYTD DESC LIMIT 3 |
How many enrollement does Dakota State University have | SELECT Enrollment FROM institution WHERE Institution = "Dakota State University" |
How many documents have the status code done? | SELECT count(*) FROM Documents WHERE document_status_code = "done"; |
For each director who directed more than one movie, what are the titles and dates of release for all those movies? | SELECT T1.title , T1.year FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title != T2.title |
Indicate the height of all players from team Oshawa Generals in inches. | SELECT T3.height_in_inch FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID INNER JOIN height_info AS T3 ON T1.height = T3.height_id WHERE T2.TEAM = 'Oshawa Generals' |
What are the titles and ids for albums containing tracks with unit price greater than 1? | SELECT T1.Title , T2.AlbumID FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId WHERE T2.UnitPrice > 1 GROUP BY T2.AlbumID |
How many counties are there? | SELECT count ( * ) FROM county_public_safety |
Please show the results of music festivals and the number of music festivals that have had each, ordered by this count. | SELECT RESULT , COUNT(*) FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC |
which is the former pageant in the country where the new pageant is miss bahamas? | SELECT former_pageant FROM table_14308895_2 WHERE new_pageant = "Miss Bahamas" |
What was the attendance of the Indiana game? | SELECT location_attendance FROM table_17080868_7 WHERE team = "Indiana" |
What is the general classification when the team classification is japan? | SELECT general_classification FROM table_name_18 WHERE team_classification = "japan" |
How many respondents younger than 25 years old did participate in the survey in 2016? | SELECT COUNT(DISTINCT T1.UserID) FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T1.QuestionID = 1 AND T1.SurveyID = 2016 AND T1.AnswerText <= 25 |
How many flights from American Airlines were cancelled due to a type A cancellation code? | SELECT COUNT(*) FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code WHERE T1.CANCELLATION_CODE = 'A' AND T2.Description = 'American Airlines Inc.: AA' AND T1.CANCELLED = 1 |
Who was the 1999-2002 Years for Grizzlies small forward Player who was from the United States? | SELECT player FROM table_name_71 WHERE nationality = "united states" AND position = "small forward" AND years_for_grizzlies = "1999-2002" |
Return the name and job title of the staff with the latest date assigned. | SELECT T1.staff_name , T2.job_title_code FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY T2.date_assigned_to DESC LIMIT 1 |
WHAT IS THE RESULT WHEN THE OPPONENT WAS CHICAGO BEARS? | SELECT result FROM table_name_18 WHERE opponent = "chicago bears" |
Who won with the song kemenangan cinta? | SELECT winner FROM table_name_1 WHERE winning_song = "kemenangan cinta" |
Show all locations which don't have a train station with at least 15 platforms. | SELECT LOCATION FROM station EXCEPT SELECT LOCATION FROM station WHERE number_of_platforms >= 15 |
In the year (ceremony) 1998 (71st), what are all the main languages? | SELECT main_language_s_ FROM table_26385848_1 WHERE year__ceremony_ = "1998 (71st)" |
Who is the Player for School/Club Team Illinois? | SELECT player FROM table_name_22 WHERE school_club_team = "illinois" |
Find Alice's friends of friends. | SELECT DISTINCT T4.name FROM PersonFriend AS T1 JOIN Person AS T2 ON T1.name = T2.name JOIN PersonFriend AS T3 ON T1.friend = T3.name JOIN PersonFriend AS T4 ON T3.friend = T4.name WHERE T2.name = 'Alice' AND T4.name <> 'Alice' |
Which opponent has 36102 is the attendance? | SELECT opponent FROM table_23466021_4 WHERE attendance = 36102 |
List the names of entrepreneurs and their companies in descending order of money requested? | SELECT T2.Name , T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested |
How many total are there when actor/actress is pam ferris? | SELECT total FROM table_25831483_1 WHERE actor_actress = "Pam Ferris" |
Which Conference Semifinals has a Conference Finals of † denotes division championship? | SELECT conference_semifinals FROM table_name_57 WHERE conference_finals = "† denotes division championship" |
What Version has a Remixed by Perky Park with a Length of 6:38? | SELECT version FROM table_name_29 WHERE remixed_by = "perky park" AND length = "6:38" |
Please list the movies rated by the user who created the movie list "250 Favourite Films". | SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id INNER JOIN lists AS T3 ON T3.user_id = T1.user_id WHERE T3.list_title = '250 Favourite Films' |
Provide the ward number with the highest population. | SELECT ward_no FROM Ward ORDER BY Population DESC LIMIT 1 |
when points for is 39 what is the total number of drawn | SELECT drawn FROM table_20396710_1 WHERE points_for = "39" |
What are the staff ids and genders of all staffs whose job title is Department Manager? | SELECT T1.staff_id, T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = "Department Manager" |
What is the Year of Kodansha Novels' Tokyo Nightmare? | SELECT year FROM table_name_80 WHERE first_publisher = "kodansha novels" AND english_title = "tokyo nightmare" |
What are the lowest points when poles were 0 and races were 10? | SELECT MIN(points) FROM table_24405773_1 WHERE poles = 0 AND races = 10 |
What is Alexander Wronski's Position? | SELECT position FROM table_name_31 WHERE name = "alexander wronski" |
What was the production company for the film directed by Daniel Cormack? | SELECT production_company FROM table_name_54 WHERE director_s_ = "daniel cormack" |
What is the name of the item with the lowest average rating? | SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id ORDER BY avg ( T2.rating ) LIMIT 1 |
What date was the episode originally aired that was directed by James Widdoes and the production code is 320? | SELECT original_air_date FROM table_2221374_3 WHERE directed_by = "James Widdoes" AND production_code = 320 |
What is the average song duration for the songs that are in mp3 format and whose resolution below 800? | SELECT avg(T1.duration) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = "mp3" AND T2.resolution < 800 |
What is the lowest number of Not Outs when there were more than 25 innings? | SELECT MIN(not_outs) FROM table_name_76 WHERE innings > 25 |
What is the power in KW that has a station type of relay and a callsign of DXCL-TV? | SELECT power_kw FROM table_24673888_1 WHERE station_type = "Relay" AND callsign = "DXCL-TV" |
College of villanova has what round? | SELECT round FROM table_name_65 WHERE college = "villanova" |
Provide the population of the city of the 'World Tourism Organization' headquarter. | SELECT T2.Population FROM organization AS T1 INNER JOIN city AS T2 ON T1.City = T2.Name WHERE T1.Name = 'World Tourism Organization' |
Which Rec has an Average smaller than 32, and a Touchdown smaller than 3, and an Opponent of oregon state? | SELECT SUM(rec) FROM table_name_95 WHERE average < 32 AND s_touchdown < 3 AND opponent = "oregon state" |
What are their distinct ages? | SELECT DISTINCT T1.age FROM management AS T2 JOIN head AS T1 ON T1.head_id = T2.head_id WHERE T2.temporary_acting = 'Yes' |
Who wrote the episode with the code xle05012? | SELECT written_by FROM table_28348757_6 WHERE production_code = "XLE05012" |
What is the NUT 3 region with area of 41.58? | SELECT nuts_3_region FROM table_name_38 WHERE area__km²_ = "41.58" |
List by school id projects from schools located in the Union Pub School District I-9 that have a New York teaching fellow | SELECT schoolid FROM projects WHERE school_district = 'Union Pub School District I-9' AND teacher_ny_teaching_fellow = 't' |
What is the sum of the total number of medals when silver is less than 0? | SELECT COUNT(total) FROM table_name_54 WHERE silver < 0 |
Name the ICAO for IATA of rgn | SELECT icao FROM table_name_69 WHERE iata = "rgn" |
What are the names of countries that have both players with position forward and players with position defender? | SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Forward" INTERSECT SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Defender" |
What are the hometowns of gymnasts and the corresponding number of gymnasts? | SELECT T2.Hometown , COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown |
What county is the team with the mascot of the Tigers in? | SELECT county FROM table_name_89 WHERE mascot = "tigers" |
Among all the claims, which claims have a claimed amount larger than the average? List the date the claim was made and the date it was settled. | SELECT Date_Claim_Made , Date_Claim_Settled FROM Claims WHERE Amount_Claimed > ( SELECT avg(Amount_Claimed) FROM Claims ) |
How many were in the crowd when the score was 97-80? | SELECT COUNT(crowd) FROM table_name_48 WHERE score = "97-80" |
List all characteristics of product named "sesame" with type code "Grade". | 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" AND t3.characteristic_type_code = "Grade" |
What is the name of the Leftfielder when Davey Lopes was the Second Baseman and first baseman was steve garvey, Shortstop of bill russell eariler than 1977? | SELECT leftfielder FROM table_name_90 WHERE second_baseman = "davey lopes" AND first_baseman = "steve garvey" AND shortstop = "bill russell" AND year > 1977 |
What state is the radio station in that has a frequency of 90.1 FM and a city license in New Castle? | SELECT state FROM table_name_71 WHERE frequency = "90.1 fm" AND city_of_license = "new castle" |
When is the highest closed price of CHNCoin? | SELECT T2.date FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T1.name = 'CHNCoin' ORDER BY T2.close DESC LIMIT 1 |
Segment B of aerospace fuel lines is what netflix episode? | SELECT netflix FROM table_name_99 WHERE segment_b = "aerospace fuel lines" |
Name the distance for Course of vittorio veneto to marina romea | SELECT distance FROM table_name_3 WHERE course = "vittorio veneto to marina romea" |
How many restaurants have not obtained a minimum of 3 in their reviews? | SELECT COUNT(id_restaurant) FROM generalinfo WHERE review < 3 |
Great. What is that person's name? | SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN ( SELECT name FROM Person WHERE age > 40 ) |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.