sentence
stringlengths
3
347
sql
stringlengths
18
804
Where is ropery lane and la matches 7 location?
SELECT location FROM table_1176371_1 WHERE la_matches = 7 AND name_of_ground = "Ropery Lane"
Which Series has a Score of 3 – 8?
SELECT series FROM table_name_63 WHERE score = "3 – 8"
What is the silver total for nations with 10 bronze medals?
SELECT SUM(silver) FROM table_name_93 WHERE bronze = 10
What is the address of each course author or tutor?
SELECT address_line_1 FROM Course_Authors_and_Tutors
What is the roll of the school in Oakura?
SELECT SUM(roll) FROM table_name_59 WHERE area = "oakura"
What was the amount of winners share (in $) in the game with a margin victory of 2 strokes?
SELECT winners_share___$__ FROM table_1940012_2 WHERE margin_of_victory = "2 strokes"
What is the total decile in the area of Normanby with a roller smaller than 157?
SELECT SUM(decile) FROM table_name_99 WHERE area = "normanby" AND roll < 157
How many different addresses do the students currently live?
SELECT COUNT(DISTINCT current_address_id) FROM Students
What location has a home ground of n/a, and position in 2012-13 of 13th, third division?
SELECT location FROM table_name_2 WHERE home_ground = "n/a" AND position_in_2012_13 = "13th, third division"
Who was the Home Captain at Sabina Park?
SELECT home_captain FROM table_name_65 WHERE venue = "sabina park"
What is the yield in NTS Area U2R when the purpose is weapons development?
SELECT yield FROM table_name_69 WHERE purpose = "weapons development" AND location = "nts area u2r"
Which Athlete is from the United Kingdom?
SELECT athlete FROM table_name_14 WHERE country_state = "united kingdom"
What is the capital city of the country with largest population?
SELECT T1.Capital FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode ORDER BY T1.Population DESC LIMIT 1
What is the tyre for the peugeot a20 engine?
SELECT tyre FROM table_name_40 WHERE engine_† = "peugeot a20"
Where is the headquarter of the company founded by James?
SELECT headquarter FROM manufacturers WHERE founder = 'James'
Find the number of voting records in total.
SELECT count(*) FROM VOTING_RECORD
Find the number of customers in the banks at New York City.
SELECT sum(no_of_customers) FROM bank WHERE city = 'New York City'
Identify the name of the sales person with employee ID 7.
SELECT FirstName, MiddleInitial, LastName FROM Employees WHERE EmployeeID = 7
how many different meanings does Wednesday have?
SELECT COUNT(english_day_name_meaning) FROM table_2624098_1 WHERE modern_english_day_name = "Wednesday"
What are the different first names for customers from Brazil who have also had an invoice?
SELECT DISTINCT T1.FirstName FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = "Brazil"
Which Against has a Position larger than 11?
SELECT COUNT(against) FROM table_name_32 WHERE position > 11
Which category does the product named "flax" belong to?
SELECT product_category_code FROM products WHERE product_name = "flax"
How many students play Lacrosse?
SELECT count ( * ) FROM SportsInfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.SportName = "Lacrosse"
What is the report for round 9?
SELECT report FROM table_name_9 WHERE round = 9
What is the gender of the Roman Catholic school is AL4?
SELECT gender FROM table_28523_3 WHERE religious_affiliation = "Roman Catholic" AND location = "AL4"
What was his record when he went over 1 round?
SELECT record FROM table_name_81 WHERE round > 1
What is the total number of rounds that had draft pick 97, duncan mccoll?
SELECT COUNT(round) FROM table_name_62 WHERE player = "duncan mccoll" AND pick < 97
In what percentage of counties has the ABC Read project been launched?
SELECT CAST(SUM(CASE WHEN T2.title LIKE 'ABC Read' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.school_county) FROM projects AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid
What party did the incumbent from the Virginia 5 district who was re-elected and was first elected in 1797 belong to?
SELECT party FROM table_2668401_17 WHERE result = "Re-elected" AND first_elected = "1797" AND district = "Virginia 5"
What livery belongs to the steam Locomotive type builder that was building before 1989?
SELECT livery FROM table_name_69 WHERE year_built < 1989 AND locomotive_type = "steam"
What is the emissions CO2 with a max speed of km/h (mph) of the car model Panamera 4s?
SELECT emissions_co2 FROM table_name_76 WHERE max_speed = "km/h (mph)" AND car_model = "panamera 4s"
Which Tournament has a 2010 of 2r, and a 2011 of 1r?
SELECT tournament FROM table_name_21 WHERE 2010 = "2r" AND 2011 = "1r"
Which is the publisher for the game "Prism: Light the Way"?
SELECT T1.publisher_name FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id INNER JOIN game AS T3 ON T2.game_id = T3.id WHERE T3.game_name = 'Prism: Light the Way'
What is their name, please?
select name from member where level in ( SELECT LEVEL FROM member GROUP BY LEVEL ORDER BY count ( * ) ASC LIMIT 1 )
During the year when Lansing's fare is $433.59, what is the fare to Kalamazoo?
SELECT kalamazoo__azo_ FROM table_1637981_7 WHERE lansing__lan_ = "$433.59"
Please list down ID of movies acted by top 5 actors based on actor rating.
SELECT T2.movieid FROM actors AS T1 INNER JOIN movies2actors AS T2 ON T1.actorid = T2.actorid GROUP BY T2.actorid ORDER BY AVG(T1.a_quality) DESC LIMIT 5
Which report shows that Frank Lockhart was a winning driver?
SELECT report FROM table_name_79 WHERE winning_drivers = "frank lockhart"
Which episode was directed by Jeff Woolnough and written by Christopher Ambrose?
SELECT title FROM table_26824484_1 WHERE directed_by = "Jeff Woolnough" AND written_by = "Christopher Ambrose"
What attraction type do most tourist attractions belong to? | Did you want to know the attraction type that most tourist attractions belong to? code or description? | Yes, can you give me the codes please?
SELECT T2.Attraction_Type_Code FROM Ref_Attraction_Types AS T1 JOIN Tourist_Attractions AS T2 ON T1.Attraction_Type_Code = T2.Attraction_Type_Code GROUP BY T2.Attraction_Type_Code ORDER BY COUNT ( * ) DESC LIMIT 1
What is the latest Fiscal Year with Revenues of $4.3 billion, and more than 85,335 employees?
SELECT MAX(fiscal_year) FROM table_name_95 WHERE revenues = "$4.3 billion" AND employees > 85 OFFSET 335
What years did Representative Frank A. Oliver serve?
SELECT years FROM table_name_70 WHERE representative = "frank a. oliver"
If the weight is 126g and the NFC is yes, what is the battery (MAH)?
SELECT battery___mah__ FROM table WHERE nfc = "Yes" AND weight = "126g"
Who build the boat where Ken Read was the skipper?
SELECT builder FROM table_19872699_1 WHERE skipper = "Ken Read"
How many distinct artists do the volumes associate to?
SELECT COUNT(DISTINCT Artist_ID) FROM volume
What was home team Essendon's opponents score?
SELECT away_team AS score FROM table_name_9 WHERE home_team = "essendon"
Original airdate for #6 with 1.246 viewers?
SELECT original_airdate FROM table_name_73 WHERE nightly_rank = "#6" AND viewers__millions_ = 1.246
What tournament has petra mandula patricia wartusch as the opponent in the final?
SELECT tournament FROM table_name_40 WHERE opponent_in_the_final = "petra mandula patricia wartusch"
Hello there! Can you provide me with a list of all of the customer names and their corresponding payment methods?
SELECT customer_name, payment_method FROM Customers
What are the grant amounts of those?
SELECT T3.grant_amount FROM Documents AS T1 JOIN Document_Types AS T2 ON T1.document_type_code = T2.document_type_code JOIN Grants AS T3 ON T1.grant_id = T3.grant_id WHERE T2.document_description = 'Initial Application'
What won the Best Female Artist if People's Male MC won the Best Female Lyricist?
SELECT best_female_artist FROM table_22546460_4 WHERE best_female_lyricist = "People's Male MC"
Who was the home team at the game played at Kardinia Park?
SELECT home_team FROM table_name_44 WHERE venue = "kardinia park"
What is the Tournament with a Margin of victory that was 4 strokes?
SELECT tournament FROM table_name_57 WHERE margin_of_victory = "4 strokes"
In game site AOL Arena, who are all the opponents?
SELECT opponent FROM table_25380472_2 WHERE game_site = "AOL Arena"
What was the date of the friendly competition with a score of 4-0?
SELECT date FROM table_name_31 WHERE competition = "friendly" AND score = "4-0"
How many attended the game when the score was tie at 4?
SELECT attendance FROM table_name_65 WHERE tie_no = "4"
Which chassis had 16 points?
SELECT chassis FROM table_name_43 WHERE points = 16
Who's average is 24.8?
SELECT player FROM table_16912000_13 WHERE kr_avg = "24.8"
Which institution type has the largest number of institutions?
SELECT TYPE FROM institution GROUP BY TYPE ORDER BY count ( * ) DESC LIMIT 1
What is the name of the bank branch that has lent the greatest amount?
SELECT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id GROUP BY T1.bname ORDER BY sum(T2.amount) DESC LIMIT 1
Find the names and phone numbers of customers living in California state.
SELECT t1.customer_name , t1.customer_phone FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = 'California'
Find all the customer information in state NY.
SELECT * FROM CUSTOMER WHERE State = "NY"
What is the most consecutive games tied by Ebbsfleet as an away team in the 2008 season?
SELECT COUNT(*) FROM matchs WHERE season = 2008 AND AwayTeam = 'Ebbsfleet' AND FTR = 'D'
How much Hyndburn has a Fylde larger than 3?
SELECT SUM(hyndburn) FROM table_name_52 WHERE fylde > 3
What venue did melbourne play at as the away team?
SELECT venue FROM table_name_60 WHERE away_team = "melbourne"
Among the episodes aired in 2008 with votes ranges from 920 to 950, list their percent.
SELECT T2.percent FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE SUBSTR(T1.air_date, 1, 4) = '2008' AND T1.votes BETWEEN 950 AND 960;
What is the total amount of payment?
SELECT sum(Amount_Payment) FROM Payments
Which unique cities are in Asian countries where Chinese is the official language ?
SELECT DISTINCT t3.name FROM country AS t1 JOIN countrylanguage AS t2 ON t1.code = t2.countrycode JOIN city AS t3 ON t1.code = t3.countrycode WHERE t2.isofficial = 't' AND t2.language = 'chinese' AND t1.continent = "asia"
Name the total number of male rank for fiji
SELECT COUNT(male_rank) FROM table_2701625_1 WHERE country = "Fiji"
Who was taking charge of orders from Morristown?
SELECT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T3.TerritoryDescription = 'Morristown'
What is Pat Burke's Nationality?
SELECT nationality FROM table_name_34 WHERE player = "pat burke"
Which locations have the most cinemas?
SELECT location from cinema GROUP BY LOCATION ORDER BY count ( * ) DESC LIMIT 1
What is the 2007 estimate when the rank (csa) is 4
SELECT 2007 AS _estimate FROM table_12720275_1 WHERE rank__csa_ = "4"
What is the average number of gold medals for a club?
SELECT avg(Gold) FROM club_rank
How many league goals did the player with 10 league apps and 0 FA cup goals have?
SELECT COUNT(league_goals) FROM table_name_93 WHERE fa_cup_goals = 0 AND league_apps = "10"
Return the grade that has the greatest number of high schoolers.
SELECT grade FROM Highschooler GROUP BY grade ORDER BY count(*) DESC LIMIT 1
What are their names?
SELECT name FROM Person WHERE job ! = "student"
What are the support, consider, and oppose rates of each candidate, ordered ascending by their unsure rate?
SELECT Support_rate , Consider_rate , Oppose_rate FROM candidate ORDER BY unsure_rate
Who many votes did E. Greenberg receive in Morris County?
SELECT COUNT(e_greenberg) FROM table_17820556_4 WHERE county = "Morris"
What candidates ran in the election that featured harry lane englebright?
SELECT candidates FROM table_1342370_5 WHERE incumbent = "Harry Lane Englebright"
What is Trial Start Date, when Candidate Name is Notes?
SELECT trial_start_date FROM table_name_36 WHERE candidate_name = "notes"
Who is week 1 if week 3 is Natasha Budhi?
SELECT week_1 FROM table_name_3 WHERE week_3 = "natasha budhi"
What percentage of nations have achieved independence since 1993 and practice parliamentary democracy? Please include any three parliament-based democracies that attained independence after 1993.
SELECT SUM(IIF(government = 'parliamentary democracy', 1, 0)) , CAST(SUM(IIF(government = 'parliamentary democracy', 1, 0)) AS REAL) * 100 / COUNT(*) FROM politics AS t1 WHERE STRFTIME('%Y', independence) >= '1993'
What is the word ID for the second word for the biwords pair with most repetitions?
SELECT w2nd FROM biwords WHERE occurrences = ( SELECT MAX(occurrences) FROM biwords )
What Tournament of monte carlo had 1996 and a 1987 of nme?
SELECT 1996 FROM table_name_45 WHERE 1987 = "nme" AND tournament = "monte carlo"
Provide a list of restaurants from Marin county.
SELECT T1.label FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.county = 'marin county'
What is the depth of the aftershock at 18:00:22?
SELECT depth FROM table_24518475_1 WHERE time__utc_ = "18:00:22"
How many distinct claim outcome codes are there?
SELECT COUNT(DISTINCT claim_outcome_code) FROM claims_processing
Find the id of year 1956? | do you mean the id of the campus that is opened in 1956? | Yes
SELECT id from campuses where year = 1956
Show ids of all students who do not have any friends.
SELECT id FROM Highschooler EXCEPT SELECT student_id FROM Friend
What is the paper type for the date of issue July 8?
SELECT paper_type FROM table_25468520_1 WHERE date_of_issue = "July 8"
What is the duration, file size, and song format for every pop song, ordered by title alphabetically?
SELECT T1.duration , T1.file_size , T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.genre_is = "pop" ORDER BY T2.song_name
how many employee in table?
SELECT count ( * ) from employee
Name the title for us viewers being 18.29
SELECT title FROM table_19501664_1 WHERE us_viewers__millions_ = "18.29"
What are the customer details of order id 2?
SELECT customer_details FROM customers WHERE customer_id = "2"
How many different departments offer degrees?
SELECT count(DISTINCT department_id) FROM Degree_Programs
Show all company name and main industry with gas station?
SELECT company , main_industry FROM company WHERE company_id IN ( SELECT company_id FROM station_company )
What are the names of all of Bob's friends?
SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Bob'
Show the first year and last year of parties with theme "Spring" or "Teqnology".
SELECT First_year , Last_year FROM party WHERE Party_Theme = "Spring" OR Party_Theme = "Teqnology"
Describe the ages, genders and numbers of events participated by the users at coordinates of (-102,38).
SELECT DISTINCT T1.age, T1.gender, COUNT(T2.event_id) FROM gender_age AS T1 INNER JOIN `events` AS T2 ON T2.device_id = T1.device_id WHERE T2.longitude = -102 AND T2.latitude = 38 GROUP BY T1.age, T1.gender, T2.longitude, T2.latitude
How many milliseconds long is Fast As a Shark?
SELECT milliseconds FROM tracks WHERE name = "Fast As a Shark";