sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What policies does Dayana Robel have? | Do you mean the policy types of the customer named "Dayana Robel"? | yes | SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id JOIN available_policies AS t3 ON t2.policy_id = t3.policy_id WHERE t1.customer_name = "Dayana Robel" |
Give the city and country for the Alton airport. | SELECT City , Country FROM AIRPORTS WHERE AirportName = "Alton" |
Find the name of the products that have the color description "red" and have the characteristic name "fast". | SELECT product_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 JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = "red" AND t3.characteristic_name = "fast" |
What is the 2005 value with a q2 in 2011, a q1 in 2012, and 1r in 2003? | SELECT 2005 FROM table_name_48 WHERE 2011 = "q2" AND 2012 = "q1" AND 2003 = "1r" |
What is the name of the state that the client with the email "[email protected]" lives in? | SELECT T3.state FROM state AS T1 INNER JOIN district AS T2 ON T1.StateCode = T2.state_abbrev INNER JOIN client AS T3 ON T2.district_id = T3.district_id WHERE T3.email = '[email protected]' |
Find the last name and gender of the students who are playing both Call of Destiny and Works of Widenius games. | SELECT lname , sex FROM Student WHERE StuID IN (SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = "Call of Destiny" INTERSECT SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = "Works of Widenius") |
When ратково is cyrillic name other names and village is the type and orthodox Christianity is the dominant religion of 2002 what is the settlement? | SELECT settlement FROM table_2562572_25 WHERE dominant_religion__2002_ = "Orthodox Christianity" AND type = "village" AND cyrillic_name_other_names = "Ратково" |
From 2011 to 2012, how many Australian players became the "Man of the Match"? | SELECT SUM(CASE WHEN T1.Match_Date BETWEEN '2011%' AND '2012%' THEN 1 ELSE 0 END) FROM `Match` AS T1 INNER JOIN Player AS T2 ON T2.Player_Id = T1.Man_of_the_Match INNER JOIN Country AS T3 ON T3.Country_Id = T2.Country_Name WHERE T3.Country_Name = 'Australia' |
What is Heat, when Mark is 6.69? | SELECT heat FROM table_name_42 WHERE mark = "6.69" |
Show different occupations along with the number of players in each occupation. | SELECT Occupation , COUNT(*) FROM player GROUP BY Occupation |
How many players are older than Gurkeerat Singh player? | SELECT SUM(CASE WHEN DOB < '1990-06-29' THEN 1 ELSE 0 END) FROM Player WHERE Player_Name != 'Gurkeerat Singh' |
Which 2009 has a 2008 of A, and a 2010 of 4r? | SELECT 2009 FROM table_name_84 WHERE 2008 = "a" AND 2010 = "4r" |
Provide the title and total time of the recipe which can be made with only lima beans. | SELECT T1.title, T1.prep_min + T1.cook_min + T1.stnd_min FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id INNER JOIN Ingredient AS T3 ON T3.ingredient_id = T2.ingredient_id WHERE T3.name = 'lima beans' |
What is the average price for products? | SELECT avg(Product_Price) FROM Products |
How many coaches who have taught the Buffalo Sabres have died? | SELECT COUNT(DISTINCT T3.coachID) FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T2.name = 'Buffalo Sabres' AND T3.deathYear IS NOT NULL |
What is the total Gold with a Bronze smaller than 7, a Total of 1, a Nation of cape verde, and a Silver smaller than 0? | SELECT SUM(gold) FROM table_name_48 WHERE bronze < 7 AND total = 1 AND nation = "cape verde" AND silver < 0 |
What is the socket with an order part number of amm300dbo22gq and a September 10, 2009 release date? | SELECT socket FROM table_name_34 WHERE release_date = "september 10, 2009" AND order_part_number = "amm300dbo22gq" |
Which station has a license in Fort Collins, Colorado? | SELECT station FROM table_1353096_2 WHERE city_of_license_market = "Fort Collins, Colorado" |
who is the away team when the tie no is more than 13 and the home team is team bath? | SELECT away_team FROM table_name_30 WHERE tie_no > 13 AND home_team = "team bath" |
What is the frequency for the magazine that runs September 2, 2010? | SELECT frequency FROM table_name_62 WHERE magazine_run = "september 2, 2010" |
What is the latest date in March when the opponent was the Boston Bruins and the game number was smaller than 66? | SELECT MAX(march) FROM table_name_94 WHERE opponent = "boston bruins" AND game < 66 |
In the Western Oval venue, what is the average crowd? | SELECT AVG(crowd) FROM table_name_38 WHERE venue = "western oval" |
What's the minimum total attendance of the Premier League association football? | SELECT MIN(total_attendance) FROM table_10815352_1 WHERE sport = "Association football" AND league = "Premier league" |
What is the A Score when the B Score is more than 9.05, and the total is less than 16.525? | SELECT COUNT(a_score) FROM table_name_54 WHERE b_score > 9.05 AND total < 16.525 |
Show me the names of journalists | SELECT Name from journalist |
How many events in total have happened on the devices in 2016? | SELECT COUNT(event_id) FROM `events` WHERE SUBSTR(`timestamp`, 1, 4) = '2016' |
give me names of all compatible browsers and accelerators in the descending order of compatible year | SELECT T2.name , T3.name FROM accelerator_compatible_browser AS T1 JOIN browser AS T2 ON T1.browser_id = T2.id JOIN web_client_accelerator AS T3 ON T1.accelerator_id = T3.id ORDER BY T1.compatible_since_year DESC |
Where was the title released in 1977? | SELECT country_of_release FROM table_name_98 WHERE year_of_release = 1977 |
What category was the the participant/recipient otōto? | SELECT category FROM table_26282750_1 WHERE participants_recipients = "Otōto" |
Calculate the total number of sales closed by Michel E. DeFrance? | SELECT COUNT(T1.SalesID) FROM Sales AS T1 INNER JOIN Employees AS T2 ON T1.SalesPersonID = T2.EmployeeID WHERE T2.FirstName = 'Michel' AND T2.MiddleInitial = 'e' AND T2.LastName = 'DeFrance' |
Which Genre has a Year before 2013, and a Name of kikumana? | SELECT genre FROM table_name_92 WHERE year < 2013 AND name = "kikumana" |
Find the address of the location named "UK Gallery". | SELECT Address FROM LOCATIONS WHERE Location_Name = "UK Gallery" |
How many courses that do not have prerequisite? | SELECT COUNT(*) FROM course WHERE NOT course_id IN (SELECT course_id FROM prereq) |
List the names of shops that have no devices in stock. | SELECT Shop_Name FROM shop WHERE Shop_ID NOT IN (SELECT Shop_ID FROM stock) |
Which Species/Authority has a Name of true's beaked whale? | SELECT species_authority FROM table_name_44 WHERE name = "true's beaked whale" |
How many airlines are there? | SELECT count(*) FROM airlines |
What is the number & name with an Undergoing overhaul, restoration or repairs date? | SELECT number_ & _name FROM table_name_65 WHERE date = "undergoing overhaul, restoration or repairs" |
Which country is 41% Christian? Give the full name of the country. | SELECT T1.Name FROM country AS T1 INNER JOIN religion AS T2 ON T1.Code = T2.Country WHERE T2.Name = 'Christian' AND T2.Percentage = 41 |
How many students are in the class | SELECT count ( * ) FROM STUDENTS |
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) |
How many languages are there in the country where Tocantins district belongs? | SELECT COUNT(DISTINCT T2.Language) FROM City AS T1 INNER JOIN CountryLanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.District = 'Tocantins' |
What is the Object Number for the item with wheels 4-4-0 and a location of Barrow Hill? | SELECT objectnumber FROM table_name_95 WHERE location = "barrow hill" AND wheels = "4-4-0" |
Who is the vendor of the resources needed by the project that had the highest cost of optional tip? | SELECT T1.vendor_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid ORDER BY T2.total_price_including_optional_support - T2.total_price_including_optional_support DESC LIMIT 1 |
What are their Ids? | SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in |
Find the number of scientists involved for each project name. | SELECT count(*) , T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T1.name |
Opponent of leonardo castello branco had what record? | SELECT record FROM table_name_66 WHERE opponent = "leonardo castello branco" |
What is Northern Colorado's Rnd.? | SELECT rnd FROM table_name_18 WHERE college = "northern colorado" |
how many genre in the list? | SELECT count ( * ) from Genre |
Who had the pole position(s) when rob guiver won and kyle ryde had the fastest lap? | SELECT pole_position FROM table_29162856_1 WHERE winning_rider = "Rob Guiver" AND fastest_lap = "Kyle Ryde" |
can you show me a list of people names? | SELECT Name FROM people |
What are all the distinct payment types? | SELECT DISTINCT payment_type_code FROM payments |
List the genre id of the game Pro Evolution Soccer 2012. | SELECT T.genre_id FROM game AS T WHERE T.game_name = 'Pro Evolution Soccer 2012' |
What are the ids of all aircrafts that can cover a distance of more than 1000? | SELECT aid FROM Aircraft WHERE distance > 1000 |
What episode did tomoyuki furumaya | SELECT title FROM table_29039942_1 WHERE director = "Tomoyuki Furumaya" |
What is the result of the game after week 5 against the st. louis rams? | SELECT result FROM table_name_52 WHERE week > 5 AND opponent = "st. louis rams" |
Tell me the score for international friendly 17 august 2013 | SELECT score FROM table_name_70 WHERE type = "international friendly" AND date = "17 august 2013" |
In year 2010 at schools located in Hawaii, what is the percentage of schools offers an associate's degree? | SELECT CAST(SUM(CASE WHEN T2.level = '2-year' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.level) FROM state_sector_details AS T1 INNER JOIN state_sector_grads AS T2 ON T2.stateid = T1.stateid WHERE T2.state = 'Hawaii' AND T2.year = 2010 |
Find all the customer information in state NY. | SELECT * FROM CUSTOMER WHERE State = "NY" |
What is the document type name for the document with name "How to read a book"? | SELECT T2.document_type_name FROM All_documents AS T1 JOIN Ref_document_types AS T2 ON T1.document_type_code = T2.document_type_code WHERE T1.document_name = "How to read a book" |
List the dates of enrollment and completion of the student with personal name "Karson". | SELECT T1.date_of_enrolment , T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.personal_name = "Karson" |
Can you tell me the Score that has the Result of win, and the Date of 13 november 2009? | SELECT score FROM table_name_62 WHERE result = "win" AND date = "13 november 2009" |
what is the market value of JPMorgan Chase | SELECT Market_Value_billion FROM Companies where name = "JPMorgan Chase" |
What was the location that had an accident by the F-27-600RF aircraft with tail number 6O-SAZ? | SELECT location FROM table_name_42 WHERE aircraft = "f-27-600rf" AND tail_number = "6o-saz" |
Who was the away team at MCG? | SELECT away_team FROM table_name_12 WHERE venue = "mcg" |
What is the club or province of Girvan Dempsey, who has 74 caps? | SELECT club_province FROM table_name_3 WHERE caps = 74 AND player = "girvan dempsey" |
How many customers have at least one order with status "Cancelled"? | SELECT count(DISTINCT customer_id) FROM customer_orders WHERE order_status = "Cancelled" |
What is the average attendance for the New York Jets? | SELECT AVG(attendance) FROM table_name_98 WHERE opponent = "new york jets" |
Is there a work order where the planned cost is different from the actual cost? | SELECT CASE WHEN ActualCost = PlannedCost THEN 'No' ELSE 'Yes' END FROM WorkOrderRouting |
Which role did joemon play before 1991? | SELECT role FROM table_name_34 WHERE year < 1991 AND direction = "joemon" |
What were the goals on 3/10/97? | SELECT goals FROM table_name_86 WHERE date = "3/10/97" |
Great! And her fax number? | SELECT fax FROM employees WHERE first_name = "Nancy" AND last_name = "Edwards" |
The catcher went to what school? | SELECT school FROM table_11677100_7 WHERE position = "Catcher" |
Please list the IDs of the professors that teaches more than 3 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 HAVING COUNT(DISTINCT T1.course_id) > 3 |
List the open date of open year of the shop named "Apple". | SELECT Open_Date, Open_Year FROM shop WHERE Shop_Name = "Apple" |
What is the constructor for Brazilian Grand Prix? | SELECT constructor FROM table_name_48 WHERE grand_prix = "brazilian grand prix" |
List all the locations with a RBMK-1000 reactor. | SELECT location_chernobyl_1_chernobyl_2_chernobyl_3_chernobyl_4_chernobyl_5_ignalina_1_ignalina_2_ignalina_3_kursk_1_kursk_2_kursk_3_kursk_4_kursk_5_kursk_6_leningrad_1_leningrad_2_leningrad_3_leningrad_4_smolensk_1_smolensk_2_smolensk_3_smolensk_4_directorate_for_construction_of_kostoma_npp__for_kostroma_1_and_2__table_31_technology_and_soviet_energy_availability___november_1981___ntis_order__numberpb82_133455__for_ignalina_4_ FROM table_213088_1 WHERE reactor_type = "RBMK-1000" |
For the document Control Assistant who was hired on 2009/1/22, what is the percentage of private documents did he/she have? | SELECT CAST(SUM(CASE WHEN T1.DocumentSummary IS NOT NULL THEN 1 ELSE 0 END) AS REAL) / COUNT(T1.DocumentSummary) FROM Document AS T1 INNER JOIN Employee AS T2 ON T1.Owner = T2.BusinessEntityID WHERE T2.JobTitle = 'Document Control Assistant' AND T2.HireDate = '2009-01-22' |
Can you tell me the Score that has the Date of 11/17/1979? | SELECT score FROM table_name_98 WHERE date = "11/17/1979" |
What are the asset acquired date and asset disposed date for asset id 2? | SELECT asset_acquired_date,asset_disposed_date from assets where asset_id = 2 |
What are the sources for the data of children who finished primary school education in North American countries? | SELECT DISTINCT T3.Description FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode INNER JOIN CountryNotes AS T3 ON T2.CountryCode = T3.Countrycode WHERE T1.Region = 'North America' AND T2.IndicatorName = 'Out-of-school children of primary school age, both sexes (number)' |
What is the Label of the release in CD Maxi Format? | SELECT label FROM table_name_65 WHERE format = "cd maxi" |
What is the category when the version is 1.0 and the title is Chord finder? | SELECT category FROM table_18138132_2 WHERE version = "1.0" AND title = "Chord Finder" |
Which player did the green bay packers pick? | SELECT player FROM table_2508633_5 WHERE nfl_team = "Green Bay Packers" |
What school has belleville as the city? | SELECT school FROM table_name_37 WHERE city = "belleville" |
What was the record for game 59? | SELECT record FROM table_name_61 WHERE game = 59 |
At what venue did the Essendon team play as an away team? | SELECT venue FROM table_name_92 WHERE away_team = "essendon" |
What is the Latin equivalent for the Phagspa of ꡙ? | SELECT latin FROM table_name_72 WHERE ’phagspa = "ꡙ" |
What is the smallest amount of WSOP bracelets anyone had? | SELECT MIN(wsop_bracelets) FROM table_23696862_6 |
Which organization has the least number of male students? | SELECT T.organ FROM ( SELECT T2.organ, COUNT(T1.name) AS num FROM male AS T1 INNER JOIN enlist AS T2 ON T1.name = T2.name GROUP BY T2.organ ) T ORDER BY T.num LIMIT 1 |
Which part fault requires the most number of skills to fix? List part id and name. | SELECT T1.part_id, T1.part_name FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id JOIN Skills_Required_To_Fix AS T3 ON T2.part_fault_id = T3.part_fault_id GROUP BY T1.part_id ORDER BY COUNT(*) DESC LIMIT 1 |
What is the highest number of games played? | SELECT MAX(games_played) FROM table_18018214_4 |
What was the result of the game in Milwaukee? | SELECT result FROM table_name_34 WHERE city = "milwaukee" |
What was the game number on march 27? | SELECT MIN(game) FROM table_27712702_11 WHERE date = "March 27" |
When Team 1 is Aalborg BK, what is the 1st Leg? | SELECT 1 AS st_leg FROM table_name_53 WHERE team_1 = "aalborg bk" |
What venue hosted a match with a 3-0 score on December 7, 2002? | SELECT venue FROM table_name_31 WHERE score = "3-0" AND date = "december 7, 2002" |
List by name all customers who provided consent for the tag Older American. | SELECT T1.first, T1.middle, T1.last FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.Tags = 'Older American' AND T2.`Consumer consent provided?` != 'N/A' AND T2.`Consumer consent provided?` IS NOT NULL AND T2.`Consumer consent provided?` != '' |
Which opponent has a record of 52-52? | SELECT opponent FROM table_name_63 WHERE record = "52-52" |
What is the country of the player moving from belgrano with a summer transfer window? | SELECT country FROM table_name_69 WHERE transfer_window = "summer" AND moving_from = "belgrano" |
Which year has most number of concerts? | SELECT YEAR FROM concert GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1 |
Which products by Plutzer Lebensmittelgromrkte AG were discontinued and what are their price? | SELECT T1.UnitPrice FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Plutzer Lebensmittelgromrkte AG' AND T1.Discontinued = 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.