sentence
stringlengths
3
347
sql
stringlengths
18
804
What language was the most used in movies released in 2006?
SELECT T.language_id FROM ( SELECT T1.language_id, COUNT(T1.language_id) AS num FROM film AS T1 INNER JOIN language AS T2 ON T1.language_id = T2.language_id WHERE STRFTIME('%Y',T1.release_year) = '2006' GROUP BY T1.language_id ) AS T ORDER BY T.num DESC LIMIT 1
What points larger than 1950 has a maserati straight-6 engine?
SELECT points FROM table_name_68 WHERE year > 1950 AND engine = "maserati straight-6"
what is the country of University of Oxford
SELECT country from Inst where name = "University of Oxford"
What are the types of vocals that the musician with the first name "Solveig" played in the song "A Bar in Amsterdam"?
SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid JOIN band AS T3 ON T1.bandmate = T3.id WHERE T3.firstname = "Solveig" AND T2.title = "A Bar In Amsterdam"
What is the name of the artist that issued the single on 23 February?
SELECT artist FROM table_name_43 WHERE issue_date_s_ = "23 february"
How many routes are not operated by American Airlines?
SELECT count ( * ) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name ! = 'American Airlines'
What year was the winning race time 1:55:13?
SELECT MAX(year) FROM table_17801022_1 WHERE race_time = "1:55:13"
Find all students taught by MARROTTE KIRK. Output first and last names of students.
SELECT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "MARROTTE" AND T2.lastname = "KIRK"
Calvin Abueva Calvin Abueva had what statistic?
SELECT statistic FROM table_name_70 WHERE name = "calvin abueva calvin abueva"
What was the average crowd size at Victoria Park?
SELECT AVG(crowd) FROM table_name_22 WHERE venue = "victoria park"
Show year where a track with a seating at least 5000 opened and a track with seating no more than 4000 opened.
SELECT year_opened FROM track WHERE seating BETWEEN 4000 AND 5000
Who are their coaches?
SELECT T3.Player_name , T2.coach_name 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
What is the average score for "Chairman Bao" in all its unscheduled routine inspections?
SELECT CAST(SUM(CASE WHEN T2.name = 'Chairman Bao' THEN T1.score ELSE 0 END) AS REAL) / COUNT(CASE WHEN T1.type = 'Routine - Unscheduled' THEN T1.score ELSE 0 END) FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id
list the details of the purchases
SELECT purchase_details FROM Purchases
In what position did Salina Kosgei finish in the Tokyo Marathon?
SELECT position FROM table_name_23 WHERE competition = "tokyo marathon"
How many appearances were made by people that had 5 goals and less than 7 rank?
SELECT COUNT(appearances) FROM table_name_95 WHERE goals = 5 AND rank < 7
What was the score when Mark parterned with lorenzo manta?
SELECT score FROM table_name_19 WHERE partner = "lorenzo manta"
Find the start and end dates of detentions of teachers with last name "Schultz".
SELECT T1.datetime_detention_start , datetime_detention_end FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id WHERE T2.last_name = "Schultz"
What percent did LINKE get in Tyrol?
SELECT linke FROM table_name_99 WHERE state = "tyrol"
How many students are over 18 and do not have allergy to food type or animal type?
SELECT count(*) FROM Student WHERE age > 18 AND StuID NOT IN ( SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "food" OR T2.allergytype = "animal")
Which Player has a Position of forward?
SELECT player FROM table_name_18 WHERE position = "forward"
Show the id and name of the employee with maximum salary.
SELECT eid , name FROM Employee ORDER BY salary DESC LIMIT 1
Which label is in a limited edition cd/dvd format?
SELECT label FROM table_name_19 WHERE format = "limited edition cd/dvd"
What country has the player Tiger Woods?
SELECT country FROM table_name_60 WHERE player = "tiger woods"
Who was the driver of truck no.3 on 2016/9/19? Tell the full name.
SELECT T3.first_name, T3.last_name FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id INNER JOIN driver AS T3 ON T3.driver_id = T2.driver_id WHERE T1.truck_id = '3' AND T2.ship_date = '2016-09-19'
Which recipe needs the most frozen raspberries in light syrup? State its title.
SELECT T1.title FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id INNER JOIN Ingredient AS T3 ON T3.ingredient_id = T2.ingredient_id WHERE T3.name = 'frozen raspberries in light syrup' AND T2.max_qty = T2.min_qty
What was the format for the 4 disc season that had less than 22 episodes and n/a for region 4?
SELECT format FROM table_name_86 WHERE _number_episodes < 22 AND _number_disc_s_ = 4 AND region_4 = "n/a"
What is the most recent year that Queen Nefertiti (pegasus two) was built?
SELECT MAX(built) FROM table_name_44 WHERE name = "queen nefertiti (pegasus two)"
How many competitor ids does Martina Kohlov have?
SELECT COUNT(T2.id) FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id WHERE T1.full_name = 'Martina Kohlov'
What are ids of the faculty members who not only participate in an activity but also advise a student.
SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student
What's the score of the game with 31-29 record?
SELECT score FROM table_22669044_10 WHERE record = "31-29"
How much donations have been collected for project 'Whistle While We Work!'?
SELECT SUM(T2.donation_to_project) FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.title = 'Whistle While We Work!'
How many entries are there for vote when the air date was 15 november 1997?
SELECT COUNT(vote) FROM table_25016824_2 WHERE air_date = "15 November 1997"
State the address location of store No.1.
SELECT T1.address, T1.address2, T1.district FROM address AS T1 INNER JOIN store AS T2 ON T1.address_id = T2.address_id WHERE T2.store_id = 1
Name the most no votes
SELECT MAX(no_votes) FROM table_256286_14
List the director's name of the movies released between 1/01/1916 and 12/31/1925.
SELECT T2.person_name FROM movie_cast AS T1 INNER JOIN person AS T2 ON T1.person_id = T2.person_id INNER JOIN movie AS T3 ON T1.movie_id = T3.movie_id INNER JOIN movie_crew AS T4 ON T1.movie_id = T4.movie_id WHERE T4.job = 'Director' AND T3.release_date BETWEEN '1916-01-01' AND '1925-12-31'
How many solutions does the repository which has 1445 Forks contain?
SELECT COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Forks = 1445
How many products were ordered in the order with the highest freight?
SELECT COUNT(T2.ProductID) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID GROUP BY T2.ProductID ORDER BY COUNT(T1.Freight) DESC LIMIT 1
What country has a fire store of 1991 and a hard discounter of 397?
SELECT country FROM table_name_2 WHERE first_store = "1991" AND hard_discounters = "397"
How many amenities are offered in all dorms?
select count ( * ) from Dorm_amenity
Count the number of courses with more than 2 credits.
SELECT count(*) FROM COURSE WHERE Credits > 2
What are the payment method codes that have been used by more than 3 parties?
SELECT payment_method_code FROM parties GROUP BY payment_method_code HAVING count(*) > 3
Which weather station has the highest number of stores?
SELECT station_nbr FROM relation GROUP BY station_nbr ORDER BY COUNT(store_nbr) DESC LIMIT 1
Question doesn't make sense since there is no team of pramac d'antin ducati
SELECT MIN(year) FROM table_name_46 WHERE team = "pramac d'antin ducati"
Return the cities with more than 3 airports in the United States.
SELECT city FROM airports WHERE country = 'United States' GROUP BY city HAVING count(*) > 3
What is the class of the Middletown High School team that is in the DSHA league?
SELECT class FROM table_name_98 WHERE league = "dsha" AND school = "middletown high school"
How many sales teams are there in the Midwest?
SELECT SUM(CASE WHEN Region = 'Midwest' THEN 1 ELSE 0 END) FROM `Sales Team`
What is the 2nd leg where Team 2 is fc 105 libreville?
SELECT 2 AS nd_leg FROM table_name_9 WHERE team_2 = "fc 105 libreville"
Name the featuring for pat mills
SELECT featuring FROM table_1620397_2 WHERE author = "Pat Mills"
Name the director for maya vision international ltd
SELECT director_s_ FROM table_name_81 WHERE recipient = "maya vision international ltd"
Name the date for result of draw, and venue of edgbaston
SELECT date FROM table_name_37 WHERE result = "draw" AND venue = "edgbaston"
Which city has the most bad aliases?
SELECT T2.city FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code GROUP BY T1.bad_alias ORDER BY COUNT(T1.zip_code) DESC LIMIT 1
find the ids of reviewers who did not give 4 star.
SELECT rID FROM Rating EXCEPT SELECT rID FROM Rating WHERE stars = 4
What are the types and countries of competitions?
SELECT Competition_type , Country FROM competition
Name the outcome on 6 october 2013
SELECT outcome FROM table_name_70 WHERE date = "6 october 2013"
What are the publishers who have published a book in both 1989 and 1990?
SELECT publisher FROM book_club WHERE YEAR = 1989 INTERSECT SELECT publisher FROM book_club WHERE YEAR = 1990
What are names of stations that have average bike availability above 10 and are not located in San Jose city?
SELECT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id HAVING avg(bikes_available) > 10 EXCEPT SELECT name FROM station WHERE city = "San Jose"
Show all card type codes.
SELECT DISTINCT card_type_code FROM Customers_Cards
Who is a Creator of hyriand?
SELECT name FROM table_name_47 WHERE creator = "hyriand"
Name the frequency mhz for fcc and ERP W of 9 watts
SELECT frequency_mhz FROM table_name_7 WHERE fcc_info = "fcc" AND erp_w = "9 watts"
What are the number of votes from state 'NY' or 'CA'?
SELECT count(*) FROM votes WHERE state = 'NY' OR state = 'CA'
list out the campuses name
SELECT campus FROM campuses
Return the colleges that have players who play the Midfielder position, as well as players who play the Defender position.
SELECT College FROM match_season WHERE POSITION = "Midfielder" INTERSECT SELECT College FROM match_season WHERE POSITION = "Defender"
How many goals scored against the opposing team occurred with more than 7 losses, less than 27 goals scored for the team and drawn more than 1?
SELECT COUNT(goals_against) FROM table_name_85 WHERE lost > 7 AND goals_for < 27 AND drawn > 1
How much salary does Jessica Anthony receive?
SELECT salary FROM employee WHERE first_name = 'Jessica' AND last_name = 'Anthony'
What is the site of the game with a Record of 6-2?
SELECT game_site FROM table_name_35 WHERE record = "6-2"
What is the id for the employee called Ebba?
SELECT employee_ID FROM Employees WHERE employee_name = "Ebba"
How many Rebounds did Novica Veličković get in less than 22 Games?
SELECT SUM(rebounds) FROM table_name_6 WHERE name = "novica veličković" AND games < 22
How many active employees whose payrate is equal or below 30 per hour.
SELECT COUNT(T1.BusinessEntityID) FROM Employee AS T1 INNER JOIN EmployeePayHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.CurrentFlag = 1 AND T2.Rate <= 30
What's the draw having the result of 10%?
SELECT AVG(draw) FROM table_name_29 WHERE result = "10%"
Find the number of students who participate in the tryout for each college ordered by descending count.
SELECT count(*) , cName FROM tryout GROUP BY cName ORDER BY count(*) DESC
And for Blake?
SELECT pID FROM Player WHERE pName = "Blake"
What date did Jamie McMurray win the race?
SELECT date FROM table_17801022_1 WHERE driver = "Jamie McMurray"
Show the transaction type descriptions and dates if the share count is smaller than 10.
SELECT T1.transaction_type_description, T2.date_of_transaction FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code = T2.transaction_type_code WHERE T2.share_count < 10
What is the total balance of "Weeks" Checking and savings.
SELECT T3.balance + T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T1.name = "Weeks"
show the order id, product id with order quantity
SELECT order_id, product_id, order_quantity FROM INVOICES
What is the most expensive product?
SELECT ProductName FROM Products WHERE UnitPrice = ( SELECT MAX(UnitPrice) FROM Products )
can you show me their ratings?
SELECT artist_name, rating FROM song
Which region does "Supplier#000000129" belong to?
SELECT T3.r_name FROM nation AS T1 INNER JOIN supplier AS T2 ON T1.n_nationkey = T2.s_nationkey INNER JOIN region AS T3 ON T1.n_regionkey = T3.r_regionkey WHERE T2.s_name = 'Supplier#000000129'
What positions were drafted from Las Vegas, NV?
SELECT position FROM table_11677100_16 WHERE hometown = "Las Vegas, NV"
Who wears the jersey number 20 and has the position of SG?
SELECT player FROM table_name_5 WHERE position = "sg" AND jersey_number_s_ = "20"
Which Competition has a Year smaller than 2009, and Notes of 56.16 m?
SELECT competition FROM table_name_13 WHERE year < 2009 AND notes = "56.16 m"
Who are shown as candidates when George Darden is the incumbent?
SELECT candidates FROM table_1341598_11 WHERE incumbent = "George Darden"
Find the title and star rating of the movie that got the least rating star for each reviewer.
SELECT T2.title , T1.rID , T1.stars , min(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.rID
What player attended Graceland College?
SELECT player FROM table_name_94 WHERE college = "graceland"
List all students' first names and last names who majored in 600.
SELECT Fname , Lname FROM Student WHERE Major = 600;
State 10 emails of UK Sales Rep who have the lowest credit limit.
SELECT DISTINCT T2.email FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE T2.jobTitle = 'Sales Rep' AND T1.country = 'UK' ORDER BY T1.creditLimit LIMIT 10
What was the result of the election of the incumbent clyde doyle?
SELECT result FROM table_1341973_6 WHERE incumbent = "Clyde Doyle"
Which nation has the America 3 Foundation syndicate and the jayhawk yacht?
SELECT nation FROM table_name_81 WHERE syndicate = "america 3 foundation" AND yacht = "jayhawk"
Which Lost has Drawn larger than 12, and Goals Against of 54?
SELECT MAX(lost) FROM table_name_94 WHERE drawn > 12 AND goals_against = 54
What is the route for the destination of guruvayur?
SELECT route_via FROM table_29770377_1 WHERE destination = "Guruvayur"
What is the date when jameer nelson (10) had the high assists?
SELECT date FROM table_27700530_10 WHERE high_assists = "Jameer Nelson (10)"
How many bronze medals did the team have with 0 total silver and less than 3 total medals?
SELECT bronze FROM table_name_4 WHERE total < 3 AND silver > 0
What is the lowest number of episodes in a series with an airing date of 12 jan- 6 feb?
SELECT MIN(number_of_episodes) FROM table_name_22 WHERE airing_date = "12 jan- 6 feb"
What film was released in 1996?
SELECT film FROM table_name_76 WHERE year = 1996
Which Draws have Losses larger than 8, and a Hampden FL of terang-mortlake?
SELECT draws FROM table_name_18 WHERE losses > 8 AND hampden_fl = "terang-mortlake"
What was the score of the home team when Richmond was the away team?
SELECT home_team AS score FROM table_name_42 WHERE away_team = "richmond"
When did the first staff for the projects started working?
SELECT date_from FROM Project_Staff ORDER BY date_from ASC LIMIT 1;
How many departments are there?
select count ( * ) from department
What is the range of capacity among rooms in each building?
SELECT max ( capacity ) , min ( capacity ) , building FROM classroom GROUP BY building