sentence
stringlengths
3
347
sql
stringlengths
18
804
what is the party where the incumbent is edward boland?
SELECT party FROM table_1341690_21 WHERE incumbent = "Edward Boland"
How many UK events won for the contestant that won under 1 US event?
SELECT events_won__uk_series_ FROM table_name_45 WHERE events_won__us_series_ < 1
How many holes does Player Vijay Singh have?
SELECT COUNT(hole) FROM table_name_79 WHERE player = "vijay singh"
What is the name of the person whose age is below 30?
SELECT name FROM Person WHERE age < 30
What are their managers?
SELECT building_manager FROM Apartment_Buildings WHERE building_description = 'Studio'
What is the rice amount when the potato amount is 79?
SELECT rice_[b_] FROM table_name_7 WHERE potato_[d_] = "79"
On channel 32, when the power is 32 kW horizontal, what is the frequency?
SELECT frequency FROM table_name_32 WHERE power = "32 kw horizontal" AND channel = 32
For how many terms has current legislator Sherrod Brown served as a representative for district no.13?
SELECT COUNT(*) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.official_full_name = 'Sherrod Brown' AND T2.district = 13
What is the Average of bergen, norway?
SELECT MIN(average) FROM table_name_81 WHERE city = "bergen, norway"
How many men under the age of 23 have apps installed but are not active on their devices?
SELECT COUNT(T1.device_id) FROM gender_age AS T1 INNER JOIN events_relevant AS T2 ON T1.device_id = T2.device_id INNER JOIN app_events_relevant AS T3 ON T2.event_id = T3.event_id WHERE T1.gender = 'M' AND T3.is_active = 0 AND T1.age < 23
What rank is the common with an area of 47.3 km^2?
SELECT rank FROM table_1449176_1 WHERE area__km_2__ = "47.3"
State the title of employee id 2?
select title from employee where employeeid = 2
Count the number of documents with the type code BK that correspond to each product id.
SELECT count(*) , project_id FROM Documents WHERE document_type_code = "BK" GROUP BY project_id
What are the response received dates for the documents with a grant amount more than 100?
SELECT T1.response_received_date 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 T3.grant_amount > 100
What strike rate is 9 the matches?
SELECT strike_rate FROM table_name_97 WHERE matches = "9"
Who was the highest picked defensive end
SELECT MAX(pick__number) FROM table_15353123_1 WHERE position = "Defensive end"
How many ratings on the movie "A Way of Life" are made after the year 2011?
SELECT COUNT(T1.rating_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'A Way of Life' AND T1.rating_timestamp_utc >= '2012-01-01'
What shows for nation when the Competition is preseason, Year less than 2011, and a Club of chivas de guadalajara?
SELECT nation FROM table_name_37 WHERE competition = "preseason" AND year < 2011 AND club = "chivas de guadalajara"
List all every engineer's first name, last name, details and coresponding skill description.
SELECT T1.first_name , T1.last_name , T1.other_details , T3.skill_description FROM Maintenance_Engineers AS T1 JOIN Engineer_Skills AS T2 ON T1.engineer_id = T2.engineer_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id
what are the busiest airport in china? | busiest source airport or destination airport? | busiest source airport
SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY count ( * ) DESC LIMIT 1
Hello there! How are you? Could you please provide me with a list of all trip IDs for the zip code 94002?
SELECT id FROM trip WHERE zip_code = 94002
Show all different home cities.
SELECT DISTINCT home_city FROM driver
What is the email of the student with first name "Emma" and last name "Rohan"?
SELECT email_address FROM Students WHERE first_name = "Emma" AND last_name = "Rohan"
What are the names of all the different reviewers who rates Gone with the Wind?
SELECT DISTINCT T3.name FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T2.title = 'Gone with the Wind'
Who was drafted to litvinov (czechoslovakia)?
SELECT player FROM table_2679061_12 WHERE college_junior_club_team = "Litvinov (Czechoslovakia)"
What is the first and last name of the youngest student with a GPA above 3, and what is their GPA?
SELECT stu_fname , stu_lname , stu_gpa FROM student WHERE stu_gpa > 3 ORDER BY stu_dob DESC LIMIT 1
Calculate the difference between the number of shipments shipped by the truck with the model year 2005 and model year 2006.
SELECT SUM(CASE WHEN T1.model_year = '2005' THEN 1 ELSE 0 END) - SUM(CASE WHEN T1.model_year = '2006' THEN 1 ELSE 0 END) FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id
What is Opposing Teams, when Against is less than 6?
SELECT opposing_teams FROM table_name_86 WHERE against < 6
how many broadcast are presented on the table
SELECT count ( * ) from broadcast
How many of the reviews have a rating greater than or equal to 5?
SELECT count ( * ) FROM review WHERE rating > = 5
What is the Name when the position is g, and weight is 190 pounds?
SELECT name FROM table_name_54 WHERE position = "g" AND weight__lbs_ = 190
Which 1977 is the lowest one that has a County of zzz bucharest, and a 2011 smaller than 1883425?
SELECT MIN(1977) FROM table_name_23 WHERE county = "zzz bucharest" AND 2011 < 1883425
What was the attendance at the ballpark during the game where the Blue Jays had a record of 26-35 during the 1996 season?
SELECT COUNT(attendance) FROM table_name_64 WHERE record = "26-35"
Which films participated in the 61st Berlin international film festival?
SELECT participants_recipients FROM table_29644931_1 WHERE film_festival = "61st Berlin International film_festival"
What is the risk level of the establishment that Bob Benson inspected?
SELECT DISTINCT T3.risk_level FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id INNER JOIN establishment AS T3 ON T2.license_no = T3.license_no WHERE T1.first_name = 'Bob' AND T1.last_name = 'Benson'
Who was perfomer one on 30 January 1988?
SELECT performer_1 FROM table_14934885_1 WHERE date = "30 January 1988"
Which Year has a Binibining Pilipinas International of alma concepcion?
SELECT year FROM table_name_54 WHERE binibining_pilipinas_international = "alma concepcion"
Find the name of the product that has the smallest capacity.
SELECT catalog_entry_name FROM catalog_contents ORDER BY capacity ASC LIMIT 1
Where did the player who won in 1991 finish?
SELECT finish FROM table_name_1 WHERE year_s__won = "1991"
On 1887-07-21, what was the event that lead to the creation of menu id 21380?
SELECT event FROM Menu WHERE date = '1887-07-21' AND id = 21380
What is the smallest 08-09 GP/JGP 2nd value when WS points equals 3197?
SELECT MIN(08 AS _09_gp_jgp_2nd) FROM table_23938357_7 WHERE ws_points = 3197
Name the people who wrote number 67
SELECT written_by FROM table_12419515_5 WHERE series__number = 67
How many churches opened before 1850 are there?
SELECT count(*) FROM Church WHERE Open_Date < 1850
Show all artist names and the year joined who are not from United States.
SELECT name , year_join FROM artist WHERE country != 'United States'
WHAT IS THE LEAGUE WITH HOME 1-1?
SELECT league FROM table_name_63 WHERE home = "1-1"
What is the sum of all ratings at a weekly rank of 10 and a share less than 11?
SELECT SUM(rating) FROM table_name_33 WHERE weekly_rank___number_ = "10" AND share < 11
What is the highest Loss, when Long is greater than 0, when Gain is greater than 484, and when Avg/g is greater than 126.4?
SELECT MAX(loss) FROM table_name_75 WHERE long > 0 AND gain > 484 AND avg_g > 126.4
Lists all parts supplied by Supplier#000000034.
SELECT T3.p_name FROM partsupp AS T1 INNER JOIN supplier AS T2 ON T1.ps_suppkey = T2.s_suppkey INNER JOIN part AS T3 ON T1.ps_partkey = T3.p_partkey WHERE T2.s_name = 'Supplier#000000034'
What was the result when there were 6 matches?
SELECT result FROM table_name_13 WHERE matches = "6"
what are the names of the ships ordered by ascending tonnage?
SELECT Name FROM ship ORDER BY Tonnage ASC
What is the number of entries associated with more than 11 wins?
SELECT entries FROM table_name_51 WHERE wins > 11
Can you tell me the Country that has the Year(s) Won of 1988?
SELECT country FROM table_name_21 WHERE year_s__won = "1988"
Show the most common position of players in match seasons.
SELECT POSITION FROM match_season GROUP BY POSITION ORDER BY count(*) DESC LIMIT 1
Show the years and the official names of the host cities of competitions.
SELECT T2.Year , T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID
Find the number of products for each manufacturer, showing the name of each company.
SELECT count(*) , T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.name
Who played SS when paul konerko played 1st base?
SELECT shortstop FROM table_12142298_2 WHERE first_baseman = "Paul Konerko"
Calculate the monthly average salary of the employee with highest salary. Mention his name, position title and location city.
SELECT SUM(CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL)) / 12 AS avg, T1.firstname, T1.lastname , T2.positiontitle, T3.locationcity FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID INNER JOIN location AS T3 ON T1.locationID = T3.locationID WHERE CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL) = ( SELECT MAX(CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL)) FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID INNER JOIN location AS T3 ON T1.locationID = T3.locationID )
What college team did Derek Fisher play for?
SELECT school_club_team FROM table_name_19 WHERE player = "derek fisher"
Who was the opponent at the game attended by 23,203?
SELECT opponent FROM table_name_63 WHERE attendance = "23,203"
which opponent is from February 12?
SELECT opponent FROM table_name_1 WHERE date = "february 12"
What is the name of the most popular restaurant serving Asian foods in San Francisco?
SELECT label FROM generalinfo WHERE food_type = 'asian' AND city = 'san francisco' AND review = ( SELECT MAX(review) FROM generalinfo WHERE food_type = 'asian' AND city = 'san francisco' )
Which Total has a Rank of 4, and a Silver smaller than 4?
SELECT AVG(total) FROM table_name_36 WHERE rank = "4" AND silver < 4
That was fast, thank you again :) Could you please let me know which station is located in the highest latitude?
select name from station order by lat desc limit 1
And the average?
SELECT avg ( stars ) FROM Rating ORDER BY stars aSC LIMIT 1
Which institution is located in Reading, PA?
SELECT institution FROM table_name_44 WHERE location = "reading, pa"
For each position, what is the maximum number of hours for students who spent more than 1000 hours training?
SELECT max(T1.HS) , pPos FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T1.HS > 1000 GROUP BY T2.pPos
Which is the highest Rd 1 has a Province of utrecht and a Rd 4 larger than 0?
SELECT MAX(rd_1) FROM table_name_70 WHERE province = "utrecht" AND rd_4 > 0
How many players had a best winning average of 20?
SELECT COUNT(games_won) FROM table_27533947_1 WHERE best_winning_average = "20"
On which date did they play Leicester City in Venue A?
SELECT date FROM table_name_38 WHERE venue = "a" AND opponents = "leicester city"
What is the Type for l. publilius philo vulscus?
SELECT type FROM table_name_46 WHERE name = "l. publilius philo vulscus"
How many cities are in the Philippines?
SELECT COUNT(ID) FROM City WHERE Name = 'PHL'
What's the smallest total with a bronze count of 5 and a gold count less than 8?
SELECT MIN(total) FROM table_name_89 WHERE bronze = 5 AND gold < 8
List the titles of the books in ascending order of issues.
SELECT Title FROM book ORDER BY Issues ASC
In which year did the least people enter hall of fame?
SELECT yearid FROM hall_of_fame GROUP BY yearid ORDER BY count(*) ASC LIMIT 1;
Count the number of distinct store locations.
SELECT count(DISTINCT LOCATION) FROM shop
What Song's Index is F6?
SELECT song FROM table_name_58 WHERE index = "f6"
Which Frequency MHz is the highest one that has a City of license of byron, ga?
SELECT MAX(frequency_mhz) FROM table_name_38 WHERE city_of_license = "byron, ga"
Who was the home team in the game where North Melbourne was the away team?
SELECT home_team AS score FROM table_name_25 WHERE away_team = "north melbourne"
What players were those draft pick numbers for? | do you want to see both the players and the draft pick numbers? | Yes please.
Select player, draft_pick_number from match_season where draft_class in ( SELECT DISTINCT draft_class FROM match_season WHERE College = "UCLA" OR College = "Duke" )
How many arrests have been made due to forcible entry burglary that took place in a day care center?
SELECT SUM(CASE WHEN T2.arrest = 'TRUE' THEN 1 ELSE 0 END) FROM IUCR AS T1 INNER JOIN Crime AS T2 ON T1.iucr_no = T2.iucr_no WHERE T2.location_description = 'DAY CARE CENTER' AND T1.secondary_description = 'FORCIBLE ENTRY' AND T1.primary_description = 'BURGLARY'
How many of the customer's reference ID that has a TRUE response?
SELECT COUNT(REFID) FROM Mailings1_2 WHERE RESPONSE = 'true'
Find the product name of the ALA synthase?
SELECT Product from enzyme where name = "ALA synthase"
What is the produdction code and channel of the most recent cartoon ?
select production_code , channel from cartoon order by original_air_date desc limit 1
Which Title has a Termination of Mission of current?
SELECT title FROM table_name_94 WHERE termination_of_mission = "current"
How many years have a Form album of the thing?
SELECT SUM(year) FROM table_name_39 WHERE from_album = "the thing"
List the hosts of performances in ascending order of attendance.
SELECT HOST FROM performance ORDER BY Attendance ASC
What is Language, when Content is Monoscopio?
SELECT language FROM table_name_27 WHERE content = "monoscopio"
What is the highest Attendance, when Result is l 26-16, and when Week is less than 12?
SELECT MAX(attendance) FROM table_name_36 WHERE result = "l 26-16" AND week < 12
Name the year for not nominated for alberto aruelo
SELECT year__ceremony_ FROM table_18123274_1 WHERE result = "Not Nominated" AND director = "Alberto Aruelo"
Find the number of patients who are not using the medication of Procrastin-X.
SELECT count(*) FROM patient WHERE SSN NOT IN ( SELECT T1.patient FROM Prescribes AS T1 JOIN Medication AS T2 ON T1.Medication = T2.Code WHERE T2.name = 'Procrastin-X' )
What is the supply cost for the part "violet olive rose ivory sandy"?
SELECT T2.ps_supplycost FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey WHERE T1.p_name = 'violet olive rose ivory sandy'
Find the ids of the departments where any manager is managing 4 or more employees.
SELECT DISTINCT department_id FROM employees GROUP BY department_id , manager_id HAVING COUNT(employee_id) >= 4
What is the lowest lost from drawn of 1 or greater?
SELECT MIN(lost) FROM table_name_18 WHERE drawn > 1
If the median income is $57,407, what is the per capita income?
SELECT per_capita_income FROM table_1840495_2 WHERE median_house__hold_income = "$57,407"
Which date was the show aired on the RTL Televizija network?
SELECT date_aired FROM table_name_35 WHERE network = "rtl televizija"
Show the party that has the most people.
SELECT Party FROM people GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1
Perfect! Can you update the list to include all of the candidate IDs in addition to these email addresses?
SELECT T2.candidate_id,T1.email_address FROM people AS T1 JOIN candidates AS T2 ON T1.person_id = T2.candidate_id
How many students enlisted in the fire-department?
SELECT COUNT(name) FROM enlist WHERE organ = 'fire_department'
What are the distinct last names of the students who have president votes and have 8741 as the advisor?
SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = PRESIDENT_Vote INTERSECT SELECT DISTINCT LName FROM STUDENT WHERE Advisor = "8741"
What is the name of the product with the highest retail price?
SELECT p_name FROM part WHERE p_retailprice = ( SELECT MAX(p_retailprice) FROM part )