sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
List the character names and descriptions of chapter ID 18710. | SELECT DISTINCT T1.CharName, T1.Description FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T2.Chapter_id = 18710 |
What is the games played when the category is points per game? | SELECT MIN(games_played) FROM table_28628309_8 WHERE category = "Points per game" |
What are the names of the aircraft that the least people are certified to fly? | SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid = T1.aid GROUP BY T1.aid ORDER BY count(*) DESC LIMIT 1 |
Show all allergy types and the number of allergies in each type. | SELECT allergytype , count(*) FROM Allergy_type GROUP BY allergytype |
what is the glos & wilts where the bristol & somerset is lansdown? | SELECT glos_ & _wilts FROM table_12043148_2 WHERE bristol_ & _somerset = "Lansdown" |
What is the launched date of the destroyer completed 25 February 1936? | SELECT launched FROM table_name_13 WHERE completed = "25 february 1936" |
Find the first and last name of the author(s) who wrote the paper "Nameless, Painless". | SELECT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = "Nameless , Painless" |
Who won Gold later than 2004 with Notes of 2.73km, 14controls? | SELECT gold FROM table_name_32 WHERE year > 2004 AND notes = "2.73km, 14controls" |
Find the id and name of the staff who has been assigned for the shortest period. | SELECT T1.staff_id , T1.staff_name FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY date_assigned_to - date_assigned_from LIMIT 1 |
Type FJ/RN/SC is associated with what class? | SELECT class FROM table_21538523_1 WHERE type = "FJ/RN/SC" |
Show the names of journalists and the names of the events they reported in ascending order | SELECT T3.Name, T2.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID ORDER BY T2.Event_Attendance |
what is the location for the date (to) 8 october 1922? | SELECT location FROM table_12562214_1 WHERE date__to_ = "8 October 1922" |
Do you know who the architect is for that bridge? | SELECT * from bridge as T1 join architect as T2 on T1.architect_id = T2.id where T1.name = 'Xian Ren Qiao ( Fairy Bridge ) ' |
What is 01-02, when 03-04 is 03-04? | SELECT 01 AS _02 FROM table_name_61 WHERE "03_04" = "03_04" |
What are the dock count of San Jose Diridon Caltrain Station? | SELECT dock_count FROM station WHERE name = "San Jose Diridon Caltrain Station" |
What callsign has 1300 as the frequency? | SELECT callsign FROM table_name_66 WHERE frequency = 1300 |
Who directed the episode that aired November 21, 2003? | SELECT directed_by FROM table_28859177_2 WHERE original_air_date = "November 21, 2003" |
What label released a record on March 25, 1984? | SELECT label FROM table_name_9 WHERE date = "march 25, 1984" |
What are the 2fm's for erp 16? | SELECT 2 AS fm__mhz_ FROM table_18475946_2 WHERE erp__kw_ = "16" |
And what is this organization's type? | SELECT T1.organisation_type FROM organisation_Types AS T1 JOIN Organisations AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_details = 'quo' |
What Date does the Name (location) Belyanitsky, Ivanovo, and Balino have? | SELECT date FROM table_name_28 WHERE name__location_ = "belyanitsky, ivanovo, and balino" |
Hello! Can you provide me with a list of first name, last name, and faculty ID of all faculty? | SELECT Fname, Lname, FacID from Faculty |
What are the names of the characteristics of the product 'sesame' that have the characteristic 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" |
Thanks! Can you also update that list to show the checking balance for each customer? | select balance from CHECKING |
List the report number of crimes against property happened in Riverdale. | SELECT SUM(CASE WHEN T1.crime_against = 'Property' THEN 1 ELSE 0 END) FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T2.fbi_code_no = T1.fbi_code_no INNER JOIN Community_Area AS T3 ON T3.community_area_no = T2.community_area_no WHERE T3.community_area_name = 'Riverdale' |
What is Ken Walter's lowest pick number with an overall pick number larger than 195? | SELECT MIN(pick__number) FROM table_name_28 WHERE name = "ken walter" AND overall > 195 |
What is the chassis when there is 25 points? | SELECT chassis FROM table_name_41 WHERE points = "25" |
What is the score of the match played on a hard surface with an opponent in the final of Elena Likhovtseva? | SELECT score FROM table_name_2 WHERE surface = "hard" AND opponent_in_the_final = "elena likhovtseva" |
Name the candidates for illinois 15 | SELECT candidates FROM table_1341672_14 WHERE district = "Illinois 15" |
What are the names of all the customers? | SELECT customer_name FROM customers |
Who was the partner that played against Serena Williams Venus Williams? | SELECT partner FROM table_name_94 WHERE opponents_in_the_final = "serena williams venus williams" |
What is the additional information in the song mera yaar bana hai dulha | SELECT additional_info FROM table_2528382_2 WHERE song = "Mera Yaar Bana Hai Dulha" |
What team won after 2008? | SELECT team FROM table_name_9 WHERE season > 2008 |
Which languages are spoken by only one country in republic governments? | SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.GovernmentForm = "Republic" GROUP BY T2.Language HAVING COUNT(*) = 1 |
Which Position has a Pick smaller than 152, and a Round smaller than 3? | SELECT position FROM table_name_92 WHERE pick < 152 AND round < 3 |
How many Federalist representatives are there whose first names are Benjamin? | SELECT COUNT(T.bioguide_id) FROM ( SELECT T1.bioguide_id FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.first_name = 'Benjamin' AND T2.party = 'Federalist' AND T2.type = 'rep' GROUP BY T1.bioguide_id ) AS T |
What are the first names of all students in Smith Hall? | SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall' |
What was the result of the april 6, 2002 game against the greensboro prowlers? | SELECT result FROM table_name_89 WHERE opponent = "greensboro prowlers" AND date = "april 6, 2002" |
What 2nd Member has an Election of 1833 by-election? | SELECT 2 AS nd_member FROM table_name_43 WHERE election = "1833 by-election" |
What day was Jeld-Wen Tradition held? | SELECT date FROM table_15346009_1 WHERE tournament = "JELD-WEN Tradition" |
When is the earliest year for it is in barcelona, spain? | SELECT MIN(year) FROM table_name_35 WHERE venue = "barcelona, spain" |
what week number was at memorial stadium? | SELECT AVG(week) FROM table_name_53 WHERE game_site = "memorial stadium" |
In the Central region, what was the infiltration (km 3 /year)? | SELECT infiltration__km_3__year_ FROM table_25983027_1 WHERE region = "Central" |
How many players are there for each hand type? | SELECT count(*) , hand FROM players GROUP BY hand |
What is the name of the player acquired via import and larger than 22? | SELECT name FROM table_name_55 WHERE acquisition_via = "import" AND number > 22 |
What is the genre of the game titled '999: Nine Hours, Nine Persons, Nine Doors' ? | SELECT T2.genre_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T1.game_name = '999: Nine Hours, Nine Persons, Nine Doors' |
What is the direction of the train with a diamond-shaped load in its 2nd car? | SELECT T2.direction FROM cars AS T1 INNER JOIN trains AS T2 ON T1.train_id = T2.id WHERE T1.position = 2 AND T1.shape = 'diamond' |
Which cornerback has the lowest overall and a pick number smaller than 16? | SELECT MIN(overall) FROM table_name_30 WHERE position = "cornerback" AND pick__number < 16 |
List name of ships? | SELECT name FROM ship |
How many teams have the same total number of postseason wins and postseason loses? | SELECT DISTINCT COUNT(tmID) FROM Goalies WHERE PostW = PostL |
What are the shipping agent names? | SELECT shipping_agent_name FROM Ref_Shipping_Agents; |
What is the name of the team with the earliest home game date, and what is that date? | SELECT T2.name,T1.span_first FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br order by T1.span_first limit 1 |
Which Date has a Road Team of new york, and a Result of 79-75? | SELECT date FROM table_name_42 WHERE road_team = "new york" AND result = "79-75" |
Show the countries that have mountains with height more than 5600 stories and mountains with height less than 5200. | SELECT Country FROM mountain WHERE Height > 5600 INTERSECT SELECT Country FROM mountain WHERE Height < 5200 |
What is the total profit gained by the company from the product that has the highest amount of quantity ordered from online customers? Indicate the name of the product. | SELECT (T2.ListPrice - T2.StandardCost) * SUM(T1.Quantity), T2.Name FROM ShoppingCartItem AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID GROUP BY T1.ProductID, T2.Name, T2.ListPrice, T2.StandardCost, T1.Quantity ORDER BY SUM(T1.Quantity) DESC LIMIT 1 |
Show the denomination of the school that has the most players. | SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 1 |
Which Opponent is on september 9, 2004? | SELECT opponent FROM table_name_77 WHERE date = "september 9, 2004" |
Please list the depth of the lakes that are located in the Province of Albania. | SELECT T2.Depth FROM located AS T1 INNER JOIN lake AS T2 ON T1.Lake = T2.Name WHERE T1.Province = 'Albania' |
Which projects have no outcome? List the project details. | SELECT project_details FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_outcomes ); |
What is the Netflix episode that has a series episode of 6-02? | SELECT netflix FROM table_name_98 WHERE series_ep = "6-02" |
Alright, and how many male artists who prefer pop are there in the entire world, according to the table? | SELECT count ( * ) FROM artist WHERE preferred_genre = "pop" AND gender = "Male" |
And what are their transaction dates? | SELECT transaction_date FROM Financial_transactions WHERE transaction_amount > ( SELECT avg ( transaction_amount ) FROM Financial_transactions ) |
What is the highest number of Brisbane viewers? | SELECT MAX(brisbane) FROM table_24291077_4 |
What is the range of married filing jointly or qualified widower in which married filing separately is $33,951–$68,525? | SELECT married_filing_jointly_or_qualified_widow_er_ FROM table_11647327_2 WHERE married_filing_separately = "$33,951–$68,525" |
How many calories from fat are there in the recipe "Raspberry Chiffon Pie"? | SELECT T2.calories * T2.pcnt_cal_fat FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.title = 'Raspberry Chiffon Pie' |
How many solution path does the repository with 111 stars, 58 forks, and 111 watchers? | SELECT COUNT(T2.Path) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Stars = 111 AND T1.Forks = 58 AND T1.Watchers = 111 |
Name the bulgarian name for mart | SELECT bulgarian_name FROM table_15275060_1 WHERE BULGARIAN_NAME(Transliteration) = Mart |
Among the players who were born in 1977, provide names and birthdates of the players from England. | SELECT T2.Player_Name, T2.DOB FROM Country AS T1 INNER JOIN Player AS T2 ON T2.Country_Name = T1.Country_Id WHERE T2.DOB LIKE '1977%' AND T1.Country_Name = 'England' |
How many residences are there in total? | SELECT count ( distinct residence ) FROM player |
How many clubs had 7 wins? | SELECT COUNT(club) FROM table_13741576_6 WHERE won = "7" |
For the customer who gave a 3 star rating to Frostie brand on 2014/4/24, did the user permit the company to send regular emails to him/her? | SELECT CASE WHEN T1.SubscribedToEmailList LIKE 'TRUE' THEN 'YES' ELSE 'NO' END AS result FROM customers AS T1 INNER JOIN rootbeerreview AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN rootbeerbrand AS T3 ON T2.BrandID = T3.BrandID WHERE T2.StarRating = 3 AND T3.BrandName = 'Frostie' AND T2.ReviewDate = '2014-04-24' |
How many songs have a shared vocal? | SELECT count(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = "shared" |
What was the player name who came from Australia? | SELECT player FROM table_11734041_1 WHERE school_club_team_country = "Australia" |
List all the model names sorted by their launch year. | SELECT model_name FROM chip_model ORDER BY launch_year |
Which Wins have a Class of 500cc, and a Year smaller than 1975? | SELECT wins FROM table_name_46 WHERE class = "500cc" AND year < 1975 |
Who won silver in 1982? | SELECT silver FROM table_name_15 WHERE year = 1982 |
What is its ID? | SELECT T2.Manufacturer_ID FROM furniture as T1 JOIN furniture_manufacte as T2 ON T1.Furniture_ID = T2.Furniture_ID WHERE T1.name = "Chabudai" |
Who is the opponent on October 28, 2001? | SELECT opponent FROM table_name_77 WHERE date = "october 28, 2001" |
What is the championship of Jem Karacan that has a total of 2 and a league cup more than 0? | SELECT championship FROM table_name_10 WHERE total = 2 AND league_cup > 0 AND name = "jem karacan" |
What is the score for the United States in place T1 for David Duval? | SELECT score FROM table_name_80 WHERE country = "united states" AND place = "t1" AND player = "david duval" |
List the camera lens names containing substring "Digital". | SELECT name FROM camera_lens WHERE name LIKE "%Digital%" |
What is the avg/g of Rhines, Chris, who has an effic greater than 73.95? | SELECT avg_g FROM table_name_70 WHERE effic > 73.95 AND name = "rhines, chris" |
How many distinct orders were there in 2003 when the quantity ordered was less than 30? | SELECT COUNT(DISTINCT T1.orderNumber) FROM orderdetails AS T1 INNER JOIN orders AS T2 ON T1.orderNumber = T2.orderNumber WHERE T1.quantityOrdered < 30 AND STRFTIME('%Y', T2.orderDate) = '2003' |
What is the time with FB notes for Canada? | SELECT time FROM table_name_43 WHERE notes = "fb" AND country = "canada" |
Find all phones that have word 'Full' in their accreditation types. List the Hardware Model name and Company name. | SELECT Hardware_Model_name , Company_name FROM phone WHERE Accreditation_type LIKE 'Full'; |
When did customer with first name as Carole and last name as Bernhard became a customer? | SELECT date_became_customer FROM Customers WHERE first_name = "Carole" AND last_name = "Bernhard"; |
What was the score when the Spurs' record was 43-13? | SELECT score FROM table_name_72 WHERE record = "43-13" |
What about the staff? | SELECT first_name FROM staff where last_name = 'Mertz' |
What are the amenities of the dorm that has the smallest student capacity? | SELECT T3.amenity_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 T1.student_capacity = ( select min ( student_capacity ) from dorm ) |
Name the most win % for 13 drawn | SELECT MAX(win__percentage) FROM table_name_91 WHERE drawn = 13 |
What are the maximum and minimum number of transit passengers of all aiports. | SELECT max(Transit_Passengers) , min(Transit_Passengers) FROM airport |
which manufacturer has the least revenue? | Did you mean to get the name of manufacturer has the least revenue | name the manufacturer with the least revenue | SELECT name FROM manufacturers order by revenue limit 1 |
And what are starting years shared by technicians from both teams? | SELECT Starting_Year FROM technician WHERE Team = "CLE" INTERSECT SELECT Starting_Year FROM technician WHERE Team = "CWS" |
What was the away team's score at Western Oval? | SELECT away_team AS score FROM table_name_75 WHERE venue = "western oval" |
Excellent! Can you list the investor IDs that correspond to each of these lot_details? | SELECT T1.investor_id, T2.lot_details FROM INVESTORS AS T1 JOIN LOTS AS T2 ON T1.investor_id = T2.investor_id WHERE T1.Investor_details = "l" |
What is the earliest sunrise recorded in the stations with no more than 1 store in February 2012? | SELECT T1.station_nbr FROM relation AS T1 INNER JOIN weather AS T2 ON T1.station_nbr = T2.station_nbr WHERE sunrise IS NOT NULL AND T2.`date` LIKE '%2012-02%' AND T1.station_nbr IN ( SELECT station_nbr FROM relation GROUP BY station_nbr HAVING COUNT(store_nbr) = 1 ) ORDER BY sunrise LIMIT 1 |
Among the teams that played in 1922's Stanley Cup finals, how many of them had over 20 points in that year? | SELECT COUNT(T1.tmID) FROM TeamsSC AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.year = '1922' AND T2.Pts > 20 |
How many distinct colleges are associated with players from the team with name "Columbus Crew". | SELECT count(DISTINCT T1.College) FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = "Columbus Crew" |
Can you give the name of the countries with population smaller than 100000? | SELECT County_name FROM county WHERE Population < 100000 |
What was the highest amount of losses when there were 45 goals and the play was smaller than 38? | SELECT MAX(losses) FROM table_name_52 WHERE goals_for = 45 AND played < 38 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.