sentence
stringlengths
3
347
sql
stringlengths
18
804
Which Year has a Producer of viva films, and a Title of magkapatid?
SELECT year FROM table_name_41 WHERE producer = "viva films" AND title = "magkapatid"
Can you tell me the average Points that has the Attendance of 3,806?
SELECT AVG(points) FROM table_name_42 WHERE attendance = 3 OFFSET 806
Can you provide me with the nickname of Janessa?
SELECT nickname FROM staff where first_name = "Janessa"
Return the famous titles for artists that have volumes that lasted more than 2 weeks on top.
SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2
What are the names of the teachers whose courses have not been arranged?
SELECT Name FROM teacher WHERE Teacher_id NOT IN (SELECT Teacher_id FROM course_arrange)
How many pages does the ISBN 1-40122-328-1 have?
SELECT SUM(pages) FROM table_name_47 WHERE isbn = "1-40122-328-1"
Calculate the percentage of left hand batting style players among all players.
SELECT CAST(SUM(CASE WHEN T2.Batting_hand = 'Left-hand bat' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.Player_Id) FROM Player AS T1 INNER JOIN Batting_Style AS T2 ON T1.Batting_hand = T2.Batting_Id
What are the visit date of the visitor whose detail is "Vincent"?
SELECT T2.Visit_Date FROM VISITORS AS T1 JOIN VISITS AS T2 ON T1.Tourist_ID = T2.Tourist_ID WHERE T1.Tourist_Details = "Vincent"
And are there any other shops on the same street? | What street are you referring to? | The street shop 10 is on.
SELECT * from shop where address = ( select address from shop where shop_id = 10 ) and shop_id ! = 10
Which Crime film got the lowest average rating?
SELECT T2.movieid FROM u2base AS T2 INNER JOIN movies2directors AS T3 ON T2.movieid = T3.movieid WHERE T3.genre = 'Crime' GROUP BY T2.movieid ORDER BY AVG(T2.rating) LIMIT 1
What is average and maximum salary of all employees.
SELECT avg(salary) , max(salary) FROM Employee
How many touchdowns did the player took which gained 25 points?
SELECT touchdowns FROM table_25711913_2 WHERE points = 25
What country is team ucla come from?
SELECT nationality FROM table_name_70 WHERE school_club_team = "ucla"
Name the director of alt i alt
SELECT director_s_ FROM table_name_92 WHERE film = "alt i alt"
What is the time/retired for grid 23?
SELECT time_retired FROM table_name_88 WHERE grid = 23
Name all stores and its sales representative in France territory.
SELECT T3.Name, T4.FirstName, T4.LastName FROM SalesTerritory AS T1 INNER JOIN Customer AS T2 ON T1.TerritoryID = T2.TerritoryID INNER JOIN Store AS T3 ON T2.StoreID = T3.BusinessEntityID INNER JOIN Person AS T4 ON T2.PersonID = T4.BusinessEntityID WHERE T1.Name = 'France'
List down the business ID with a low review count in Phoenix.
SELECT business_id FROM Business WHERE city LIKE 'Phoenix' AND review_count LIKE 'Low'
What are the customer id and name corresponding to accounts with a checking balance less than the largest checking balance?
SELECT T1.custid , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT max(balance) FROM checking)
Available in 2-CD format, what is the title of story number 026?
SELECT title FROM table_name_83 WHERE format = "2-cd" AND story__number = "026"
How many object elements can be detected on image no. 31?
SELECT COUNT(OBJ_CLASS_ID) FROM IMG_OBJ WHERE IMG_ID = 31
Find the name of the artist who made the album "Balls to the Wall".
SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T1.Title = "Balls to the Wall"
what are the ids and names of the web accelerators that are compatible with two or more browsers?
SELECT T1.id , T1.Name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id GROUP BY T1.id HAVING count ( * ) > = 2
What is the amount of discount applied to the product with the highest net profit and what is the name of the said product?
SELECT T1.`Unit Price` * T1.`Discount Applied`, T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID ORDER BY REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '') DESC LIMIT 1
How many kinds of different ratings are listed?
SELECT count(DISTINCT rating) FROM film
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
How many journals don’t have a short name?
SELECT COUNT(ShortName) FROM Journal WHERE ShortName = ''
List the store ID of the film titled "Amadeus Holy".
SELECT T2.store_id FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id WHERE T1.title = 'Amadeus Holy'
What are the total number of Domestic Passengers of airports that contain the word "London".
SELECT sum(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE "%London%"
can you show me a list of login name?
SELECT login_name FROM students
CAN YOU GIVE ME THE LIST OF architect NAME
SELECT name FROM architect
On what date is the Score 94-109?
SELECT date FROM table_name_54 WHERE score = "94-109"
What is the sexual abuse rate where the conflict is the Burundi Civil War?
SELECT MAX(sexual_abuse_1) FROM table_15652027_1 WHERE conflict = "Burundi Civil War"
Name the condition for partial thromboplastin time of prolonged and platelet count of unaffected with bleeding time of prolonged
SELECT condition FROM table_name_41 WHERE partial_thromboplastin_time = "prolonged" AND platelet_count = "unaffected" AND bleeding_time = "prolonged"
What teams has a home of 5-0?
SELECT teams FROM table_name_58 WHERE home = "5-0"
What is the position for round 5 from alabama state?
SELECT position FROM table_name_39 WHERE round = 5 AND college = "alabama state"
How many people have a Median household income of $37,759?
SELECT SUM(population) FROM table_name_66 WHERE median_household_income = "$37,759"
How many episodes in the series has a production code of 111?
SELECT COUNT(series) FROM table_24425976_2 WHERE production_code = "111"
What's the name of the second biggest desert?
SELECT Name FROM desert ORDER BY Area DESC LIMIT 1, 1
What trains go to station ID 1?
SELECT * FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id where T1.station_id = 1
what is the crime rate of Campbell River
SELECT Crime_rate FROM county_public_safety WHERE Name = "Campbell River"
What is the average ticket sales gross in dollars of films?
SELECT avg(Gross_in_dollar) FROM film
What team competed in 2003?
SELECT team FROM table_2266976_1 WHERE year = "2003"
What was the number of seat changes when the % of votes was 23.75?
SELECT change_in_seat FROM table_149330_1 WHERE _percentage_of_votes = "23.75"
Name the m r romaja for kwanbuk
SELECT m_r_romaja FROM table_160510_5 WHERE region = "Kwanbuk"
How many documents are using the template with type code 'PPT'?
SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT'
Show station names without any trains.
SELECT name FROM station WHERE station_id NOT IN (SELECT station_id FROM train_station)
What are the student ids for all male students?
SELECT StuID FROM Student WHERE Sex = 'M'
Who was the opponent when Richmond played as the home team?
SELECT away_team FROM table_name_56 WHERE home_team = "richmond"
how many English professors there
SELECT count ( * ) from professor where DEPT_CODE = "ENG"
Show ids for all templates not used by any document.
SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents
Show all distinct product categories along with the number of mailshots in each category.
SELECT product_category , count(*) FROM mailshot_campaigns GROUP BY product_category
What are the first names of all employees that are professors ordered by date of birth?
SELECT emp_fname FROM employee WHERE emp_jobcode = 'PROF' ORDER BY emp_dob
What is the subject when the highest mark is 79?
SELECT subject FROM table_29842201_1 WHERE highest_mark = 79
Find the first name of students in the descending order of age.
SELECT Fname FROM STUDENT ORDER BY Age DESC
What is the acceleration 0-100km/h that was produced in 2002-2006?
SELECT acceleration_0_100km_h__0_62mph_ FROM table_1857216_1 WHERE production = "2002-2006"
What is the traditional Chinese name for the record Beautiful?
SELECT chinese__traditional_ FROM table_name_84 WHERE english_title = "beautiful"
Who wrote the episode that is production code 202?
SELECT written_by FROM table_26448179_3 WHERE production_code = "202"
Find the location and all games score of the school that has Clemson as its team name.
SELECT t2.All_Games , t1.location FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE team_name = 'Clemson'
What is the lowest Game where Inning is 6th, and the Opposing Pitcher is cliff curtis?
SELECT MIN(game) FROM table_name_14 WHERE inning = "6th" AND opposing_pitcher = "cliff curtis"
Show me the details of weight of the all body builders
SELECT T2.Weight FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID
What college has the Chicago Stags?
SELECT college FROM table_name_60 WHERE team = "chicago stags"
What game was located at the Los Angeles Memorial Sports Arena?
SELECT game FROM table_name_60 WHERE location_attendance = "los angeles memorial sports arena"
On how many different dates was the episode written by Charlie Day aired for the first time?
SELECT COUNT(original_air_date) FROM table_29273115_1 WHERE written_by = "Charlie Day"
Who was the opponent on May 20?
SELECT opponent FROM table_name_74 WHERE date = "may 20"
what is the maximum booked count
SELECT max ( booked_count ) FROM products_booked
Return the titles and directors of films that were never in the market of China.
SELECT title , director FROM film WHERE film_id NOT IN (SELECT film_id FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.market_id = T2.Market_ID WHERE country = 'China')
Find the names of users who did not leave any review.
SELECT name FROM useracct WHERE u_id NOT IN (SELECT u_id FROM review)
What shows for 2010 Employees (Total) when the employer is University of Alberta?
SELECT SUM(2010 AS _employees__total_) FROM table_name_1 WHERE employer = "university of alberta"
Find the names of goods that receive a rating of 10.
SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating = 10
What is the average land area with a density of 815.48, and a Population larger than 411?
SELECT AVG(land_area__hectares_) FROM table_name_29 WHERE density__inh_km²_ = 815.48 AND population > 411
Find the names of papers which are published in the year 1996.
SELECT Title FROM Paper WHERE year = 1996
Among the employees who are store contacts, how many of them have a title of "Mr."?
SELECT COUNT(BusinessEntityID) FROM Person WHERE PersonType = 'SC' AND Title = 'Mr.'
what is the place when losses is less than 12 and points is less than 19?
SELECT SUM(place) FROM table_name_12 WHERE lost < 12 AND points < 19
What is the total number of flights that have Oklahoma as their origin?
SELECT COUNT(*) AS num FROM Airlines WHERE Origin = 'OKC'
What is the average No Units, when the Name is Fung Shing Court, and when the No Blocks is fewer than 3?
SELECT AVG(no_units) FROM table_name_99 WHERE name = "fung shing court" AND no_blocks < 3
In 2010, how many PS3 games were released?
SELECT COUNT(T3.game_id) FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN game_publisher AS T3 ON T2.game_publisher_id = T3.id WHERE T1.platform_name = 'PS3' AND T2.release_year = 2010
WHAT YEAR HAS A BRONZE OF VALENTIN NOVIKOV?
SELECT AVG(year) FROM table_name_88 WHERE bronze = "valentin novikov"
How many laps did Jos Verstappen do on Grid 2?
SELECT SUM(laps) FROM table_name_43 WHERE grid > 2 AND driver = "jos verstappen"
What is the most common mill type?
SELECT TYPE FROM mill GROUP BY TYPE ORDER BY count ( * ) DESC LIMIT 1
What number of bonus points did Stade Français?
SELECT bonus_points FROM table_name_38 WHERE club = "stade français"
What are the first names of all history professors who do not teach?
SELECT T1.emp_fname FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T3.dept_name = 'History' EXCEPT SELECT T4.emp_fname FROM employee AS T4 JOIN CLASS AS T5 ON T4.emp_num = T5.prof_num
How many elite users have reviewed Yelp_Business no.1?
SELECT COUNT(T1.user_id) FROM Users AS T1 INNER JOIN Elite AS T2 ON T1.user_id = T2.user_id INNER JOIN Reviews AS T3 ON T1.user_id = T3.user_id WHERE T3.business_id = 1
Which place was earned on 12 feb 2012?
SELECT place FROM table_name_93 WHERE date = "12 feb 2012"
Show template ids, version numbers, and template type codes for all templates.
SELECT template_id , version_number , template_type_code FROM Templates
Name the date for lebron james , mo williams (21)
SELECT date FROM table_22654073_6 WHERE high_points = "LeBron James , Mo Williams (21)"
What is the name of the club with a rank of 5?
SELECT club FROM table_name_78 WHERE rank = "5"
Tell me the games for men's 5000 metres
SELECT games FROM table_name_18 WHERE event = "men's 5000 metres"
what are the names of all catalogs
SELECT catalog_name FROM catalogs
What is every weekly schedule in the country of Norway?
SELECT weekly_schedule FROM table_18821196_1 WHERE country = "Norway"
In "A Lover's Complaint", what is the description of Act 1, Scene 1?
SELECT T2.Description FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Act = 1 AND T2.Scene = 1 AND T1.Title = 'A Lover''s Complaint'
who is the winners where season result is 9th
SELECT winners FROM table_1139835_3 WHERE season_result = "9th"
What is Date, when Tie no is "3"?
SELECT date FROM table_name_33 WHERE tie_no = "3"
how many screen mode there
SELECT count ( * ) from screen_mode
What's the attendance when the week was more than 16?
SELECT attendance FROM table_name_95 WHERE week > 16
Provide the number of students at Yale University in 2016.
SELECT T1.num_students FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T2.university_name = 'Yale University' AND T1.year = 2016
Average length of the rivers flowing into the Donau River.
SELECT * FROM river WHERE Name = 'Donau'
Show all movie titles, years, and directors, ordered by budget.
SELECT title , YEAR , director FROM movie ORDER BY budget_million
When is the release date for a chip that has a Frequency of 2300mhz?
SELECT release_date FROM table_name_88 WHERE frequency = "2300mhz"
What county has a CERCLIS ID of scd037405362?
SELECT county FROM table_name_64 WHERE cerclis_id = "scd037405362"
List the name of the cars with model year 1975.
SELECT T1.car_name FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T2.model_year = 1975