sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
Find the first name of students who is older than 20. | SELECT fname FROM student WHERE age > 20 |
Who was the election winner with a BJP incumbent in Chhattisgarh? | SELECT election_winner FROM table_name_77 WHERE incumbent = "bjp" AND state = "chhattisgarh" |
What day was a friendly game held that had a score of 2:3? | SELECT date FROM table_name_87 WHERE type_of_game = "friendly" AND results¹ = "2:3" |
How many points were scored by the player who played 348 games? | SELECT points FROM table_name_30 WHERE games = "348" |
What is the location of the bridge named 'Kolob Arch' or 'Rainbow Bridge'? | SELECT LOCATION FROM bridge WHERE name = 'Kolob Arch' OR name = 'Rainbow Bridge' |
Which title had rank 9? | SELECT title FROM table_name_28 WHERE rank = 9 |
Which round was played on 10 May? | SELECT round FROM table_name_91 WHERE date = "10 may" |
what is the name of the product with the lowest price? | SELECT product_name from products order by product_price limit 1 |
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 |
Could you order those by average share count, please? | SELECT investor_id , avg ( share_count ) FROM TRANSACTIONS GROUP BY investor_id ORDER BY avg ( share_count ) |
Which artist has the most albums? | SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId GROUP BY T2.Name ORDER BY COUNT(*) DESC LIMIT 1 |
Find the "date became customers" of the customers whose ID is between 10 and 20. | SELECT date_became_customer FROM customers WHERE customer_id BETWEEN 10 AND 20 |
Which campus has the most faculties in year 2003? | SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2003 ORDER BY T2.faculty DESC LIMIT 1 |
Show all opening years and the number of churches that opened in that year. | SELECT open_date , count(*) FROM church GROUP BY open_date |
How many business have been reviewed by user ID 3 and how long have this user been with Yelp? | SELECT COUNT(T1.business_id) , strftime('%Y', 'now') - T2.user_yelping_since_year FROM Reviews AS T1 INNER JOIN Users AS T2 ON T1.user_id = T2.user_id WHERE T1.user_id = 3 |
How many members of "Bootup Baltimore" are older than 18? | SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Bootup Baltimore" AND t3.age > 18 |
What is the Population where the Median House-hold Income is $25,016? | SELECT MIN(population) FROM table_name_59 WHERE median_house__hold_income = "$25,016" |
When did Robert G. Miner present his credentials? | SELECT presentation_of_credentials FROM table_name_62 WHERE name = "robert g. miner" |
What was the result of Robert L. F. Sikes' election bid? | SELECT result FROM table_1342256_10 WHERE incumbent = "Robert L. F. Sikes" |
What type did match ID 336000 win? | SELECT T2.Win_Type FROM Match AS T1 INNER JOIN Win_By AS T2 ON T1.Win_Type = T2.Win_Id WHERE T1.Match_Id = 336000 |
Can you show the Name of the Products of Code 1? | SELECT Name FROM Products WHERE Code = 1 |
What is the task of the method whose tokenized name is "online median filter test median window filling"? | SELECT SUBSTR(SUBSTR(Name, INSTR(Name, '.') + 1), 1, INSTR(SUBSTR(Name, INSTR(Name, '.') + 1), '.') - 1) task FROM Method WHERE NameTokenized = 'online median filter test median window filling' |
Which project made the most number of outcomes? List the project details and the project id. | SELECT T1.project_details , T1.project_id FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY count(*) DESC LIMIT 1; |
Show the names of members and the locations of colleges they go to in ascending alphabetical order of member names. | SELECT T2.Name , T1.College_Location FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID ORDER BY T2.Name ASC |
What are the names of wines whose production year are before the year of all wines by Brander winery? | SELECT Name FROM WINE WHERE YEAR < (SELECT min(YEAR) FROM WINE WHERE Winery = "Brander") |
Among all students, calculate the percentage of disabled students. | SELECT CAST(COUNT(T2.name) AS REAL) * 100 / COUNT(T1.name) FROM person AS T1 LEFT JOIN disabled AS T2 ON T2.name = T1.name |
What is the lowest overall pick for a player from Washington? | SELECT MIN(overall) FROM table_name_11 WHERE college = "washington" |
What is the sum of goals scored for the Al Wahda team with less than 4 drawn and more than 22 plays? | SELECT SUM(goals_for) FROM table_name_6 WHERE drawn < 4 AND team = "al wahda" AND played > 22 |
Find the average and total capacity of dorms for the students with gender X. | SELECT avg(student_capacity) , sum(student_capacity) FROM dorm WHERE gender = 'X' |
What is the degree summary name that has the most number of students enrolled? | SELECT T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_summary_name ORDER BY count(*) DESC LIMIT 1 |
What is the total medals in 1964? | SELECT MIN(total) FROM table_name_24 WHERE year_s__won = "1964" |
What is the number of routes whose destinations are Italian airports? | SELECT count(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid WHERE T2.country = 'Italy' |
How many directors are on the list? | SELECT count ( director ) FROM Movie |
Which Season has a Final Place of 8th and 8 Podiums? | SELECT season FROM table_name_79 WHERE final_placing = "8th" AND podiums = "8" |
What is the Result F-A that was the quarter-final first leg round with a H/A of h? | SELECT result_f_a FROM table_name_96 WHERE h___a = "h" AND round = "quarter-final first leg" |
How many Deciles are coed? | SELECT COUNT(decile) FROM table_name_51 WHERE gender = "coed" |
What is the average score of player lee trevino, who has a t8 place? | SELECT AVG(score) FROM table_name_39 WHERE place = "t8" AND player = "lee trevino" |
For which team did Adidas manufacture kits and TDK sponsor shirts? | SELECT team FROM table_name_75 WHERE kit_manufacturer = "adidas" AND shirt_sponsor = "tdk" |
When the pole is larger than 0 and the podium is less than 44, with a race number less than 16, what is the FLap? | SELECT flap FROM table_name_79 WHERE pole > 0 AND podium < 44 AND race < 16 |
which company is highest assets value | SELECT NAME FROM Companies ORDER BY Assets_billion DESC LIMIT 1 |
What is the fewest mintage from Dora de Pédery-Hunt, and the year was before 2002? | SELECT MIN(mintage) FROM table_name_93 WHERE artist = "dora de pédery-hunt" AND year < 2002 |
tell the final for lindsey graham | SELECT result FROM table_1133844_4 WHERE senator = "Lindsey Graham" |
Name the chinese with subject of adjectives, adverbs, mostly with reduplication | SELECT chinese FROM table_name_50 WHERE subject = "adjectives, adverbs, mostly with reduplication" |
What is Outcome, when Surface is "Carpet (I)", and when Date is "15 November 1993"? | SELECT outcome FROM table_name_32 WHERE surface = "carpet (i)" AND date = "15 november 1993" |
Who made the purchase order with the greatest total due before freight? Indicate her employee ID and calculate for his/her age when he/she was hired. | SELECT T2.BusinessEntityID, STRFTIME('%Y', T2.HireDate) - STRFTIME('%Y', T2.BirthDate) FROM PurchaseOrderHeader AS T1 INNER JOIN Employee AS T2 ON T1.EmployeeID = T2.BusinessEntityID ORDER BY T1.TotalDue DESC LIMIT 1 |
Which nominees have nominated musicals for "Tony Award"? | SELECT distinct Nominee FROM musical WHERE Award = "Tony Award" |
Provide the full name of the employee who processed the sales order with ID 10274. | SELECT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderID = 10274 |
How many goals occurred with Diego Milito in a debut year later than 2008? | SELECT COUNT(goals) FROM table_name_40 WHERE name = "diego milito" AND debut_year > 2008 |
Who is the heaviest player? State player ID of 5 heaviest players. | SELECT playerID FROM Master ORDER BY weight DESC LIMIT 5 |
What is every country with a TV network of AXN India? | SELECT country FROM table_18821196_1 WHERE tv_network_s_ = "AXN India" |
Which apps have multiple genres and what is the total sentiment subjectivity of these apps? | SELECT SUM(T2.Sentiment_Subjectivity) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Genres > 1 |
Nationality of england, and a Matches smaller than 510, and a Lost of 4, and a Win % smaller than 28.6 had what lowest drawn? | SELECT MIN(drawn) FROM table_name_5 WHERE nationality = "england" AND matches < 510 AND lost = 4 AND win__percentage < 28.6 |
Which city has spanish news on the website ultimahora.com ? | SELECT city FROM table_name_3 WHERE language = "spanish" AND website = "ultimahora.com" |
What is the laops of marcis auto racing? | SELECT laps FROM table_12001616_4 WHERE entrant = "Marcis Auto Racing" |
How many stories were done in 2008 with a 16 rank? | SELECT COUNT(stories) FROM table_name_85 WHERE completed = 2008 AND rank = "16" |
What is the maximum and minimum height of all players? | SELECT max(weight) , min(weight) FROM Player |
Can you list the loan types, branch names and ids, and loan amounts? | Did you mean the Ids of the branches? | Yes, please. | SELECT T2.loan_type, T1.bname, T2.branch_ID, T2.amount FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id GROUP BY T1.bname |
Where did the player with a transfer type, a summer transfer window, and ended before 2013 move from? | SELECT moving_from FROM table_name_38 WHERE type = "transfer" AND transfer_window = "summer" AND ends < 2013 |
and which contract id is associated with that contract | SELECT T2.maintenance_contract_id FROM Third_Party_Companies AS T1 JOIN Maintenance_Contracts AS T2 ON T1.company_id = T2.maintenance_contract_company_id ORDER BY T2.contract_start_date ASC LIMIT 1 |
Please show the different statuses of cities and the average population of cities with each status. | SELECT Status , avg(Population) FROM city GROUP BY Status |
Which Field has a Discovery of na, and an Operator(s) of woc, and a Geological Trend of western | SELECT field FROM table_name_15 WHERE discovery = "na" AND operator_s_ = "woc" AND geological_trend = "western" |
The album titled I had what chart positions? | SELECT chart_positions FROM table_name_21 WHERE album_title = "i" |
what was the largest attendance at kardinia park? | SELECT MAX(crowd) FROM table_name_74 WHERE venue = "kardinia park" |
What Club/province have caps less than 2 and Jonathan Sexton as player? | SELECT club_province FROM table_name_74 WHERE caps < 2 AND player = "jonathan sexton" |
Who is the h.s. principal during 1973-1974? | SELECT hs_principal FROM table_name_81 WHERE year = "1973-1974" |
What is the task of the method that is in the Czech language? | SELECT DISTINCT SUBSTR(SUBSTR(Name, INSTR(Name, '.') + 1), 1, INSTR(SUBSTR(Name, INSTR(Name, '.') + 1), '.') - 1) task FROM Method WHERE Lang = 'cs' |
What is the socket for Order Part Number TMDTL68HAX5DM? | SELECT socket FROM table_name_67 WHERE order_part_number = "tmdtl68hax5dm" |
Which Player has a Place of T2 and a Country listed as Fiji? | SELECT player FROM table_name_33 WHERE place = "t2" AND country = "fiji" |
What is the score of player bob rosburg? | SELECT score FROM table_name_90 WHERE player = "bob rosburg" |
what is the total number of goals for when the ties is more than 0, the goals against is more than 35 and the wins is less than 2? | SELECT COUNT(goals_for) FROM table_name_48 WHERE ties > 0 AND goals_against > 35 AND wins < 2 |
On what date was the record 4-2? | SELECT date FROM table_name_66 WHERE record = "4-2" |
Please list the location and the winning aircraft name. | SELECT T2.Location , T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft |
What is the average number of items shipped each day in April of 1994? | SELECT AVG(l_linenumber) FROM lineitem WHERE l_shipdate BETWEEN '1994-01-01' AND '1994-01-30' |
Name the suppliers that supply products under the category 'cheeses.' | SELECT DISTINCT T1.CompanyName FROM Suppliers AS T1 INNER JOIN Products AS T2 ON T1.SupplierID = T2.SupplierID INNER JOIN Categories AS T3 ON T2.CategoryID = T3.CategoryID WHERE T3.Description = 'Cheeses' |
What are the name, latitude, and city of the station with the lowest latitude? | SELECT name, lat, city FROM station ORDER BY lat LIMIT 1 |
What attendance has detroit lions as the opponent? | SELECT attendance FROM table_name_14 WHERE opponent = "detroit lions" |
When was the oldest one created? | SELECT log_entry_date FROM problem_log ORDER BY log_entry_date asc LIMIT 1 |
Which phone number should I call if I want to reach Nancy Davolio's home? | SELECT HomePhone FROM Employees WHERE LastName = 'Davolio' AND FirstName = 'Nancy' |
Write the title and all the keywords of the episode that was aired on 3/22/2009. | SELECT T1.title, T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.air_date = '2009-03-22'; |
How many students who are female are allergic to milk or eggs? | SELECT count(*) FROM has_allergy AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.sex = "F" AND T1.allergy = "Milk" OR T1.allergy = "Eggs" |
What's the area coordinator for the municipality with 1715 people living in it in 2010? | SELECT area_coordinator FROM table_2402209_1 WHERE population__2010_ = 1715 |
Show the average, minimum, and maximum capacity for all the cinemas opened in year 2011 or later. | SELECT avg(capacity) , min(capacity) , max(capacity) FROM cinema WHERE openning_year >= 2011 |
Which venue did Kolkata Knight Riders play most of their matches as a Team 1? | SELECT T3.Venue_Name FROM Team AS T1 INNER JOIN Match AS T2 ON T1.Team_Id = T2.Team_1 INNER JOIN Venue AS T3 ON T2.Venue_Id = T3.Venue_Id WHERE T1.Team_Name = 'Kolkata Knight Riders' GROUP BY T3.Venue_Id ORDER BY COUNT(T3.Venue_Id) DESC LIMIT 1 |
What was the number of the audience for it? | SELECT num_of_audience FROM festival_detail where year = 2008 |
Return the money rank of the player with the greatest earnings. | SELECT Money_Rank FROM poker_player ORDER BY Earnings DESC LIMIT 1 |
What are the Odds for Trainer Barclay Tagg? | SELECT odds FROM table_name_87 WHERE trainer = "barclay tagg" |
Please list the titles of all the releases with the tag "1980s". | SELECT T1.groupName FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = '1980s' |
List all player names who have an overall rating lower than the average. | SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.overall_rating < ( SELECT avg ( overall_rating ) FROM Player_Attributes ) |
Who was the runner-up on Jan 19, 1964? | SELECT runner_s__up FROM table_name_89 WHERE date = "jan 19, 1964" |
What is the episode title that had a US viewership of 8.16? | SELECT title FROM table_24910737_1 WHERE us_viewers__millions_ = "8.16" |
In what year is the status of won? | SELECT year FROM table_name_72 WHERE status = "won" |
Show me the details for the whole project id of the table "projects" | select Project_ID,Project_Details from Projects |
Which Pick has a Name of ed hickerson, and a Round smaller than 10? | SELECT SUM(pick) FROM table_name_56 WHERE name = "ed hickerson" AND round < 10 |
How many players held the high point records for game 34? | SELECT COUNT(high_points) FROM table_27698941_8 WHERE game = 34 |
What is Score, when Date is "13 March 1985", and when Away Team is "Millwall"? | SELECT score FROM table_name_67 WHERE date = "13 march 1985" AND away_team = "millwall" |
What is the serial number of the pilot car that is black, has a pilot car number larger than 2, and an engine number of 1008? | SELECT serial_no FROM table_name_71 WHERE colour = "black" AND pilot_car_no > 2 AND engine_no = 1008 |
What is the number of races having top 5s over 2 and average starts of 6.5? | SELECT races FROM table_name_51 WHERE top_5 > 2 AND avg_start = 6.5 |
What are the first names and date of birth of professors teaching course ACCT-211? | SELECT DISTINCT T1.EMP_FNAME , T1.EMP_DOB FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE CRS_CODE = "ACCT-211" |
What time did the game start on saturday, april 20? | SELECT kickoff FROM table_24481478_1 WHERE date = "Saturday, April 20" |
What are all the customer phone numbers under the most popular policy type? | SELECT customer_phone FROM available_policies WHERE policy_type_code = (SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.