sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What is the average height of players that have an overall rating lower than the average? | SELECT avg ( T1.height ) 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 ) |
Great. I need to know which first name of the instructor goes with each class and class description. | SELECT T2.emp_fname , T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num |
How many poles has a percentage of 22.08%? | SELECT SUM(poles) FROM table_name_57 WHERE percentage = "22.08%" |
Name the date for 2006 | SELECT date FROM table_2267857_1 WHERE year = 2006 |
Show the average and maximum damage for all storms with max speed higher than 1000. | SELECT avg(damage_millions_USD) , max(damage_millions_USD) FROM storm WHERE max_speed > 1000 |
Which away team had a venue of mcg? | SELECT away_team FROM table_name_90 WHERE venue = "mcg" |
What's the earliest year that Al Michaels was the play-by-play commentator, in which Lesley Visser and Dan Fouts were also sideline reporters? | SELECT MIN(year) FROM table_name_99 WHERE play_by_play = "al michaels" AND sideline_reporter_s_ = "lesley visser and dan fouts" |
Please show the categories of the music festivals with count more than 1. | SELECT Category FROM music_festival GROUP BY Category HAVING COUNT(*) > 1 |
Which countries do not have a stadium that was opened after 2006? | SELECT country FROM stadium EXCEPT SELECT country FROM stadium WHERE opening_year > 2006 |
What is the Name of the power station in the Field of Mokai? | SELECT name FROM table_name_22 WHERE field = "mokai" |
Which game has the highest score in October with 9? | SELECT MAX(october) FROM table_name_41 WHERE game = 9 |
Find the number of followers for each user. | SELECT count(*) FROM follows GROUP BY f1 |
Show the types of ships that have both ships with tonnage larger than 6000 and ships with tonnage smaller than 4000. | SELECT TYPE FROM ship WHERE Tonnage > 6000 INTERSECT SELECT TYPE FROM ship WHERE Tonnage < 4000 |
What is the Date of the Fortified House? | SELECT date FROM table_name_39 WHERE type = "fortified house" |
What is the Essendon Home Team's venue? | SELECT venue FROM table_name_61 WHERE home_team = "essendon" |
Who is the team that has a pick less than 154 and an offensive guard position? | SELECT team FROM table_name_8 WHERE position = "offensive guard" AND pick < 154 |
Province of leinster, and a County of fingal has which irish name? | SELECT irish_name FROM table_name_65 WHERE province = "leinster" AND county = "fingal" |
Name the term in office for liberal and state of sa for ian mclachlan | SELECT term_in_office FROM table_name_27 WHERE party = "liberal" AND state = "sa" AND member = "ian mclachlan" |
What was the home team score when south melbourne was the home team? | SELECT home_team AS score FROM table_name_49 WHERE home_team = "south melbourne" |
What are their respective source system codes? | SELECT t1.master_customer_id,cmi_cross_ref_id,source_system_code FROM Customer_Master_Index as t1 join CMI_Cross_References as t2 on t1.master_customer_id = t2.master_customer_id where t1.cmi_details ! = ( 'Schmidt, Kertzmann and Lubowitz' ) |
What is the an-stem for the word which has an ö-stems of siangar and an u-stem ending of syni? | SELECT masculine_an_stems FROM table_name_18 WHERE feminine_ō_stems = "siangar" AND masculine_u_stems = "syni" |
How many or women? | Did you mean to ask for the number of female assistant professors? | yes, how many are women? | SELECT count ( * ) FROM Faculty WHERE rank = "AsstProf" AND Sex = "F" |
How many players, whose shooting/catching hand is both left and right, debuted their first NHL in 2011? | SELECT COUNT(playerID) FROM Master WHERE shootCatch IS NULL AND firstNHL = '2011' |
Who had the highest assists in game 4? | SELECT high_assists FROM table_11964154_2 WHERE game = 4 |
what is the minimum lowest with highest being 2363 | SELECT MIN(lowest) FROM table_14003020_5 WHERE highest = 2363 |
What is the sum of Bronze when the total is more than 27? | SELECT SUM(bronze) FROM table_name_91 WHERE total > 27 |
Which orchestra has a recording year of 1951? | SELECT orchestra FROM table_222198_1 WHERE year_of_recording = 1951 |
What are the names and year of construction for the mills of 'Grondzeiler' type? | SELECT name , built_year FROM mill WHERE TYPE = 'Grondzeiler' |
What is the type with the fewest games? | SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) LIMIT 1 |
Show minimum ticket prices for exhibitions for all years before 2009? | SELECT min ( ticket_price ) FROM exhibition WHERE YEAR < 2009 |
How many available hotels are there in total? | SELECT count(*) FROM HOTELS |
What date has lost as the result and a competition of friendly with 1-2 as the score? | SELECT date FROM table_name_86 WHERE result = "lost" AND competition = "friendly" AND score = "1-2" |
List the camera lens names containing substring "Digital". | SELECT name FROM camera_lens WHERE name LIKE "%Digital%" |
What is the week number with attendance of 44,132? | SELECT COUNT(week) FROM table_name_2 WHERE attendance = 44 OFFSET 132 |
what is the number of losses with wins less than 4 and goals against more than 39? | SELECT COUNT(losses) FROM table_name_28 WHERE goals_against > 39 AND wins < 4 |
What are the entry names of catalog with the attribute possessed by most entries. | SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.attribute_value = (SELECT attribute_value FROM Catalog_Contents_Additional_Attributes GROUP BY attribute_value ORDER BY count(*) DESC LIMIT 1) |
What is the RR Romaja for the province that has Hangul of 강원도 and capital of Wonsan? | SELECT rr_romaja FROM table_name_85 WHERE hangul_chosongul = "강원도" AND capital = "wonsan" |
Which bowling skills did the players from Zimbabwea have? | SELECT T1.Bowling_skill FROM Bowling_Style AS T1 INNER JOIN Player AS T2 ON T1.Bowling_Id = T2.Bowling_skill INNER JOIN Country AS T3 ON T2.Country_Name = T3.Country_Id WHERE T3.Country_Name = 'Zimbabwea' |
Hello! Can you provide me with a list of all building names? | SELECT name FROM building |
Who were the co-drivers with more than 310 laps and team aston martin racing bms? | SELECT co_drivers FROM table_name_42 WHERE laps > 310 AND team = "aston martin racing bms" |
How many drivers are there? | SELECT COUNT(*) FROM driver |
Which Condition has an unaffected Partial thromboplastin time, Platelet count, and a Prothrombin time? | SELECT condition FROM table_name_46 WHERE partial_thromboplastin_time = "unaffected" AND platelet_count = "unaffected" AND prothrombin_time = "unaffected" |
What is the code of airport that has fewest number of flights? | SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY COUNT(*) LIMIT 1 |
Which country does Žirovnica city belong to? | SELECT T1.country_name FROM country AS T1 INNER JOIN address AS T2 ON T1.country_id = T2.country_id WHERE T2.city = 'Žirovnica' |
What are the numbers of episodes that were broadcast on September 1, 2003 | SELECT episode__number FROM table_17481974_1 WHERE original_airdate = "September 1, 2003" |
Show the name, home city, and age for all drivers. | SELECT name , home_city , age FROM driver |
List the locations of schools in ascending order of enrollment. | SELECT LOCATION FROM school ORDER BY Enrollment ASC |
Which party has the largest number of delegates? | SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party ORDER BY COUNT(*) DESC LIMIT 1 |
If the high points were by Anthony Morrow (24), what was the team? | SELECT team FROM table_27700375_6 WHERE high_points = "Anthony Morrow (24)" |
What school is in Brechin? | SELECT external_link FROM table_21563298_1 WHERE location = "Brechin" |
What is the rad number for the dead end in rank 22? | SELECT road_number FROM table_name_75 WHERE type = "dead end" AND rank = "22" |
Who danced the Samba on October 14, 2008? | SELECT pair FROM table_name_14 WHERE date = "october 14, 2008" AND dance = "samba" |
What is the latitude of the island on which Mount Andrinjitra is located? | SELECT T1.Latitude FROM island AS T1 INNER JOIN mountainOnIsland AS T2 ON T1.Name = T2.Island WHERE T2.Mountain = 'Andringitra' |
What are the names of different music genres? | SELECT Name FROM GENRE |
How much Rossendale has a Fylde smaller than 0? | SELECT COUNT(rossendale) FROM table_name_95 WHERE fylde < 0 |
What is the Nation with less than 1 silver, and the total is 1, and bronze is less than 0? | SELECT nation FROM table_name_81 WHERE silver < 1 AND total = 1 AND bronze = 0 |
What is the lowest enrollment that has Lafayette as the location? | SELECT MIN(enrollment) FROM table_name_46 WHERE location = "lafayette" |
What is the English Name of the Location in Chester? | SELECT name__english_ FROM table_name_76 WHERE location = "chester" |
What part number(s) has a frequency of 2.4 ghz? | SELECT part_number_s_ FROM table_name_20 WHERE frequency = "2.4 ghz" |
What is the smallest electorate for the Conservative party in South West Devon constituency, with over 2 conservatives and a name of Plymstock Radford? | SELECT MIN(electorate) FROM table_name_57 WHERE political_party = "conservative" AND constituency = "south west devon" AND "conservative" > 2 AND name = "plymstock radford" |
what is the owner of the callsign wliw | SELECT owner FROM table_1979203_1 WHERE callsign = "WLIW" |
If the team is Billy Ballew Motorsports, what is the race time? | SELECT race_time FROM table_2260452_1 WHERE team = "Billy Ballew Motorsports" |
What are the hometowns of gymnasts and the corresponding number of gymnasts? | SELECT T2.Hometown , COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown |
State the birth place of co-executive producer for nominee of "Outstanding Animated Program (For Programming Less Than One Hour)" award. | SELECT T1.birth_place FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T2.award = 'Outstanding Animated Program (For Programming Less Than One Hour)' AND T2.role = 'co-executive producer'; |
What is the name of the company that has the product with the highest unit price? | SELECT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.UnitPrice = ( SELECT MAX(UnitPrice) FROM Products ) |
What is the marriage date for the Habsburg-Lorraine house member who died 29 December 1829? | SELECT marriage FROM table_name_67 WHERE death = "29 december 1829" |
What is the average number of points for a song ranked 2nd with a draw greater than 3? | SELECT AVG(points) FROM table_name_35 WHERE rank = "2nd" AND draw > 3 |
Can you tell me the organization id for the project id 1 ? | SELECT organisation_id FROM Projects WHERE project_id = 1 |
What is the difference in the average number of sales per day of root beer brands that contain honey and that don’t contain honey. | SELECT (CAST(SUM(CASE WHEN T1.Honey = 'TRUE' THEN 1 ELSE 0 END) AS REAL) / COUNT(DISTINCT T3.TransactionDate)) - (CAST(SUM(CASE WHEN T1.Honey <> 'TRUE' THEN 1 ELSE 0 END) AS REAL) / COUNT(DISTINCT T3.TransactionDate)) FROM rootbeerbrand AS T1 INNER JOIN rootbeer AS T2 ON T1.BrandID = T2.BrandID INNER JOIN `transaction` AS T3 ON T2.RootBeerID = T3.RootBeerID |
What was the highest goals with fewer than 16 losses, fewer than 11 wins, and a goal difference greater than -9? | SELECT MAX(goals_for) FROM table_name_8 WHERE losses < 16 AND wins < 11 AND goal_difference > -9 |
What is the highest Losses, when Wins is "1", and when Matches is less than 2? | SELECT MAX(losses) FROM table_name_21 WHERE wins = 1 AND matches < 2 |
When was the episode with a 1,036,000 BARB rating first aired in Denmark? | SELECT first_broadcast_denmark___dr1__ FROM table_26591309_3 WHERE official_barb_ratings = "1,036,000" |
What is every value for Monday August 24 if Friday August 28 is 23' 22.25 96.864mph? | SELECT mon_24_aug FROM table_23465864_5 WHERE fri_28_aug = "23' 22.25 96.864mph" |
What is the score for 2004? | SELECT score FROM table_name_69 WHERE year = 2004 |
What was the score on October 30? | SELECT score FROM table_name_64 WHERE date = "october 30" |
Great! Can you list the ids of these students, and filter the list by only the students who are registered for one or more courses? | SELECT distinct T1.student_id FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id |
What is the smallest Against with Lost larger than 0, % Won larger than 50, and Played smaller than 5? | SELECT MIN(against) FROM table_name_48 WHERE lost > 0 AND _percentage_won > 50 AND played < 5 |
What team has +119 Points diff? | SELECT team FROM table_name_83 WHERE points_diff = "+119" |
Can you list the maximum number of used kb in screen mode? | SELECT max ( used_kb ) FROM screen_mode |
How old is the youngest winning pilot and what is their name? | SELECT t1.name , t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot ORDER BY t1.age LIMIT 1 |
Which county has a median household income of $98,090? | SELECT county FROM table_1447085_1 WHERE median_house__hold_income = "$98,090" |
Who has the lead in Norway? | SELECT lead FROM table_name_89 WHERE nation = "norway" |
For each city, list their names in decreasing order by their highest station latitude. | SELECT city FROM station GROUP BY city ORDER BY max(lat) DESC |
Please list the awards the coaches who are born in Canada have won. | SELECT DISTINCT T2.award FROM Master AS T1 INNER JOIN AwardsCoaches AS T2 ON T1.coachID = T2.coachID WHERE T1.birthCountry = 'Canada' |
What are the categories of the top 2 oldest events? | SELECT T4.category FROM events_relevant AS T1 INNER JOIN app_events_relevant AS T2 ON T1.event_id = T2.event_id INNER JOIN app_labels AS T3 ON T3.app_id = T2.app_id INNER JOIN label_categories AS T4 ON T3.label_id = T4.label_id ORDER BY T1.timestamp LIMIT 2 |
* I have left the chat * | SELECT Room FROM Faculty where Rank = "Instructor" |
How many matches are there in 2008? | SELECT COUNT(Match_Id) FROM `Match` WHERE Match_Date LIKE '2008%' |
What are the names of representatives in descending order of votes? | SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes DESC |
Return the color description that is most common across all products. | SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY count(*) DESC LIMIT 1 |
What is the least number of tropical cyclones when the strongest storm was Tiffany and less than 10 tropical lows. | SELECT MIN(Severe) AS tropical_cyclones FROM table_name_88 WHERE strongest_storm = "tiffany" AND tropical_lows > 10 |
How many byes when the draws are fewer than 0? | SELECT AVG(byes) FROM table_name_84 WHERE draws < 0 |
How many of those courses are there? | select count ( * ) from course where title in ( SELECT title FROM course where dept_name = 'Mech. Eng.' and credits > 3 ) and dept_name ! = 'Mech. Eng.' |
What ERP W has a 95.1 MHZ frequency? | SELECT erp_w FROM table_name_62 WHERE frequency_mhz = 95.1 |
What is the T score of the team with an E score of 6.625? | SELECT t_score FROM table_name_52 WHERE e_score = 6.625 |
Which title is about helpful hints on how to use your electronic resources, which publisher published it and what is the price of this book? | SELECT T1.title, T2.pub_name, T1.price FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T1.notes = 'Helpful hints on how to use your electronic resources to the best advantage.' |
What is the name of the losing team during an exhibition game in 1912? | SELECT T2.name FROM SeriesPost AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND tmIDLoser = tmID WHERE T1.note = 'EX' AND T2.year = '1912' |
What are the names of customers who never made an order. | SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id |
What is the Attendance for a Week earlier than 16, and a Date of bye? | SELECT attendance FROM table_name_39 WHERE week < 16 AND date = "bye" |
Show the players and years played for players from team "Columbus Crew". | SELECT T1.Player , T1.Years_Played FROM player AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = "Columbus Crew" |
Is (206) 555-1189 the home phone number for Laura Callahan? | SELECT CASE WHEN HomePhone = '(206) 555-1189' THEN 'YES' ELSE 'NO' END FROM Employees WHERE FirstName = 'Laura' AND LastName = 'Callahan' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.