sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
Who made the challenge on the Albert Park Grand Prix Circuit? | SELECT challenge FROM table_25531112_2 WHERE circuit = "Albert Park Grand Prix circuit" |
How many times does the Catalan word "nombre" repeat itself? | SELECT T1.occurrences FROM langs_words AS T1 INNER JOIN words AS T2 ON T1.wid = T2.wid WHERE T2.word = 'nombre' |
What is the average number of conversions for the Cardiff Blues with less than 14 tries? | SELECT AVG(conversions) FROM table_name_91 WHERE team = "cardiff blues" AND tries < 14 |
Show first name and last name for all the students advised by Michael Goodrich. | SELECT T2.fname , T2.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.fname = "Michael" AND T1.lname = "Goodrich" |
What is the location id for Debur and Polish? | SELECT LocationID FROM Location WHERE Name = 'Debur and Polish' |
What is the full name of the team with the fastest growth in winning rate in the 'ABA' league from 1972 to 1973? | SELECT T1.name FROM teams AS T1 INNER JOIN ( SELECT * FROM teams WHERE lgID = 'ABA' AND year = 1972 ) AS T2 ON T1.tmID = T2.tmID WHERE T1.lgID = 'ABA' AND T1.year = 1973 ORDER BY (CAST(T1.won AS REAL) / (T1.won + T1.lost) - (CAST(T2.won AS REAL) / (T2.won + T2.lost))) DESC LIMIT 1 |
What country has the largest surface area? | SELECT Name FROM Country ORDER BY SurfaceArea DESC LIMIT 1 |
Which entrant has fewer than 12 points, a Climax engine, and a Lotus 24 chassis? | SELECT entrant FROM table_name_63 WHERE pts < 12 AND engine = "climax" AND chassis = "lotus 24" |
What is the product type code of order item 1? | SELECT production_type_code from Order_Items as T1 join Products as T2 on T1.product_id = T2.product_id where T1.order_item_id = 1 |
Find the id and rank of the team that has the highest average attendance rate in 2014. | SELECT T2.team_id , T2.rank FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id WHERE T1.year = 2014 GROUP BY T1.team_id ORDER BY avg(T1.attendance) DESC LIMIT 1; |
What was the home team's score at the game that had a crowd larger than 24,000? | SELECT home_team AS score FROM table_name_79 WHERE crowd > 24 OFFSET 000 |
Which of Shakespeare's work has chapter description of "A field near Windsor"? | SELECT T2.Title FROM chapters AS T1 INNER JOIN works AS T2 ON T1.work_id = T2.id WHERE T1.Description = 'A field near Windsor.' |
What date has an outcome of runner-up, and a Score of 6–4, 6–2, and a Opponents of gisela dulko flavia pennetta? | SELECT date FROM table_name_42 WHERE outcome = "runner-up" AND score = "6–4, 6–2" AND opponents = "gisela dulko flavia pennetta" |
What is the total of all against values for the Corinthians with less than 3 lost? | SELECT COUNT(against) FROM table_name_4 WHERE team = "corinthians" AND lost < 3 |
What's the number of the horse whose trainer is Kim Bailey? | SELECT MAX(number) FROM table_20095300_1 WHERE trainer = "Kim Bailey" |
What is the date of the game later than week 13 and 41,862 people attended? | SELECT date FROM table_name_62 WHERE week > 13 AND attendance = "41,862" |
How many games had an assist number greater than 54? | SELECT SUM(games) FROM table_name_54 WHERE assist > 54 |
Please list the names of all the awards won by the crew member whose nickname is Doofus. | SELECT T2.award FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T1.nickname = 'Doofus' AND T2.result = 'Winner'; |
Among sales teams in Midwest region, which sales team has an order quantity greater than 5? | SELECT DISTINCT T2.`Sales Team` FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T2.Region = 'Midwest' AND T1.`Order Quantity` > 5 |
What pick was mario williams before 2006? | SELECT SUM(pick) FROM table_name_72 WHERE player_name = "mario williams" AND year < 2006 |
and the chargeable amount for these? | SELECT chargeable_amount FROM Parts AS T1 JOIN Asset_Parts AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_name |
Name the 26 august 2005 asian record | SELECT 26 AS _august_2005 FROM table_24011830_2 WHERE world_record = "Asian record" |
Show the No.3 character name in the credit list of the movie "G.I. Joe: The Rise of Cobra". | SELECT T2.`Character Name` FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID WHERE T1.Title = 'G.I. Joe: The Rise of Cobra' AND T2.creditOrder = '3' |
Which opponent was a runner-up on 2 march 1998? | SELECT opponent_in_the_final FROM table_name_6 WHERE outcome = "runner-up" AND date = "2 march 1998" |
What is the date assigned from and date assigned to sales person? | SELECT date_assigned_from,date_assigned_to FROM Staff_Department_Assignments where job_title_code = "Sales Person" |
What is the series code for Germany and what is its description? | SELECT T1.Seriescode, T1.Description FROM CountryNotes AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.ShortName = 'Germany' |
What is Myron Pryor Hometown? | SELECT Hometown FROM member where name = 'Myron Pryor' |
what is the city area of Bahawalnagar District | SELECT city_area FROM district where District_name = "Bahawalnagar District" |
How many professors who has a either Ph.D. or MA degree? | SELECT count(*) FROM professor WHERE prof_high_degree = 'Ph.D.' OR prof_high_degree = 'MA' |
What game type is Works of Widenius? | SELECT GType FROM Video_games where GName = "Works of Widenius" |
What is the birth date of the member with the Defining characteristic of pink hair? | SELECT birthdate FROM table_name_63 WHERE defining_characteristics = "pink hair" |
What is the pos with weight less than 205? | SELECT pos FROM table_name_37 WHERE weight < 205 |
Which employee has the lowest job level. State the first name, last name and when he /she was hired. | SELECT fname, lname, hire_date FROM employee ORDER BY job_lvl LIMIT 1 |
How many "5" star reviews does the Yelp business No. "10682" get? | SELECT COUNT(review_length) FROM Reviews WHERE business_id = 10682 AND review_stars = 5 |
Which Baltimore group is of the retroviridae family? | SELECT baltimore_group FROM table_name_62 WHERE family = "retroviridae" |
Among the artists from 1980 to 1982. Which artist was tagged as "disco"? | SELECT T1.artist FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'disco' AND T1.groupYear BETWEEN 1980 AND 1982 |
What are the ids of documents with the letter 's' in the name with any expense budgets? | SELECT T1.document_id FROM Documents AS T1 JOIN Documents_with_expenses AS T2 ON T1.document_id = T2.document_id WHERE T1.document_name LIKE '%s%' |
Where did Geelong play as the home team? | SELECT venue FROM table_name_4 WHERE home_team = "geelong" |
Show me the name of the store name with dept store id 1? | Do you mean dept store chain name? | yes | SELECT dept_store_chain_name from Department_Store_Chain where
dept_store_chain_id = 1 |
What is the record on March 16? | SELECT record FROM table_name_66 WHERE date = "march 16" |
When did the team score 21 goals? | SELECT date FROM table_name_67 WHERE goal = 21 |
Name the results for institutional authority of paf | SELECT results FROM table_name_73 WHERE institutional_authority = "paf" |
What is Fleet Number(s), when Wheel Arrangement is "2-6-0", and when Class is "Z"? | SELECT fleet_number_s_ FROM table_name_98 WHERE wheel_arrangement = "2-6-0" AND class = "z" |
How many flights depart from 'APG'? | SELECT COUNT(*) FROM FLIGHTS WHERE SourceAirport = "APG" |
Which MLS Team's pick number was 31? | SELECT mls_team FROM table_name_69 WHERE pick__number = 31 |
What is Date, when Team is Holden Racing Team, and when Circuit is Eastern Creek Raceway? | SELECT date FROM table_name_40 WHERE team = "holden racing team" AND circuit = "eastern creek raceway" |
Thank you very much. This will be my last question, could you please show me the name of female students who are majoring in 520, if there are any? | Did you mean the full name about those ? | yes please, first and last name would be great. | select Fname , Lname FROM Student where Sex = 'F' and Major = 520 |
What is the highest rated West Lancashire with a Pendle greater than 1 and a Rossendale more than 2? | SELECT MAX(west_lancashire) FROM table_name_15 WHERE pendle > 1 AND rossendale > 2 |
When is the date of vacancy of Davy Fitzgerald being a replacement? | SELECT date_of_vacancy FROM table_11190568_7 WHERE replaced_by = "Davy FitzGerald" |
How many people attended the game that ended 4-6? | SELECT COUNT(attendance) FROM table_name_15 WHERE score = "4-6" |
In the calls from the mountain division, how many are from teenage clients? | SELECT COUNT(T1.age) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.age BETWEEN 12 AND 20 AND T2.division = 'Mountain' |
What the listed in round when the hawthorn score is 17.7.109? | SELECT MAX(round) FROM table_28211103_1 WHERE hawthorn_score = "17.7.109" |
How many departments are in the division AS? | SELECT count(*) FROM DEPARTMENT WHERE Division = "AS" |
Show the headquarters that have at least two companies. | SELECT Headquarters FROM company GROUP BY Headquarters HAVING COUNT(*) >= 2 |
What are the titles of all movies that James Cameron directed after 2000? | SELECT title FROM Movie WHERE director = 'James Cameron' AND YEAR > 2000 |
What are the distinct address type codes for all customer addresses? | SELECT DISTINCT address_type_code FROM customer_addresses |
What is the Attendance of the game with a Result of L 20-14? | SELECT attendance FROM table_name_46 WHERE result = "l 20-14" |
What was the tier versus Annalisa bona? | SELECT tier FROM table_name_59 WHERE opponent_in_the_final = "annalisa bona" |
What were the high points on May 12? | SELECT high_points FROM table_name_4 WHERE date = "may 12" |
Name the host for prime | SELECT host_s_ FROM table_16884579_1 WHERE network = "Prime" |
How many distinct names are associated with all the photos? | SELECT count(DISTINCT Name) FROM PHOTOS |
Name the location attendance for 10-14 | SELECT location_attendance FROM table_23248940_7 WHERE record = "10-14" |
Among the books purchased by less than 1 dollar, what is the difference between the number of books with less than 500 pages and books with greater than 500 pages? | SELECT SUM(CASE WHEN T1.num_pages < 500 THEN 1 ELSE 0 END) - SUM(CASE WHEN T1.num_pages > 500 THEN 1 ELSE 0 END) AS dif FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id WHERE T2.price < 1 |
What is the female rank in Karnataka? | SELECT females_rank FROM table_14785903_1 WHERE states = "Karnataka" |
What is the police force of counties on the east side? | SELECT Police_force FROM county_public_safety WHERE LOCATION = "East" |
List all countries and their number of airlines in the descending order of number of airlines. | SELECT country , count(*) FROM airlines GROUP BY country ORDER BY count(*) DESC |
If Jose Rodriguez tried his best, how many percentage can his salary raise without changing his position? | SELECT 100 * (CAST(REPLACE(SUBSTR(T2.maxsalary, 4), ',', '') AS REAL) - CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL)) / CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL) AS per FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T1.firstname = 'Jose' AND T1.lastname = 'Rodriguez' |
How many players are playing for the listed colleges? | SELECT college, count ( * ) FROM match_season group by college |
What are the names of festivals held in year 2007? | SELECT Festival_Name FROM festival_detail WHERE YEAR = 2007 |
What was the location with the 24-21 result? | SELECT location FROM table_name_54 WHERE result = "24-21" |
Tell the abbreviation for "Delaware" state. | SELECT T FROM ( SELECT DISTINCT CASE WHEN state = 'Delaware' THEN state_abbr ELSE NULL END AS T FROM state_sector_grads ) WHERE T IS NOT NULL |
What are the names and decor of rooms with a king bed? Sort them by their price | SELECT roomName , decor FROM Rooms WHERE bedtype = 'King' ORDER BY basePrice; |
What was the surface on 23 October 2011? | SELECT surface FROM table_name_97 WHERE date = "23 october 2011" |
When the driver mike hailwood has a grid greater than 12 and a Time/Retired of + 2 laps, what is the average number of laps? | SELECT AVG(laps) FROM table_name_96 WHERE time_retired = "+ 2 laps" AND driver = "mike hailwood" AND grid > 12 |
What city is the school that had less than 17 titles in boys basketball with the last title being after 2005? | SELECT city FROM table_name_86 WHERE _number_of_titles < 17 AND last > 2005 AND sport = "boys basketball" |
How many results do Ellery and Frankie have? | SELECT COUNT(result) FROM table_19744915_15 WHERE couple = "Ellery and Frankie" |
When was the school whose students are nicknamed Rams founded? | SELECT MAX(founded) FROM table_1969577_3 WHERE nickname = "Rams" |
What is the highest average a contestant from Iowa with a swimsuit smaller than 9.267 has? | SELECT MAX(average) FROM table_name_14 WHERE state = "iowa" AND swimsuit < 9.267 |
What is Score, when To Par is "E"? | SELECT score FROM table_name_8 WHERE to_par = "e" |
What is the highest bronze number when silver is 0, and the total is smaller than 1? | SELECT MAX(bronze) FROM table_name_92 WHERE silver = 0 AND total < 1 |
Which business ID received the review of 4 star and above by 65% of user? Describe their active status and city. | SELECT DISTINCT T2.business_id, T2.city FROM Reviews AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id WHERE T1.review_stars >= 4 AND ( SELECT CAST(( SELECT COUNT(DISTINCT T1.user_id) FROM Reviews AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id WHERE T1.review_stars >= 4 ) AS REAL) * 100 / ( SELECT COUNT(user_id) FROM Users ) > 65 ) |
How many problems have been reported under staff ID 10? | SELECT count ( * ) FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_id = "10" |
Can you display the address id associated with the city of Damianfort? | SELECT address_id FROM Addresses WHERE city = "Damianfort" |
List the asset id, details, make and model for every asset. | SELECT asset_id , asset_details , asset_make , asset_model FROM Assets |
Name the least join date | SELECT MIN(join_date) FROM table_26466528_1 |
How much is the track Fast As a Shark? | SELECT unit_price FROM tracks WHERE name = "Fast As a Shark"; |
What is the location code for the country "Canada"? | SELECT location_code FROM Ref_locations WHERE location_name = "Canada" |
Which Republican has a District of 10? | SELECT republican FROM table_name_26 WHERE district = 10 |
State the number of addresses in the Nordrhein-Westfalen district. | SELECT COUNT(address_id) FROM address WHERE district = 'Nordrhein-Westfalen' |
Show the distinct director of films with market estimation in the year of 1995. | SELECT DISTINCT T1.Director FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID WHERE T2.Year = 1995 |
Find the details for all chip models. | SELECT * FROM chip_model |
How many students belong to 1 club? | select count ( * ) from ( select stuid from member_of_club group by stuid having count ( * ) = 1 ) |
Based on the credits, state how many roles were played in the 5th episode of simpson 20. | SELECT COUNT(DISTINCT T2.role) FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T1.episode = 5; |
Show the names of people, and dates and venues of debates they are on the negative side, ordered in ascending alphabetical order of name. | SELECT T3.Name , T2.Date , T2.Venue FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Negative = T3.People_ID ORDER BY T3.Name ASC |
How many users in user group M23-26 use a vivo device? | SELECT COUNT(T2.device_id) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T1.`group` = 'M23-26' AND T2.phone_brand = 'vivo' |
What were the wounded for complement of 46 off 656 men? | SELECT wounded FROM table_11793221_4 WHERE complement = "46 off 656 men" |
What year was the name mount roskill grammar school? | SELECT years FROM table_name_35 WHERE name = "mount roskill grammar school" |
What are the names of people in ascending alphabetical order? | SELECT Name FROM People ORDER BY Name ASC |
Who wrote episode number 48 | SELECT written_by FROM table_20098479_1 WHERE no_in_series = 48 |
What are the names of the different departments? | SELECT DISTINCT dept_name FROM course |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.