sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
On what date was the venue at Edgbaston? | SELECT date FROM table_name_97 WHERE venue = "edgbaston" |
What is the skill code for skill id 1, 2 and 3 ? | SELECT skill_id, skill_code FROM skills where skill_id = 1 or skill_id = 2 or skill_id = 3 |
What is the Sanskrit for the Greek word λέων? | SELECT sanskrit FROM table_name_98 WHERE greek = "λέων" |
what is the work type of Anna Powierza? | SELECT T2.Work_Type FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID = T2.Editor_ID where T1.Name = "Anna Powierza" |
What is the title, credit value, and department name for courses with more than one prerequisite? | SELECT T1.title , T1.credits , T1.dept_name FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id HAVING count(*) > 1 |
What is the number of Position when the team was são paulo railway and the against is less than 46? | SELECT COUNT(position) FROM table_name_28 WHERE team = "são paulo railway" AND against < 46 |
What were those movies directed by Walter Hill? | SELECT Title FROM film WHERE Director = "Walter Hill" |
List the names of all courses ordered by their titles and credits. | SELECT title FROM course ORDER BY title , credits |
What 2008 has 14.2% as the 2009? | SELECT 2008 FROM table_name_31 WHERE 2009 = "14.2%" |
Which cities in the Los Angeles Unified School District has bought supplies from Quill.com? | SELECT T2.school_city FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.school_district = 'Los Angeles Unif Sch Dist' AND T1.vendor_name = 'Quill.com' |
Which problems were reported before the date of any problem reported by the staff Lysanne Turcotte? Give me the ids of the problems. | SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported < ( SELECT min(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = "Lysanne" AND T4.staff_last_name = "Turcotte" ) |
Great, can you show me the dates these catalogs were revised again? | select catalog_name, date_of_latest_revision from Catalogs where date_of_latest_revision in ( SELECT date_of_latest_revision FROM Catalogs GROUP BY date_of_latest_revision HAVING count ( * ) > 1 ) |
How many high schoolers are there? | SELECT COUNT(*) FROM Highschooler |
How many items that were shipped via air were returned in 1994? | SELECT COUNT(l_linenumber) FROM lineitem WHERE l_returnflag = 'R' AND l_shipmode = 'AIR' AND STRFTIME('%Y', l_shipdate) = '1994' |
What game was in 2005? | SELECT game FROM table_name_85 WHERE year = 2005 |
Which allergy is the most common? | SELECT Allergy FROM Has_allergy GROUP BY Allergy ORDER BY count(*) DESC LIMIT 1 |
What couple had a vote percentage of 5.2%? | SELECT couple FROM table_26375386_17 WHERE vote_percentage = "5.2%" |
List down the page numbers for menu with dishes on the right upper corner. | SELECT T2.page_number FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id INNER JOIN MenuItem AS T3 ON T2.id = T3.menu_page_id WHERE T3.xpos > 0.75 AND T3.ypos < 0.25 |
In what year(s) did South Korea win silver? | SELECT year FROM table_name_14 WHERE silver = "south korea" |
Who led the most laps when brandon wagner had the fastest lap? | SELECT most_laps_led FROM table_29690363_3 WHERE fastest_lap = "Brandon Wagner" |
How many tie no have team 1 as borac banja luka? | SELECT tie_no FROM table_19294812_2 WHERE team_1 = "Borac Banja Luka" |
what is the number of people where the pieces is 3015 | SELECT COUNT(player) FROM table_28498999_6 WHERE points = 3015 |
Ashley Grimes had what to club? | SELECT to_club FROM table_name_26 WHERE player = "ashley grimes" |
What is the lowest total? | SELECT MIN(total) FROM table_19439864_2 |
Ok. Can you give me the cities where the state is NorthCarolina | SELECT town_city FROM addresses where state_province_county = 'NorthCarolina' |
Name the title of the episode that was nominated for Emmy's Outstanding Animated Program 21 times. | SELECT T2.title FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T1.organization = 'Primetime Emmy Awards' AND T1.award = 'Outstanding Animated Program (For Programming Less Than One Hour)' AND T1.result = 'Nominee' GROUP BY T1.episode_id HAVING COUNT(T1.episode_id) = 21; |
How many location IDs have actual resource hours of 2? | SELECT COUNT(LocationID) FROM WorkOrderRouting WHERE ActualResourceHrs = 2 |
Who is the owner of the radio station that plays adult hits? | SELECT owner FROM table_name_8 WHERE format = "adult hits" |
What is Rating, when Event is Johnson Vs. Dodson? | SELECT rating FROM table_name_23 WHERE event = "johnson vs. dodson" |
Among the employees who were born before 1969, what is the work shift of the 6th oldest employee? | SELECT T3.StartTime, T3.EndTime FROM Employee AS T1 INNER JOIN EmployeeDepartmentHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN Shift AS T3 ON T2.ShiftId = T3.ShiftId WHERE STRFTIME('%Y', T1.BirthDate) < '1969' ORDER BY T1.BirthDate LIMIT 5, 1 |
Among the products with an order quantity of no less than 5 that was shipped in the month of May 2019, what is the name of the product with the lowest net profit? | SELECT T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.`Order Quantity` > 5 AND ShipDate LIKE '5/%/19' ORDER BY REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '') ASC LIMIT 1 |
Give me the full birthdate, email and phone number of the youngest client in Indianapolis . | SELECT T1.year, T1.month, T1.day, T1.email, T1.phone FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.city = 'Indianapolis' ORDER BY T1.year DESC, T1.month DESC, T1.day DESC LIMIT 1 |
List the names of players who play by the left hand. | SELECT T1.Player_Name FROM Player AS T1 INNER JOIN Batting_Style AS T2 ON T1.Batting_hand = T2.Batting_Id WHERE T2.Batting_hand = 'Left-hand bat' |
How many distinct students have been in detention? | SELECT COUNT(DISTINCT student_id) FROM Students_in_Detention |
What are the formats associated with the Atlantic Records label, catalog number 512336? | SELECT format_s_ FROM table_name_15 WHERE label = "atlantic records" AND catalog = "512336" |
Which dogs have not cost their owner more than 1000 for treatment ? List the dog names . | select name from dogs where dog_id not in ( select dog_id from treatments group by dog_id having sum(cost_of_treatment) > 1000 ) |
what is the competition when the date is 16 january 1996? | SELECT competition FROM table_name_14 WHERE date = "16 january 1996" |
How many orders were shipped in 1994? | SELECT COUNT(l_orderkey) FROM lineitem WHERE STRFTIME('%Y', l_shipdate) = '1994' |
What are the vice manager names of those locations? | select location, vice_manager_name from gas_station where manager_name = ( SELECT manager_name FROM gas_station WHERE open_year > 2000 GROUP BY manager_name ORDER BY count ( * ) DESC LIMIT 1 ) |
Please list all of the character descriptions in paragraph 20. | SELECT T1.Description FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T2.ParagraphNum = 20 |
What is the name and hours for the project which has the most scientists assigned to it? | SELECT T1.name , T1.hours FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T2.project ORDER BY count(*) DESC LIMIT 1 |
What are the names of the parts that were ordered by customer 110942? | SELECT T3.p_name FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey INNER JOIN part AS T3 ON T2.l_partkey = T3.p_partkey WHERE T1.o_custkey = 110942 |
Who was the opponent that played against the Buckeyes on October 17? | SELECT opponent_number FROM table_name_16 WHERE date = "october 17" |
Please list the e-mails of the reviewers who have reviewed high class. | SELECT T1.EmailAddress FROM ProductReview AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Class = 'H' |
What are the type and nationality of ships? | SELECT TYPE, Nationality FROM ship |
What is the overall average amount of transactions? | SELECT avg ( amount_of_transaction ) FROM TRANSACTIONS |
For the county represented by Thompson Bennie G, how many bad aliases does it have? | SELECT COUNT(DISTINCT T2.bad_alias) FROM zip_congress AS T1 INNER JOIN avoid AS T2 ON T1.zip_code = T2.zip_code INNER JOIN congress AS T3 ON T1.district = T3.cognress_rep_id WHERE T3.first_name = 'Thompson' AND T3.last_name = 'Bennie G' |
How many episodes were numbered 5? | SELECT COUNT(production_count) FROM table_2501754_2 WHERE episode__number = 5 |
What is the constructor of the driver Heinz-Harald Frentzen? | SELECT constructor FROM table_name_50 WHERE driver = "heinz-harald frentzen" |
What is To Par, when Score is "66", and when Player is "Brad Faxon"? | SELECT to_par FROM table_name_25 WHERE score = 66 AND player = "brad faxon" |
What tournament was after 2009? | SELECT tournament FROM table_name_8 WHERE year > 2009 |
Name the game released in 2011. | SELECT T3.game_name FROM game_platform AS T1 INNER JOIN game_publisher AS T2 ON T1.game_publisher_id = T2.id INNER JOIN game AS T3 ON T2.game_id = T3.id WHERE T1.release_year = 2011 |
How many people attended Match No. 31? | SELECT attendance FROM table_name_51 WHERE match_no = "31" |
What are the average and minimum prices (in Euros) of all products? | SELECT avg ( price_in_euros ) , min ( price_in_euros ) FROM catalog_contents |
What is the life expectancy of residents in the most crowded city? | SELECT T2.LifeExpectancy FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code ORDER BY T1.Population DESC LIMIT 1 |
What is the Location, when the Score is 35-31? | SELECT location FROM table_name_63 WHERE score = "35-31" |
Which US air date had 4.4 million viewers? | SELECT original_us_air_date FROM table_17901155_4 WHERE viewers__millions_ = "4.4" |
What are the names of all reviewers that have given 3 or 4 stars for reviews? | SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars = 3 INTERSECT SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars = 4 |
Who is the player who has a total less than 4, no scottish cups, and a league cup greater than 0? | SELECT player FROM table_name_31 WHERE total < 4 AND scottish_cup = 0 AND league_cup > 0 |
Tell me the name for commissioned of 30 august 1941 and laid down of 22 september 1939 | SELECT name FROM table_name_73 WHERE laid_down = "22 september 1939" AND commissioned = "30 august 1941" |
List the names of all distinct products in alphabetical order. | SELECT DISTINCT product_name FROM products ORDER BY product_name |
What was her final score on the ribbon apparatus? | SELECT score_final FROM table_name_86 WHERE apparatus = "ribbon" |
How many tweets are in English? | SELECT COUNT(TweetID) AS tweet_number FROM twitter WHERE Lang = 'en' |
What is the 2008 for 2009 heartland high tech? | SELECT 2008 FROM table_name_2 WHERE 2009 = "heartland high tech" |
What is To Par, when Country is "United States", when Place is "T4", and when Score is "71-68=139"? | SELECT to_par FROM table_name_75 WHERE country = "united states" AND place = "t4" AND score = 71 - 68 = 139 |
What poll source had an administered date on July 10, 2008? | SELECT poll_source FROM table_16751596_6 WHERE dates_administered = "July 10, 2008" |
Provide the character name, paragraph number, and plain text of "cousin to the king" description. | SELECT T1.CharName, T2.ParagraphNum, T2.PlainText FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T1.Description = 'cousin to the king' |
Find the grade taught in classroom 103. | SELECT DISTINCT grade FROM list WHERE classroom = 103 |
Find the weight of the youngest dog. | SELECT weight FROM pets ORDER BY pet_age LIMIT 1 |
Return the apartment numbers of the apartments with type code "Flat". | SELECT apt_number FROM Apartments WHERE apt_type_code = "Flat" |
What country does Glory Alozie play for? | SELECT country FROM table_name_15 WHERE name = "glory alozie" |
What is the origin of the Malayalam Dish Service that shows general programming on the Asianet Plus network? | SELECT origin_of_programming FROM table_name_11 WHERE service = "dish" AND language = "malayalam" AND genre = "general" AND network = "asianet plus" |
What is the total number of 4th place that has 3 appearances for 3, and a more than 0 silver medals, and no gold medals? | SELECT COUNT(4 AS th_place) FROM table_name_27 WHERE appearances = 3 AND silver_medals > 0 AND gold_medals < 0 |
What was the 2nd leg score between Patronage Sainte-Anne and Asante Kotoko? | SELECT 2 AS nd_leg FROM table_name_27 WHERE team_1 = "asante kotoko" |
Who is the quarter back for a winning pct of .792 | SELECT quarterback FROM table_14389782_2 WHERE winning_pct = ".792" |
What is the number of flights? | SELECT count(*) FROM Flight |
what's the record where score is w 105–92 (ot) | SELECT record FROM table_11964154_9 WHERE score = "W 105–92 (OT)" |
Current legislator Sherrod Brown has been in the Democrat party during how many terms that he has served? | SELECT COUNT(*) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.official_full_name = 'Sherrod Brown' AND T2.party = 'Democrat' |
Who placed in t5 and scored 73-69-68=210? | SELECT player FROM table_name_76 WHERE place = "t5" AND score = 73 - 69 - 68 = 210 |
What is the average frequency mhz of the loomis, south dakota city license? | SELECT AVG(frequency_mhz) FROM table_name_83 WHERE city_of_license = "loomis, south dakota" |
what is the highest salary? | select max ( salary ) from instructor |
What is the birthday of Amy Klobuchar? | SELECT birthday_bio FROM current WHERE first_name = 'Amy' AND last_name = 'Klobuchar' |
Please list the IDs of the top 3 professors that teaches the most courses. | SELECT T1.p_id FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1 GROUP BY T1.p_id ORDER BY COUNT(*) DESC LIMIT 3 |
Among the books published by publisher "Thomas Nelson", how many of them have over 300 pages? | SELECT COUNT(*) FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T2.publisher_name = 'Thomas Nelson' AND T1.num_pages > 300 |
Name the least age 30-39 where age 20-29 is 593 | SELECT MIN(age_30_39) FROM table_169693_1 WHERE age_20_29 = 593 |
List down the email address of female single employees. | SELECT T3.EmailAddress FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN EmailAddress AS T3 ON T2.BusinessEntityID = T3.BusinessEntityID WHERE T1.Gender = 'F' AND T1.MaritalStatus = 'S' |
What was Mark O'Meara's total? | SELECT total FROM table_name_40 WHERE player = "mark o'meara" |
Which Crew has Comments of daggerboards. design: roy seaman? | SELECT crew FROM table_name_49 WHERE comments = "daggerboards. design: roy seaman" |
Find the distinct driver id and the stop number of all drivers that have a shorter pit stop duration than some drivers in the race with id 841. | SELECT DISTINCT driverid , STOP FROM pitstops WHERE duration < (SELECT max(duration) FROM pitstops WHERE raceid = 841) |
Which users had some tweets? | SELECT name FROM user_profiles WHERE UID IN ( SELECT UID FROM tweets ) |
What is the Finish when the start shows 3 in the year of 2010? | SELECT finish FROM table_name_74 WHERE start = "3" AND year = 2010 |
What is the result on 29 September 2007? | SELECT result FROM table_name_39 WHERE date = "29 september 2007" |
What is the average Barrow Island Australia when Draugen north sea is 17 and Mutineer-Exeter Australia is smaller than 6? | SELECT AVG(barrow_island_australia) FROM table_name_94 WHERE draugen_north_sea = 17 AND mutineer_exeter_australia < 6 |
What is the lowest production code | SELECT MIN(production_code) FROM table_20098479_1 |
what's the success where date of completion is september 28, 2007 | SELECT success FROM table_12078626_1 WHERE date_of_completion = "September 28, 2007" |
Give the name of the airline to which tail number N202NN belongs to. | SELECT T2.Description FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code WHERE T1.TAIL_NUM = 'N202NN' GROUP BY T2.Description |
What is the attendance for august 29? | SELECT attendance FROM table_name_9 WHERE date = "august 29" |
Can you list the class room associated with the name Loria Ondersma in the teachers table? | SELECT classroom from teachers where lastname = "ONDERSMA" |
What is the Galician (reintegrationist) word of the Galician (Official) is adeus*? | SELECT galician___reintegrationist__ FROM table_26614365_5 WHERE galician___official__ = "Adeus*" |
what is the ship with the date of 28.1.1915? | SELECT ship FROM table_name_87 WHERE date = "28.1.1915" |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.