sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
Who is Birmingham City's outgoing manager? | SELECT outgoing_manager FROM table_name_12 WHERE team = "birmingham city" |
Which club has fewer than 40 seasons in Liga MX and 65 seasons in the top division? | SELECT club FROM table_name_32 WHERE number_of_seasons_in_liga_mx < 40 AND number_of_seasons_in_top_division = 65 |
Which is the country of the city named "Rajkot"? | SELECT T1.Country_Name FROM Country AS T1 INNER JOIN city AS T2 ON T1.Country_Id = T2.Country_Id WHERE city_name = 'Rajkot' |
what are the names of the payment method of customers who have both mailshot in 'Order' outcome and mailshot in 'No response' outcome. | SELECT T2.customer_name , T2.payment_method FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.outcome_code = 'Order' INTERSECT SELECT T2.customer_name , T2.payment_method FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.outcome_code = 'No Response' |
How many tracks does each genre have and what are the names of the top 5? | SELECT T1.name , COUNT(*) FROM genres AS T1 JOIN tracks AS T2 ON T2.genre_id = T1.id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 5; |
Show names of pilots that have more than one record. | SELECT T2.Pilot_name, COUNT(*) FROM pilot_record AS T1 JOIN pilot AS T2 ON T1.pilot_ID = T2.pilot_ID GROUP BY T2.Pilot_name HAVING COUNT(*) > 1 |
How many clubs are there? | SELECT count(*) FROM club |
Tell me the class time for class section 3 ? | SELECT CLASS_TIME FROM CLASS where CLASS_SECTION = 3 |
what are the details of the lots which are not used in any transactions? | SELECT lot_details FROM Lots EXCEPT SELECT T1.lot_details FROM Lots AS T1 JOIN transactions_lots AS T2 ON T1.lot_id = T2.lot_id |
Which To par has a Player of momoko ueda? | SELECT to_par FROM table_name_64 WHERE player = "momoko ueda" |
What is the smallest grid for Bob Anderson? | SELECT MIN(grid) FROM table_name_89 WHERE driver = "bob anderson" |
What was the result of the game on week 4? | SELECT result FROM table_name_37 WHERE week = 4 |
I want the driver with Laps larger than 16 with a ferrari and grid less than 15 | SELECT driver FROM table_name_44 WHERE laps > 16 AND constructor = "ferrari" AND grid < 15 |
What is the engineer visit id of that fault log entry id? | SELECT T2.engineer_visit_id FROM Fault_Log AS T1 JOIN Engineer_Visits AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id where T2.fault_log_entry_id = ( SELECT T1.fault_log_entry_id FROM Fault_Log AS T1 JOIN Engineer_Visits AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id GROUP BY T1.fault_log_entry_id ORDER BY count ( * ) DESC LIMIT 1 ) |
How many buildings are in the list? | SELECT count ( DISTINCT building ) FROM classroom |
Where is john daly of united states from? | SELECT place FROM table_name_77 WHERE country = "united states" AND player = "john daly" |
List the car's name with a price worth greater than 85% of the average price of all cars. | SELECT T1.car_name FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T2.price * 100 > ( SELECT AVG(price) * 85 FROM price ) |
What was the winning score when the runner-up was Neal Briggs? | SELECT winning_score FROM table_name_9 WHERE runner_s__up = "neal briggs" |
On what date did Gunnar Nilsson make the fastest lap? | SELECT date FROM table_name_38 WHERE fastest_lap = "gunnar nilsson" |
What was the winning score of the event where Brian Kamm was the runner-up? | SELECT winning_score FROM table_name_47 WHERE runner_s__up = "brian kamm" |
Name the Rank of Rank Mountain Peak of crested butte pb? | SELECT rank FROM table_name_43 WHERE mountain_peak = "crested butte pb" |
How many parties have at least two records? | SELECT COUNT ( * ) FROM ( SELECT Party FROM party GROUP BY Party HAVING COUNT ( * ) > = 2 ) |
List down the inspection ID with the inspector's comment "A certified food service manager must be present in all establishments at which potentially hazardous food is prepared or served. NO CERTIFIED FOOD MANAGER ON DUTY AT THIS TIME FOODS ARE COOKED AND SERVED SERIOUS CITATION ISSUED" and inspection category of Personnel. | SELECT T2.inspection_id FROM inspection_point AS T1 INNER JOIN violation AS T2 ON T1.point_id = T2.point_id WHERE T1.category = 'Personnel' AND T2.inspector_comment = 'A certified food service manager must be present in all establishments at which potentially hazardous food is prepared or served.FOUND NO CITY OF CHICAGO SANITATION CERTIFICATE POSTED OR VALID DOCUMENTATION DURING THIS INSPECTION.' |
What was Mike Hailwood's highest laps when he had a grid more than 7? | SELECT MAX(laps) FROM table_name_16 WHERE driver = "mike hailwood" AND grid > 7 |
In what district was John E. Miller the incumbent? | SELECT district FROM table_1342338_5 WHERE incumbent = "John E. Miller" |
What is the full name of the employee that inspected establishments with license 1334073? | SELECT DISTINCT T1.first_name, T1.last_name FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.license_no = 1334073 |
How many counties have a population of 2266? | SELECT COUNT(county) FROM table_22815568_3 WHERE population = 2266 |
What is the PreferredVendorStatus for the company which has the rowguid of "684F328D-C185-43B9-AF9A-37ACC680D2AF"? | SELECT T1.PreferredVendorStatus FROM Vendor AS T1 INNER JOIN BusinessEntity AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.rowguid = '684F328D-C185-43B9-AF9A-37ACC680D2AF' |
What are the paper id of Gibbons? | SELECT DISTINCT paperID FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid WHERE t1.lname = "Gibbons" |
What is the earliest year the world junior championships has 1500 m notes? | SELECT MIN(year) FROM table_name_85 WHERE notes = "1500 m" AND competition = "world junior championships" |
What was the score in the final when the outcome was winner in 1989? | SELECT score_in_the_final FROM table_23235546_1 WHERE outcome = "Winner" AND year = 1989 |
What are their majors? | SELECT T2.major FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.onscholarship = 'Y' |
What was the sum total of the region after 1976 when Mareeba had population was more than 18,212? | SELECT SUM(population__region_total_) FROM table_name_1 WHERE year > 1976 AND population__mareeba_ > 18 OFFSET 212 |
For player Les Ames, what was the venue? | SELECT venue FROM table_name_29 WHERE player = "les ames" |
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 Viewers (m) has a Rating of 1.7, and an Episode of the game of life? | SELECT MAX(viewers__m_) FROM table_name_54 WHERE rating = "1.7" AND episode = "the game of life" |
Which club is located in Thomson, Victoria? | SELECT club FROM table_name_15 WHERE location = "thomson, victoria" |
What are the complaint id of client who were born in 1931? | SELECT T2.`Complaint ID` FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T1.year = 1931 |
What are their founder names? | select Name from Manufacturers |
List the names of players that do not have coaches. | SELECT Player_name FROM player WHERE Player_ID NOT IN (SELECT Player_ID FROM player_coach) |
what is the diameter (km) of the feature of latitude 23.0s | SELECT diameter__km_ FROM table_16799784_7 WHERE latitude = "23.0S" |
What event did Mikhail Avetisyan win by method of DQ (eye gouging)? | SELECT event FROM table_name_98 WHERE method = "dq (eye gouging)" |
How many employees have salary between 100000 and 200000? | SELECT count(*) FROM Employee WHERE salary BETWEEN 100000 AND 200000 |
What country was the player, rod pampling, from who placed t10? | SELECT country FROM table_name_43 WHERE place = "t10" AND player = "rod pampling" |
Can you show me the carriers that have phones with memories smaller than 32? | SELECT Carrier FROM phone WHERE Memory_in_G < 32 |
Which Year has a Category of best original song (รอเธอหันมา – โฟกัส จิระกุล)? | SELECT MAX(year) FROM table_name_58 WHERE category = "best original song (รอเธอหันมา – โฟกัส จิระกุล)" |
What is the name of the customer who has the largest number of orders? | SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1 |
Who has friends that are younger than the average age? | SELECT DISTINCT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age < ( SELECT avg ( age ) FROM person ) |
How many resorts have 118 runs? | SELECT COUNT(name) FROM table_25762852_1 WHERE runs = "118" |
Find the id of the pet owned by student whose last name is ‘Smith’. | SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith' |
Who was the runner-up at the South Florida Semi-Finalist #1? | SELECT runner_up FROM table_name_96 WHERE semi_finalist__number1 = "south florida" |
How many dates did Daniel Ruiz win the Spanish Grand Prix? | SELECT COUNT(date) FROM table_28925058_1 WHERE grand_prix = "Spanish grand_prix" AND race_winner = "Daniel Ruiz" |
Name the publisher of the Chronicles of the Sword game. | SELECT T3.publisher_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id WHERE T1.game_name = 'Chronicles of the Sword' |
Which High points have High rebounds of lamar odom (15), and a Date of april 27? | SELECT high_points FROM table_name_80 WHERE high_rebounds = "lamar odom (15)" AND date = "april 27" |
What is the minimum, maximum, and average seating for all tracks. | SELECT MIN(seating), MAX(seating), AVG(seating) FROM track |
What episode has 7.8 million viewers? | SELECT episode FROM table_name_13 WHERE viewers__in_millions_ = "7.8" |
Provide the names of podcasts in the art category in 2018. | SELECT DISTINCT T2.title FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'arts' AND T2.created_at LIKE '2018-%' |
What is the division with wins of 2? | SELECT division FROM table_name_76 WHERE wins = "2" |
what day did the team go to toronto | SELECT date FROM table_name_97 WHERE visitor = "toronto" |
What is title of album which track Balls to the Wall belongs to? | SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id WHERE T2.name = "Balls to the Wall"; |
How many faculty members participate in an activity? | SELECT count(DISTINCT FacID) FROM Faculty_participates_in |
What is the largest number of silver that had 0 bronzes and total less than 1? | SELECT MAX(silver) FROM table_name_67 WHERE bronze = 0 AND total < 1 |
Which Top-5 is the lowest one that has Wins smaller than 0? | SELECT MIN(top_5) FROM table_name_27 WHERE wins < 0 |
What is the perfect stem for the word that has a future stem of emango? | SELECT perfect_stem FROM table_name_79 WHERE future_stem = "emango" |
What is the varsity name of the university of mcgill university? | SELECT varsity_name FROM table_27369069_4 WHERE university = "McGill university" |
What is the genre of the game developed by Nintendo EAD? | SELECT genre FROM table_name_85 WHERE developer_s_ = "nintendo ead" |
What is the event # when the winner is what is 7x6? | SELECT event__number FROM table_22050544_1 WHERE winner = "what is 7x6" |
Where are those companies' headquarters located? | SELECT company,headquarters from company where main_industry = "Banking" |
Report the total number of students for each fourth-grade classroom. | SELECT classroom, COUNT(*) FROM list WHERE grade = "4" GROUP BY classroom |
In the year that the Montreal Canadiens had 24 penalty minutes in the Stanley Cup finals, how many wins did the team had in total? | SELECT T2.W FROM Teams AS T1 INNER JOIN TeamsSC AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.name = 'Montreal Canadiens' AND T2.PIM = 24 |
What was the first year that had a prize of 50,000? | SELECT first_year_aired FROM table_name_28 WHERE prize = "50,000" |
What is the lowest decile that Ohau School has? | SELECT MIN(decile) FROM table_name_10 WHERE name = "ohau school" |
How many burglaries occurred in the city where the violent crime rate was 974.7? | SELECT burglary FROM table_1818254_1 WHERE violent_crime = "974.7" |
What Score has a Record of 35-28-6? | SELECT score FROM table_name_65 WHERE record = "35-28-6" |
What country has a less than 136.1 total and a 0.02 solar? | SELECT country FROM table_name_38 WHERE total < 136.1 AND solar = 0.02 |
What are the names of the mills which are not located in 'Donceel'? | SELECT name FROM mill WHERE LOCATION != 'Donceel' |
Can you list all of the members? | SELECT * FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid |
Which language do 1% of males speak? | SELECT percentage___percentage_ FROM table_name_31 WHERE males = "1" |
Return the maximum and minimum population among all counties. | SELECT max(Population) , min(Population) FROM county |
find the names of people who are taller than 200 or lower than 190. | SELECT name FROM people WHERE height > 200 OR height < 190 |
What is the least game that was played in Alexander Memorial Coliseum on October 16? | SELECT MIN(game) FROM table_name_98 WHERE location_attendance = "alexander memorial coliseum" AND date = "october 16" |
what tims is wed may 28 and mon may 26 is 17' 58.34 125.960mph? | SELECT wed_28_may FROM table_14209455_1 WHERE mon_26_may = "17' 58.34 125.960mph" |
List all the log ids and their descriptions from the problem logs. | SELECT problem_log_id , log_entry_description FROM problem_log |
List all living goalies who have greater than 50% wins among all games played. State their last name and first name. | SELECT T1.firstName, T1.lastName FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T1.deathYear IS NOT NULL GROUP BY T1.playerID HAVING CAST(SUM(T2.Min) AS REAL) / SUM(T2.GP) > 0.5 |
Name the driver/passenger for position 8 | SELECT driver___passenger FROM table_16729457_16 WHERE position = 8 |
show me a list of original air date? | select original_air_date from film |
Who is the runner(s)-up with a winning score of −5 (72-71-68=211)? | SELECT runner_s__up FROM table_name_48 WHERE winning_score = −5(72 - 71 - 68 = 211) |
What are their photo names? | SELECT T1.name from photos as T1 join camera_lens as T2 on T1.camera_lens_id = T2.id where T2.brand = 'Sigma' |
Among the players that went to high school in New York and have won the MVP, what is their average height? | SELECT AVG(T1.height) FROM players AS T1 INNER JOIN awards_players AS T2 ON T1.playerID = T2.playerID WHERE T2.award = 'Most Valuable Player' AND T1.birthCity = 'New York' |
What record has points less than 16, and detroit as the home? | SELECT record FROM table_name_13 WHERE points < 16 AND home = "detroit" |
What's the sum of tie no for home team burgess hill town? | SELECT SUM(tie_no) FROM table_name_76 WHERE home_team = "burgess hill town" |
find the name of employee who was awarded the most times in the evaluation. | SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID GROUP BY t2.Employee_ID ORDER BY count(*) DESC LIMIT 1 |
what is the highest city population? | SELECT max ( City_Population ) FROM district |
What are the colors of Howard Hall? | SELECT colors FROM table_15873547_1 WHERE residence_hall = "Howard Hall" |
What was the date of the Cross Code debut that had an Int'l Debut in the year 2008? | SELECT date FROM table_name_20 WHERE year = "2008" |
How many games in 1885 postseason resulted in ties (that is, the value of "ties" is '1')? | SELECT COUNT(*) FROM postseason WHERE YEAR = 1885 AND ties = 1 |
What are their ages? | SELECT age FROM artist WHERE artist_id NOT IN ( SELECT artist_id FROM exhibition ) |
What rooms do they live in? Please add it to the table. | SELECT Fname , Lname, room FROM FACULTY WHERE sex = "M" AND Building = "NEB" |
How many numbers in series were for the number in season of 8? | SELECT COUNT(no_in_series) FROM table_2618119_1 WHERE no_in_season = 8 |
when were they built? | SELECT built FROM railway WHERE Railway_ID not IN ( SELECT Railway_ID FROM train ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.