sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What is the Competition for Season 2002–03, and the Opponent was zenit st. petersburg? | SELECT competition FROM table_name_86 WHERE season = "2002–03" AND opponent = "zenit st. petersburg" |
Find the name and nationality of the swimmer who has won (i.e., has a result of "win") more than 1 time. | SELECT t1.name , t1.nationality FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win' GROUP BY t2.swimmer_id HAVING count(*) > 1 |
What are the birthdays of people in ascending order of height? | SELECT Birth_Date FROM People ORDER BY Height ASC |
What was the tournament that resulted in a winning score of –4 (71-72-72-69=284)? | SELECT tournament FROM table_name_34 WHERE winning_score = –4(71 - 72 - 72 - 69 = 284) |
What league has an average attendance of 244? | SELECT league FROM table_name_72 WHERE avg_attendance_† = "244" |
Tell met he score for team of waaia | SELECT score FROM table_name_67 WHERE team = "waaia" |
Which is the opponent when the record was 43-56? | SELECT opponent FROM table_name_12 WHERE record = "43-56" |
How many carries for jeff smoker? | SELECT SUM(car) FROM table_name_54 WHERE player = "jeff smoker" |
List all of the player ids with a height of at least 180cm and an overall rating higher than 85. | SELECT player_api_id FROM Player WHERE height >= 180 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE overall_rating > 85 |
Where do the trips end? | SELECT DISTINCT T2.city FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id |
How many States have an Indian population of 30947? | SELECT COUNT(filipino) FROM table_10118412_6 WHERE indian = 30947 |
Show names, results and bulgarian commanders of the battles with no ships lost in the 'English Channel'. | SELECT name , RESULT , bulgarian_commander FROM battle EXCEPT SELECT T1.name , T1.result , T1.bulgarian_commander FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.location = 'English Channel' |
What are the ids, types, and details of the organization with the most research staff? | SELECT T1.organisation_id , T1.organisation_type , T1.organisation_details FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1 |
Please show the names and the players of clubs. | SELECT T1.name, T2.Player_id FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID |
What is Australia's highest total? | SELECT MAX(total) FROM table_name_86 WHERE country = "australia" |
Find the names of all races held in 2017. | SELECT name FROM races WHERE YEAR = 2017 |
What are the three most costly procedures? | SELECT name FROM procedures ORDER BY cost LIMIT 3 |
When the FIS Nordic World Ski Championships was 1962, 1964 what was the Holmenkollen? | SELECT holmenkollen FROM table_name_58 WHERE fis_nordic_world_ski_championships = "1962, 1964" |
Who was featured in 20 questions on 4-03? | SELECT 20 AS _questions FROM table_1566852_4 WHERE date = "4-03" |
What is the Unanimous of the Minnesota Southern California School? | SELECT unanimous FROM table_name_93 WHERE school = "minnesota southern california" |
What is the total home game attendance of team Boston Red Stockings from 2000 to 2010? | SELECT SUM(T1.attendance) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 2000 AND 2010 |
What is the Date, when Game is 17? | SELECT date FROM table_name_69 WHERE game = 17 |
What are the first and last names of the student who played the most total hours per week? | SELECT Fname, Lname from student where stuid = ( select stuid from sportsinfo group by stuid order by sum ( hoursperweek ) desc limit 1 ) |
Who is the head of household for task number 7? | SELECT head_of_household FROM table_name_39 WHERE task_no = 7 |
How many population total figures are there for the year when Allora's population was 2132? | SELECT COUNT(population__region_total_) FROM table_12584173_1 WHERE population__allora_ = 2132 |
How much does David Bornhammar weigh in kilograms? | SELECT T2.weight_in_kg FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id WHERE T1.PlayerName = 'David Bornhammar' |
What was the time recorded for grid 18? | SELECT time_retired FROM table_name_89 WHERE grid = 18 |
Which game has sold the fewest units? | SELECT T.game_name FROM ( SELECT T1.game_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN game_platform AS T3 ON T2.id = T3.game_publisher_id INNER JOIN region_sales AS T4 ON T3.id = T4.game_platform_id ORDER BY T4.num_sales LIMIT 1 ) t |
What is the maximum elevation of all airports in the country of Iceland? | SELECT max(elevation) FROM airports WHERE country = 'Iceland' |
Give me the the customer details and id for the customers who had two or more policies but did not file any claims. | SELECT T1.customer_details , T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2 EXCEPT SELECT T1.customer_details , T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.customer_id JOIN Claims AS T3 ON T2.policy_id = T3.policy_id |
Which patients made more than one appointment? Tell me the name and phone number of these patients. | SELECT name , phone FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn GROUP BY T1.patient HAVING count(*) > 1 |
Name the production code for theresa rebeck | SELECT production_code FROM table_25604014_9 WHERE written_by = "Theresa Rebeck" |
Which buildings are in a studio? | SELECT building_full_name FROM Apartment_Buildings WHERE building_description = 'Studio' |
Find the names of Japanese constructors that have once earned more than 5 points? | SELECT T1.name FROM constructors AS T1 JOIN constructorstandings AS T2 ON T1.constructorid = T2.constructorid WHERE T1.nationality = "Japanese" AND T2.points > 5 |
What is the age of the oldest dog? | SELECT max(age) FROM Dogs |
What is the title of the employee involved in inspection ID 60332? | SELECT T1.title FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.inspection_id = 60332 |
Which classes have more than two captains? | SELECT CLASS FROM captain GROUP BY CLASS HAVING count(*) > 2 |
Can you calculate the total salary paid by team Boston Red Stockings in 2010? | SELECT sum ( T1.salary ) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2010 |
Which University's soccer stadium in named Moncton Stadium? | SELECT university FROM table_27369069_1 WHERE soccer_stadium = "Moncton Stadium" |
How many inspections failed in 2014? | SELECT COUNT(inspection_id) FROM inspection WHERE strftime('%Y', inspection_date) = '2014' AND results = 'Fail' |
What was the date of the poll from Survey USA that showed a lead margin smaller than 5.5? | SELECT dates_administered FROM table_name_87 WHERE lead_margin < 5.5 AND poll_source = "survey usa" |
What is the most common special features of science-fiction movies? | SELECT T1.special_features FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T3.name = 'sci-fi' ORDER BY T1.special_features DESC LIMIT 1 |
What is the first name of the author with last name "Ueno"? | SELECT fname FROM authors WHERE lname = "Ueno" |
what's the district with candidates being harry lane englebright (r) unopposed | SELECT district FROM table_1342359_5 WHERE candidates = "Harry Lane Englebright (R) Unopposed" |
Please list all songs in volumes in ascending alphabetical order. | SELECT Song FROM volume ORDER BY Song |
what is the location of ID 3 | Do you mean the perpetrator ID? | yes the prepetrator ID | SELECT location FROM perpetrator WHERE Perpetrator_ID = "3" |
List out the id of event that achieve the gold medal. | SELECT T2.event_id FROM medal AS T1 INNER JOIN competitor_event AS T2 ON T1.id = T2.medal_id WHERE T1.medal_name = 'Gold' |
Name the status for points 3185 | SELECT status FROM table_23501776_16 WHERE points = 3185 |
What player placed t10? | SELECT player FROM table_name_17 WHERE place = "t10" |
List all the IDs of images that have objects with the attributes of 'wired'. | SELECT DISTINCT T2.IMG_ID FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T1.ATT_CLASS = 'wired' |
What are their first and last names? | SELECT T2.lname , T2.fname FROM SportsInfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.SportName = "Football" |
What is the title of season 2? | SELECT title FROM table_2409041_6 WHERE no_in_season = 2 |
what had a score of 70-71-68-72=281? | SELECT country FROM table_name_88 WHERE score = 70 - 71 - 68 - 72 = 281 |
how many female students presented on table | SELECT count ( * ) FROM Student WHERE Sex = "F" |
Is English one of them? | SELECT distinct dept_code from professor where dept_code = "ENG" |
What is the catalogue number for release dates of exactly 2005 and released by The Clear Spots? | SELECT catalogue_number FROM table_27932399_1 WHERE release_date = 2005 AND artist = "The Clear Spots" |
What is the level name of the cheapest catalog (in USD)? | SELECT t2.catalog_level_name FROM catalog_contents AS t1 JOIN catalog_structure AS t2 ON t1.catalog_level_number = t2.catalog_level_number ORDER BY t1.price_in_dollars LIMIT 1 |
Who was the vacator when the reason for change was failure to elect? | SELECT vacator FROM table_225206_3 WHERE reason_for_change = "Failure to elect" |
Show the names and genders of players with a coach starting after 2011 | SELECT T3.Player_name , T3.gender FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID WHERE T1.Starting_year > 2011 |
What year was the 190 South Lasalle Street? | SELECT MAX(year) FROM table_name_9 WHERE name = "190 south lasalle street" |
For the attendance of 2 january 1999 with a home team of plymouth argyle what is the tie no. ? | SELECT tie_no FROM table_name_5 WHERE attendance = "2 january 1999" AND home_team = "plymouth argyle" |
Who is every player with a height of 6-5? | SELECT player FROM table_22824297_1 WHERE height = "6-5" |
What is the ID of cup? | SELECT i_id FROM item where title = "cup" |
List all the distinct stations from which a trip of duration below 100 started. | SELECT DISTINCT start_station_name FROM trip WHERE duration < 100 |
What was the first Round with a Pick # greater than 1 and 140 Overall? | SELECT MIN(round) FROM table_name_43 WHERE pick__number > 1 AND overall > 140 |
What is the final result for the 63.5 kg? | SELECT final FROM table_name_73 WHERE event = "63.5 kg" |
Show the names of employees that work for companies with sales bigger than 200. | SELECT T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID WHERE T3.Sales_in_Billion > 200 |
Find all the distinct id and nationality of drivers who have had laptime more than 100000 milliseconds? | SELECT DISTINCT T1.driverid , T1.nationality FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds > 100000 |
List the categories for which Bonita Pietila was given credit and her role in creating the episodes. | SELECT DISTINCT category, role FROM Credit WHERE person = 'Bonita Pietila'; |
Find the total and average amount of settlements. | SELECT sum(settlement_amount) , avg(settlement_amount) FROM settlements |
Among the seafoods, how many of them have an order quantity of more than 50? | SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Categories AS T3 ON T1.CategoryID = T3.CategoryID WHERE T3.CategoryName = 'Seafood' AND T2.Quantity > 50 |
Show different type codes of products and the number of products with each type code. | SELECT Product_Type_Code, COUNT(*) FROM Products GROUP BY Product_Type_Code |
What is the pick number for Danny Green in a round less than 2? | SELECT COUNT(pick) FROM table_name_21 WHERE player = "danny green" AND round < 2 |
How many events are there? | SELECT count ( distinct Event_ID ) FROM Participants_in_Events |
What is the English word for twie? | SELECT english FROM table_name_43 WHERE DUTCH(Limburgish) = twie |
List the name of competitors from Argentina. | SELECT T3.full_name FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.region_name = 'Argentina' |
What is the accelerate of the car make amc hornet sportabout (sw)? | SELECT T1.Accelerate FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Make = 'amc hornet sportabout (sw)' |
How many Sales Rep who are working in Tokyo? List out email and full name of those employees. | SELECT T1.firstName, T1.lastName, T1.email FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2.officeCode WHERE T2.city = 'Tokyo' AND T1.jobTitle = 'Sales Rep' |
WHAT IS THE NATIONALITY FOR SOUTHWESTERN OKLAHOMA? | SELECT nationality FROM table_name_53 WHERE college = "southwestern oklahoma" |
Name the number of party with the incubent james william trimble | SELECT COUNT(party) FROM table_1341930_5 WHERE incumbent = "James William Trimble" |
What longitudes associated with a water (sqmi) area of 0.068? | SELECT longitude FROM table_18600760_13 WHERE water__sqmi_ = "0.068" |
Which Touchdowns have an Extra points of 0, and Points larger than 5, and a Player of curtis redden? | SELECT AVG(touchdowns) FROM table_name_47 WHERE extra_points = 0 AND points > 5 AND player = "curtis redden" |
what is the name of the instructor who is in Statistics department and earns the lowest salary? | SELECT name FROM instructor WHERE dept_name = 'Statistics' ORDER BY salary LIMIT 1 |
Name the chassis of 147 points and engine of ford cosworth dfx | SELECT chassis FROM table_name_43 WHERE points = 147 AND engine = "ford cosworth dfx" |
Return the ids corresponding to templates with the description 'Presentation'. | SELECT T2.template_id FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code WHERE T1.template_type_description = "Presentation" |
Engine 2.5 20v d has what engine code? | SELECT engine AS code FROM table_name_46 WHERE engine = "2.5 20v d" |
Which Score has Points larger than 46, and a Game smaller than 35, and a December of 21? | SELECT score FROM table_name_35 WHERE points > 46 AND game < 35 AND december = 21 |
How many house colours are associated with house names of Hillary? | SELECT COUNT(house_colour) FROM table_1942683_1 WHERE house_name = "Hillary" |
What was the rank (week) for episode number 34? | SELECT rank__week_ FROM table_26199130_1 WHERE no = 34 |
Which week's game was attended by 65,272 people? | SELECT week FROM table_name_18 WHERE attendance = "65,272" |
Show the detention type code for the detention with id 1? | SELECT T1.detention_type_code FROM Detention AS T1 JOIN Ref_Detention_Type AS T2 ON T1.detention_type_code = T2.detention_type_code where detention_id = 1 |
Station Ownership of eicb tv, and a Call sign of ktcj-ld is what virtual network? | SELECT virtual_channel FROM table_name_25 WHERE station_ownership = "eicb tv" AND call_sign = "ktcj-ld" |
Which state has the least? | select T1.state_province_county from Addresses as T1 join Employees as T2 on T1.address_id = T2.employee_address_id group by T1.state_province_county order by count ( * ) limit 1 |
What was the first leg of the semi-final? | SELECT first_leg FROM table_name_78 WHERE round = "semi-final" |
Who is the player with a 75-68-70=213 score? | SELECT player FROM table_name_79 WHERE score = 75 - 68 - 70 = 213 |
Who played the No.1 character in the credit list of the movie which was released on "2015/10/26"? | SELECT T3.Name FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID INNER JOIN actor AS T3 ON T3.ActorID = T2.ActorID WHERE T1.`Release Date` = '2015-10-26' AND T2.creditOrder = '1' |
What is Name, when State is "Jin"? | SELECT name FROM table_name_55 WHERE state = "jin" |
What is the description for the character mentioned in paragraph No.640171? | SELECT T1.Description FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T2.id = '640171' |
Find the total access count of all documents in the most popular document type. | SELECT sum(access_count) FROM documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 1 |
Find the distinct driver id and the stop number of all drivers that have a shorter pit stop duration than some drivers in the race with id 841. | SELECT DISTINCT driverid , STOP FROM pitstops WHERE duration < (SELECT max(duration) FROM pitstops WHERE raceid = 841) |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.