sentence
stringlengths
3
347
sql
stringlengths
18
804
Which season was harrisburg lunatics in?
SELECT season FROM table_name_75 WHERE team = "harrisburg lunatics"
Show the apartment type codes and apartment numbers in the buildings managed by "Kyle".
SELECT T2.apt_type_code , T2.apt_number FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_manager = "Kyle"
What is the team 1 with team 2 Mount Cameroon FC?
SELECT team_1 FROM table_name_43 WHERE team_2 = "mount cameroon fc"
what is part 2 when part 4 is gebonden?
SELECT part_2 FROM table_name_92 WHERE part_4 = "gebonden"
What is the name of the plaza where the told for heavy vehicles with 2 axles is r20.50?
SELECT name FROM table_1211545_2 WHERE heavy_vehicle__2_axles_ = "R20.50"
Who was the home team in the game with more than 1675, and Olimpia was the away side?
SELECT home FROM table_name_28 WHERE attendance > 1675 AND away = "olimpia"
Hello there! Can you provide me with a list of all of the service names?
SELECT service_name FROM services
Find the name of customers who have both saving and checking account types.
SELECT cust_name FROM customer WHERE acc_type = 'saving' INTERSECT SELECT cust_name FROM customer WHERE acc_type = 'checking'
Show each state and the number of addresses in each state.
SELECT state_province_county , count(*) FROM addresses GROUP BY state_province_county
What was the format for catalog 660-51-015?
SELECT format FROM table_name_51 WHERE catalog = "660-51-015"
What was the result of the race where the jockey was J. Marshall?
SELECT result FROM table_2062148_2 WHERE jockey = "J. Marshall"
For grants with both documents described as 'Regular' and documents described as 'Initial Application', list its start date.
SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Regular' INTERSECT SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Initial Application'
What County was the Obama% at 41.7%?
SELECT county FROM table_20750731_1 WHERE obama_percentage = "41.7%"
What cores has an L2 cache of low power?
SELECT cores FROM table_name_16 WHERE l2_cache = "low power"
Who was the man of the series in 2013? Give the full name.
SELECT T2.Player_Name FROM Season AS T1 INNER JOIN Player AS T2 ON T1.Man_of_the_Series = T2.Player_Id WHERE T1.Season_Year = 2013
Find the city with the most number of stores.
SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city ORDER BY count(*) DESC LIMIT 1
What's the record of game 67?
SELECT record FROM table_name_42 WHERE game = 67
What are the team and the location of school each player belongs to?
SELECT T1.Team , T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID
In businesses with a category of mexican, how many of them has a star rating below 4?
SELECT COUNT(T1.business_id) FROM Business AS T1 INNER JOIN Business_Categories ON T1.business_id = Business_Categories.business_id INNER JOIN Categories AS T3 ON Business_Categories.category_id = T3.category_id WHERE T1.stars < 4 AND T3.category_name LIKE 'Mexican'
What are the restaurants that are located at "19th St. Oakland"?
SELECT T1.id_restaurant FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'Oakland' AND T2.street_name = '19th St'
What is the category and attributes of businesses with highest star rating?
SELECT DISTINCT T3.category_name, T5.attribute_name FROM Business AS T1 INNER JOIN Business_Categories AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T2.category_id = T3.category_id INNER JOIN Business_Attributes AS T4 ON T2.business_id = T4.business_id INNER JOIN Attributes AS T5 ON T4.attribute_id = T5.attribute_id WHERE T1.stars = ( SELECT MAX(stars) FROM Business )
Show all the locations where some cinemas were opened in both year 2010 and year 2011.
SELECT LOCATION FROM cinema WHERE openning_year = 2010 INTERSECT SELECT LOCATION FROM cinema WHERE openning_year = 2011
How many songs have used the instrument "drums"?
SELECT count(*) FROM instruments WHERE instrument = "drums"
List the name of artworks in ascending alphabetical order.
SELECT Name FROM artwork ORDER BY Name
What is the Hazmat, when the Type is Rural, and when the number of Tankers is 1?
SELECT hazmat FROM table_name_98 WHERE type = "rural" AND tankers = 1
Among the players who became coaches, how many of them have gotten in the Hall of Fame?
SELECT COUNT(T1.playerID) FROM Master AS T1 INNER JOIN HOF AS T2 ON T1.hofID = T2.hofID WHERE T1.playerID IS NOT NULL AND T1.coachID IS NOT NULL
What are the names of body builders whose total score is higher than 300?
SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total > 300
which females in that list are from canada?
SELECT T2.name FROM wedding AS T1 JOIN people AS T2 ON T1.female_id = T2.people_id WHERE T1.year = 2016 AND T2.is_male = 'F' AND T2.country = 'Canada'
Tell me the overall rank for roland schoeman
SELECT overall_rank FROM table_name_50 WHERE swimmer = "roland schoeman"
Which week is the theme n/a
SELECT week__number FROM table_21501518_1 WHERE theme = "N/A"
What is the id of the project that has the highest optional tip? Indicate the names of the resources that were requested.
SELECT T1.projectid, T1.item_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid ORDER BY T2.total_price_including_optional_support - T2.total_price_excluding_optional_support DESC LIMIT 1
Mention the description of the care plan of American patients.
SELECT DISTINCT T1.DESCRIPTION FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.ethnicity = 'american'
Count the number of cities in Australia.
SELECT count(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id WHERE T2.country = 'Australia'
Then could you please let me know what is Ian Thornton's major and advisor code?
SELECT Major , Advisor FROM Student WHERE LName = "Thornton" and FName = "Ian"
Who is the director for the movie 'Transformers?'
SELECT T3.person_name FROM movie AS T1 INNER JOIN movie_crew AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T1.title = 'Transformers' AND T2.job = 'Director'
What are the names of perpetrators?
SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID;
What is the nickname of University of Rhode Island?
SELECT Nickname FROM university WHERE School = "University of Rhode Island"
Show names of musicals which have at least three actors.
SELECT T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID HAVING COUNT(*) >= 3
For each product, return its id and the number of times it was ordered.
SELECT count(*) , T3.product_id FROM orders AS T1 JOIN order_items AS T2 JOIN products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY T3.product_id
What venue had footscray play at it?
SELECT venue FROM table_name_87 WHERE away_team = "footscray"
What are the ids of documents which don't have expense budgets?
SELECT document_id FROM Documents EXCEPT SELECT document_id FROM Documents_with_expenses
What are the all product names
SELECT product_name FROM products
What is the current status of the order with the highest shipping cost?
SELECT Status FROM SalesOrderHeader ORDER BY Freight DESC LIMIT 1
How many have fewer than ten tracks?
SELECT count ( * ) from ( select count ( * ) FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id GROUP BY T1.id HAVING count ( T1.id ) < 10 )
How many products are there?
SELECT count(*) FROM Products
Great! Can you update this list to include the activity name associated with each individual faculty member?
SELECT T1.Fname, T1.Lname, T1.FacID, T3.activity_name from Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T3.actid
List down the trips in which their start and end station are similar. Give me their trip IDs and location coordinates.
SELECT T1.id, T2.lat, T2.long FROM trip AS T1 LEFT JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T1.start_station_name = T1.end_station_name
Who has a total of 272?
SELECT player FROM table_name_46 WHERE total = 272
What driver had 101 laps?
SELECT drivers FROM table_name_86 WHERE laps = 101
Who is the player that has a round greater than 2 and a pick bigger than 83?
SELECT player FROM table_name_5 WHERE round > 2 AND pick > 83
What golfer has 281 as their total?
SELECT player FROM table_name_52 WHERE total = 281
What's the to par for england when the score is less than 71?
SELECT to_par FROM table_name_34 WHERE country = "england" AND score < 71
Show the most common type of ships
SELECT TYPE FROM ship GROUP BY TYPE ORDER BY COUNT ( * ) DESC LIMIT 1
What is the average number of Mubi users who love movies directed by Stanley Kubrick?
SELECT AVG(movie_popularity) FROM movies WHERE director_name = 'Stanley Kubrick'
What is the location of Blanca Peak?
SELECT location FROM table_name_77 WHERE mountain_peak = "blanca peak"
what is the elevation of south america?
SELECT elevation_ft FROM table_27435931_1 WHERE continent = "South America"
WHICH 2/3 (P) has a Verb of khêla?
SELECT 2 AS _3__p_ FROM table_name_76 WHERE verb = "khêla"
How many rounds did the event rings: king of kings 2000 block a have with a record of 6-1?
SELECT round FROM table_name_82 WHERE event = "rings: king of kings 2000 block a" AND record = "6-1"
Please list the classes of all the object samples in image no.1.
SELECT T1.OBJ_CLASS FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.IMG_ID = 1 GROUP BY T1.OBJ_CLASS
How many female actors have been played a role in any of French or USA movies?
SELECT COUNT(T2.actorid) FROM movies AS T1 INNER JOIN movies2actors AS T2 ON T1.movieid = T2.movieid WHERE T1.country IN ('France', 'USA')
Can you tell me the High points that has the Date of january 31?
SELECT high_points FROM table_name_32 WHERE date = "january 31"
Show the 3 counties with the smallest population.
SELECT County_name FROM county ORDER BY Population ASC LIMIT 3
What are their vote percents?
SELECT T2.Name, T1.Vote_Percent FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes DESC
How many of these end in San Francisco?
SELECT count ( * ) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id WHERE T2.city = "San Francisco"
Name the judges for 4 public
SELECT judges FROM table_26375386_22 WHERE public = 4
What is the category of the film Agent Truman?
SELECT T3.name 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 T1.title = 'AGENT TRUMAN'
What is the publisher's information of New Moon Books?
SELECT T1.pr_info FROM pub_info AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T2.pub_name = 'New Moon Books'
What's the publisher of the book "Silicon Valley Gastronomic Treats"? Give the publisher's name.
SELECT T2.pub_name FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T1.title = 'Silicon Valley Gastronomic Treats'
What are the names and ids of every course with less than 2 sections?
SELECT T1.course_name , T1.course_id FROM Courses AS T1 JOIN Sections AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_id HAVING count(*) <= 2
When was incumbent William B. Oliver first elected?
SELECT MAX(first_elected) FROM table_1342379_2 WHERE incumbent = "William B. Oliver"
What is the name of the team that has 307 attempts?
SELECT team FROM table_name_7 WHERE attempts = "307"
What is the distinct ID of elctronics or Commen?
SELECT DISTINCT thing_id from things WHERE Type_of_Thing_Code = "Electronics" or Type_of_Thing_Code = "Commen"
What format does the method number 8's comment have?
SELECT CASE WHEN CommentIsXml = 0 THEN 'isNotXMLFormat' WHEN CommentIsXml = 1 THEN 'isXMLFormat' END format FROM Method WHERE Id = 8
What driving wheels are on the m1 original NER class?
SELECT driving_wheels FROM table_name_8 WHERE original_ner_class = "m1"
Name the viewers for 520
SELECT us_viewers__in_millions_ FROM table_23958944_6 WHERE production_number = 520
Which city has a school where the nickname is Pioneers?
SELECT location FROM table_262560_2 WHERE nickname = "Pioneers"
can you shoe me customers' phone numbers? | Do you mean cell mobile phone number or phone number? | phone number
SELECT phone_number FROM Customers
What are the addresses of the inactive customers?
SELECT T2.address FROM customer AS T1 INNER JOIN address AS T2 ON T1.address_id = T2.address_id WHERE T1.active = 0
Which Margin has a Winning score of –7 (71-72-67-71=281)?
SELECT margin FROM table_name_26 WHERE winning_score = –7(71 - 72 - 67 - 71 = 281)
List the price of Ford cars from model 1970 to 1980.
SELECT DISTINCT T3.price FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN price AS T3 ON T3.ID = T2.ID WHERE T1.car_name LIKE 'ford%' AND T2.model_year BETWEEN 1970 AND 1980
what is the acc percent of each team?
SELECT team_id, acc_percent FROM basketball_match
Return the lot details of lots that belong to investors with details "l"?
SELECT T2.lot_details FROM INVESTORS AS T1 JOIN LOTS AS T2 ON T1.investor_id = T2.investor_id WHERE T1.Investor_details = "l"
Show director with the largest number of show times in total.
SELECT T2.directed_by FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.directed_by ORDER BY sum(T1.show_times_per_day) DESC LIMIT 1
Which Rec has Jerel Myers as the Player?
SELECT rec FROM table_name_25 WHERE player = "jerel myers"
Which two Asian countries share a border that is 1,782 kilometers long?
SELECT T4.Country1, T4.Country2 FROM continent AS T1 INNER JOIN encompasses AS T2 ON T1.Name = T2.Continent INNER JOIN country AS T3 ON T3.Code = T2.Country INNER JOIN borders AS T4 ON T4.Country1 = T3.Code WHERE T1.Name = 'Asia' AND T4.Length = 1782
On what date did the person leave office who died on October 23, 1887 and who served 2 years?
SELECT left_office FROM table_name_58 WHERE years_in_office = "2" AND death = "october 23, 1887"
What's the release price of a processor that has a frequency of 3.2 ghz and 1 × 6.4 gt/s qpi I/O?
SELECT release_price___usd__ FROM table_name_76 WHERE frequency = "3.2 ghz" AND i_o_bus = "1 × 6.4 gt/s qpi"
What time is it for the southern home team?
SELECT time FROM table_name_82 WHERE home_team = "southern"
With an area km 2 of 343.95 what is the official name?
SELECT official_name FROM table_name_38 WHERE area_km_2 = 343.95
What CFL team did simeon rottier play for?
SELECT cfl_team FROM table_20170644_1 WHERE player = "Simeon Rottier"
How many bench minor penalties did the team St. Louis Blues got in total in all the games?
SELECT CAST(SUM(BenchMinor) AS REAL) / 2 FROM Teams WHERE name = 'St. Louis Blues'
What is the average number of wins before the season in 1906 where there were 0 draws?
SELECT AVG(wins) FROM table_name_72 WHERE season < 1906 AND draws < 0
What is the name and capacity of the dorm with the fewest amount of amenities?
SELECT T1.dorm_name , T1.student_capacity FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid GROUP BY T2.dormid ORDER BY count(*) LIMIT 1
what is the position when lot is less than 14, goal difference is +1 and drawn is more than 15?
SELECT SUM(position) FROM table_name_88 WHERE lost < 14 AND goal_difference = "+1" AND drawn > 15
how many staffs are on the table
select count ( staff_id ) from staff
What is the CFL Team with Will Grant?
SELECT cfl_team FROM table_name_32 WHERE player = "will grant"
How long did Elly Koss have to take Acetaminophen 160 MG?
SELECT strftime('%J', T2.STOP) - strftime('%J', T2.START) AS days FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND last = 'Koss' AND T2.DESCRIPTION = 'Acetaminophen 160 MG'
Can you tell me the Divisional Record that has the Away Team of dallas?
SELECT divisional_record FROM table_name_58 WHERE away_team = "dallas"
What is the 8th entry in the row with a first entry of "club"?
SELECT tries_for FROM table_12792876_2 WHERE "club" = "club"
What number of rank has more than 2 medals in total with less than 4 bronze?
SELECT COUNT(rank) FROM table_name_26 WHERE total > 2 AND bronze < 4