sentence
stringlengths
3
347
sql
stringlengths
18
804
Find the number of routes from the United States to Canada.
SELECT count(*) FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country = 'Canada') AND src_apid IN (SELECT apid FROM airports WHERE country = 'United States')
What team did a manager leave on 12 Dec 2009
SELECT team FROM table_22297198_3 WHERE date_of_vacancy = "12 Dec 2009"
What are the product id and product type of the cheapest product?
SELECT product_id , product_type_code FROM products ORDER BY product_price LIMIT 1
Who has the high assists when 0-1 is the series?
SELECT high_assists FROM table_22871316_11 WHERE series = "0-1"
Show the name of ships whose nationality is either United States or United Kingdom.
SELECT Name FROM ship WHERE Nationality = "United States" OR Nationality = "United Kingdom"
What is the average number of movies added to the lists of user 8516503? Give the user profile image URL on Mubi.
SELECT AVG(T1.list_movie_number), T2.user_avatar_image_url FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.list_id = T2.list_id AND T1.user_id = T2.user_id WHERE T2.user_id = 8516503
What isssue has 7th heaven as an actual title?
SELECT issue FROM table_name_51 WHERE actual_title = "7th heaven"
What was the outcome for the Rome 2, Italy tournament?
SELECT outcome FROM table_name_73 WHERE tournament = "rome 2, italy"
Where does the student live? | Which student are you referring to? | Is there any students living in HKG or CHI?
SELECT count ( * ) FROM Student WHERE city_code = "HKG" OR city_code = "CHI"
Which height has a College of wyoming, and a Name of guy frazier?
SELECT height FROM table_name_72 WHERE college = "wyoming" AND name = "guy frazier"
What is average year for ayan mukerji?
SELECT AVG(year) FROM table_name_29 WHERE director = "ayan mukerji"
What is the highest Season, when Super G is 19?
SELECT MAX(season) FROM table_name_63 WHERE super_g = 19
How many departments did Sheela Ward work in between 1/1/2011 to 12/31/2012
SELECT COUNT(T3.Name) FROM Person AS T1 INNER JOIN EmployeeDepartmentHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN Department AS T3 ON T2.DepartmentID = T3.DepartmentID WHERE T1.FirstName = 'Sheela' AND T1.LastName = 'Word' AND STRFTIME('%Y', T3.ModifiedDate) BETWEEN '2011' AND '2012'
Which employee handled the most amount of orders in 1996? Give the full name, title, and address of this employee.
SELECT FirstName, LastName, Title, address FROM Employees WHERE EmployeeID = ( SELECT T1.EmployeeID FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderDate BETWEEN '1996-01-01 00:00:00' AND '1997-01-01 00:00:00' GROUP BY T1.EmployeeID ORDER BY COUNT(T2.OrderID) DESC LIMIT 1 )
what is the lowest position when the name is esv türkheim, and Drawn more than 0?
SELECT MIN(position) FROM table_name_12 WHERE name = "esv türkheim" AND drawn > 0
Which player who showed as the third goalie in a game has the biggest weight? Give the full name of the player.
SELECT T1.firstName, T1.lastName FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T2.stint = 3 ORDER BY T1.weight DESC LIMIT 1
What title was release November 17, 2009 in a 16:9 aspect ratio?
SELECT dvd_title FROM table_name_5 WHERE aspect_ratio = "16:9" AND release_date = "november 17, 2009"
What are the descriptions of all the project outcomes?
SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code
What Date had a Partner of urszula radwańska?
SELECT date FROM table_name_87 WHERE partner = "urszula radwańska"
How many females are there?
SELECT count ( * ) from people where sex = "F"
What time has humber college north as the ground, and toronto downtown dingos as the home?
SELECT time FROM table_name_58 WHERE ground = "humber college north" AND home = "toronto downtown dingos"
Find the first names of all the authors who have written a paper with title containing the word "Functional".
SELECT t1.fname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title LIKE "%Functional%"
Thank you for that! Can you filter the list to show the names of only the players whose decision is "yes"?
SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'
Tell me the loewst assume office for madeleine bordallo
SELECT MIN(assumed_office) FROM table_name_60 WHERE name = "madeleine bordallo"
Show the project details of the Table Name: Projects
SELECT project_details FROM projects
What was the result of the 1978 Atlanta Falcons season when the record was 1-2?
SELECT result FROM table_16710971_2 WHERE record = "1-2"
What is the product description for this product?
SELECT product_description FROM products WHERE product_name = "chervil"
Mention the height of people who belong to region id 7.
SELECT T2.height FROM person_region AS T1 INNER JOIN person AS T2 ON T1.person_id = T2.id WHERE T1.region_id = 7
Who was the incumbent in Pennsylvania 27?
SELECT incumbent FROM table_1342256_38 WHERE district = "Pennsylvania 27"
In what Round was the Memphis Player drafted?
SELECT AVG(round) FROM table_name_75 WHERE school_club_team = "memphis"
What was the score for the Toshiba Senior Classic?
SELECT score FROM table_11621799_1 WHERE tournament = "Toshiba Senior Classic"
At what Latitude and Longitude is the store that has used the WARE-PUJ1005 warehouse the fewest times?
SELECT T2.Latitude, T2.Longitude FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE T1.WarehouseCode = 'WARE-PUJ1005' GROUP BY T2.StoreID ORDER BY COUNT(T1.WarehouseCode) ASC LIMIT 1
How many networks aired the franchise in 1981 only?
SELECT COUNT(network) FROM table_12438767_1 WHERE dates_aired = "1981"
Which Ship has a Year larger than 2013?
SELECT ship FROM table_name_54 WHERE year > 2013
Give the review of the restaurant at 430, Broadway.
SELECT T1.review FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.street_name = 'Broadway' AND T2.street_num = 430
Can you Please list all departments?
SELECT DEPT_NAME FROM DEPARTMENT
What is the average age for each gender?
SELECT avg(age) , gender FROM Person GROUP BY gender
What is the smallest pick for the player, brett lindros?
SELECT MIN(pick) FROM table_1013129_1 WHERE player = "Brett Lindros"
Who had the most points in games over 59?
SELECT high_points FROM table_name_12 WHERE game > 59
Find the full name and email address of inactive customers whose record was created in 2006.
SELECT first_name, last_name, email FROM customer WHERE STRFTIME('%Y',create_date) = '2006' AND active = 0
Who was the trainer when the jockey was Luke Nolen?
SELECT trainer FROM table_24915874_1 WHERE jockey = "Luke Nolen"
How many annual interchanges are at that station?
SELECT T2.Annual_interchanges FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id GROUP BY T1.station_id ORDER BY count ( * ) DESC LIMIT 1
What is the course on 1 June?
SELECT course FROM table_name_10 WHERE date = "1 june"
how many times does ROY SWEAZY has reserved a room
SELECT count ( * ) FROM Reservations WHERE FirstName = "ROY" AND LastName = "SWEAZY"
What Social AO has an External CO of simonas savickas, and an Internal CO of pieter kuijsten?
SELECT social_ao FROM table_name_83 WHERE external_co = "simonas savickas" AND internal_co = "pieter kuijsten"
Give the bounding box of the kite in image no.2324765.
SELECT T2.X, T2.Y, T2.W, T2.H FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.IMG_ID = 2324765 AND T1.OBJ_CLASS = 'kite'
state el canal de las estrellas where mañana es para siempre is impreuna pentru totdeauna
SELECT el_canal_de_las_estrellas FROM table_18498743_1 WHERE mañana_es_para_siempre = "Impreuna pentru totdeauna"
What's the attendance of the game with a score of 5-4?
SELECT attendance FROM table_name_52 WHERE score = "5-4"
Name who wrote the episode by lawrence trilling
SELECT written_by FROM table_27504682_1 WHERE directed_by = "Lawrence Trilling"
What country has the SBA Towers Tower Hayneville?
SELECT country FROM table_name_71 WHERE name = "sba towers tower hayneville"
When were the boston bruins the home team?
SELECT date FROM table_name_95 WHERE home = "boston bruins"
What is the average horizontal bar points for all gymnasts?
SELECT avg(Horizontal_Bar_Points) FROM gymnast
Among the current legislators who do not have accounts on OpenSecrets.org., how many of them do not have instagram accounts either?
SELECT SUM(CASE WHEN T1.instagram IS NULL THEN 1 ELSE 0 END) AS count FROM `social-media` AS T1 INNER JOIN current AS T2 ON T1.bioguide = T2.bioguide_id WHERE T2.opensecrets_id IS NULL OR T2.opensecrets_id = ''
Tell me the constructor for alberto colombo and chassis of a1
SELECT constructor FROM table_name_3 WHERE driver = "alberto colombo" AND chassis = "a1"
How much higher is the salary of Andrew Fuller than that of Nancy Davolio?
SELECT ( SELECT Salary FROM Employees WHERE LastName = 'Fuller' AND FirstName = 'Andrew' ) - ( SELECT Salary FROM Employees WHERE LastName = 'Davolio' AND FirstName = 'Nancy' ) AS RESULT
Which championship had a final score of 6–4, 2–6, 6–4, 7–6(3)?
SELECT championship FROM table_2362486_1 WHERE score_in_the_final = "6–4, 2–6, 6–4, 7–6(3)"
How many menus were created for steamship?
SELECT COUNT(*) FROM Menu WHERE venue = 'STEAMSHIP'
Which Surface has an Opponent in the final of daniella dominikovic?
SELECT surface FROM table_name_5 WHERE opponent_in_the_final = "daniella dominikovic"
What was the SPA FEA when the LMS FEA was 5?
SELECT spa_fea FROM table_name_60 WHERE lms_fea = "5"
In the final against Ashley Harkleroad what was the score?
SELECT score FROM table_name_21 WHERE opponent_in_the_final = "ashley harkleroad"
Which of the titles have a duration time of 4:57?
SELECT title FROM table_name_81 WHERE duration = "4:57"
Find the number of users in each role.
SELECT count(*) , role_code FROM users GROUP BY role_code
What was the attendance when Essendon played as the home team?
SELECT COUNT(crowd) FROM table_name_42 WHERE home_team = "essendon"
Who was the nominee having a Tony award?
SELECT nominee FROM table_name_16 WHERE award = "tony award"
Which driver was in 8 rounds with a chassis of dallara f306?
SELECT driver FROM table_name_57 WHERE chassis = "dallara f306" AND rounds = "8"
display the employee ID for each employee and the date on which he ended his previous job.
SELECT employee_id , MAX(end_date) FROM job_history GROUP BY employee_id
List all church names in descending order of opening date.
SELECT name FROM church ORDER BY open_date DESC
Which Points have a December smaller than 6, and a Score of 1–1 ot, and a Game smaller than 28?
SELECT MIN(points) FROM table_name_1 WHERE december < 6 AND score = "1–1 ot" AND game < 28
Which Name has Apparent Magnitude smaller than 11.4, and R.A. (J2000) of 04h17m35.8s?
SELECT name FROM table_name_75 WHERE apparent_magnitude < 11.4 AND ra___j2000__ = "04h17m35.8s"
What is the average amount of floors of the building that is ranked larger than 30, a year prior to 1977 and an address of 100 Van Ness Avenue?
SELECT AVG(floors) FROM table_name_6 WHERE rank > 30 AND year < 1977 AND name = "100 van ness avenue"
Which time/retired had 75 laps and Pedro de la Rosa as a driver?
SELECT time_retired FROM table_name_86 WHERE laps = 75 AND driver = "pedro de la rosa"
Show the nicknames of schools that are not in division 1.
SELECT Nickname FROM school_details WHERE Division != "Division 1"
Which printer issued sheets on October 5, 2006?
SELECT printer FROM table_name_79 WHERE date_of_issue = "october 5, 2006"
Which City has a Lead of steve gould?
SELECT city FROM table_name_52 WHERE lead = "steve gould"
what is the average genes when the reference is 2009 and the strain is rku-1?
SELECT AVG(genes) FROM table_name_84 WHERE reference = "2009" AND strain = "rku-1"
which department has the most professors?
SELECT * FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY count ( * ) desc LIMIT 1
What network has a Play-by-play by Jack Edwards in 2000?
SELECT network FROM table_name_3 WHERE play_by_play = "jack edwards" AND year = 2000
What was the attendance for the game on August 16?
SELECT SUM(attendance) FROM table_name_74 WHERE date = "august 16"
Which department, altogether, has the most personnel who work the evening shift?
SELECT T3.Name FROM EmployeeDepartmentHistory AS T1 INNER JOIN Shift AS T2 ON T1.ShiftId = T2.ShiftId INNER JOIN Department AS T3 ON T1.DepartmentID = T3.DepartmentID WHERE T2.Name = 'Night' GROUP BY T3.Name ORDER BY COUNT(T1.BusinessEntityID) DESC LIMIT 1
what about black?
SELECT Name FROM city ORDER BY Black DESC LIMIT 1
Which fatality was at ankara for the aircraft douglas c-47?
SELECT fatalities FROM table_name_60 WHERE location = "ankara" AND aircraft = "douglas c-47"
What was the type when there were 175932 yes votes?
SELECT type FROM table_256286_40 WHERE yes_votes = 175932
What are the names of musicals who have no actors?
SELECT Name FROM musical WHERE Musical_ID NOT IN (SELECT Musical_ID FROM actor)
how many airports on this table
SELECT COUNT ( DISTINCT name ) FROM airport
What is the name of the manufacturer that has the third lowest revenue?
SELECT name FROM manufacturers ORDER BY revenue asc LIMIT 2,1
What is the email and phone number of Astrid Gruber the customer?
SELECT email , phone FROM customers WHERE first_name = "Astrid" AND last_name = "Gruber";
what is the venue on october 28, 2008?
SELECT venue FROM table_name_43 WHERE date = "october 28, 2008"
Who is the sponsor of the player with the least amount of votes?
SELECT Sponsor_name FROM player ORDER BY Votes asc LIMIT 1
What was the surface of the game that resulted in a final score of 6-1 7-5?
SELECT surface FROM table_name_90 WHERE score = "6-1 7-5"
What is the percentage of the trip were done by a subscriber?
SELECT CAST(COUNT(subscription_type) AS REAL) * 100 / ( SELECT COUNT(subscription_type) FROM trip ) FROM trip WHERE subscription_type = 'Subscriber'
Hello! Can you please provide me with a list of the player IDs and player names?
SELECT player_api_id, player_name FROM Player
What is the Surface of the match played on October 5, 1987?
SELECT surface FROM table_name_77 WHERE date = "october 5, 1987"
what's the election date where electorate is christchurch country
SELECT election_date FROM table_1193568_1 WHERE electorate = "Christchurch Country"
What are the names of the parts that have a part supply cost of at least 1,000?
SELECT T1.p_name FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey WHERE T2.ps_supplycost > 1000
what is the date for the tournament joué-lès-tours?
SELECT date FROM table_name_52 WHERE tournament = "joué-lès-tours"
Who called the race in 1998?
SELECT race_caller FROM table_22583466_3 WHERE year = 1998
Show the names of buildings except for those having an institution founded in 2003.
SELECT name FROM building EXCEPT SELECT T1.name FROM building AS T1 JOIN institution AS T2 ON T1.building_id = T2.building_id WHERE T2.founded = 2003
How many female legislators become representatives for California in 2015?
SELECT COUNT(*) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE STRFTIME('%Y', T2.start) = '2015' AND T2.state = 'CA' AND T1.gender_bio = 'F'
which Copa Libertadores 1996 has round 1 Supercopa 1995 and argentinos juniors team ?
SELECT copa_libertadores_1996 FROM table_name_10 WHERE supercopa_1995 = "round 1" AND team = "argentinos juniors"
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