sentence
stringlengths
3
347
sql
stringlengths
18
804
What are the authors of submissions and their colleges?
SELECT Author , College FROM submission
Calculate the revenues made by Fantasy Films and Live Entertainment.
SELECT SUM(T3.revenue) FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id INNER JOIN movie AS T3 ON T2.movie_id = T3.movie_id WHERE T1.company_name IN ('Fantasy Films', 'Live Entertainment')
What loss occurred on June 10?
SELECT loss FROM table_name_81 WHERE date = "june 10"
Show all the locations where some cinemas were opened in year 2010
SELECT LOCATION FROM cinema WHERE openning_year = 2010
What is the website of the cunningham hill infant school?
SELECT school AS website FROM table_28523_2 WHERE school = "Cunningham Hill Infant school"
How many years have a Title of kriegspiel?
SELECT COUNT(year) FROM table_name_16 WHERE title = "kriegspiel"
Which length has a Stage of 9?
SELECT length FROM table_name_37 WHERE stage = "9"
What's the lowest total when there's less than 16 bronze and more than 6 silver?
SELECT MIN(total) FROM table_name_13 WHERE bronze < 16 AND silver > 6
WHAT IS THE CARRIER FOR 4.7.0.208 VERSION?
SELECT carrier FROM table_name_25 WHERE package_version = "4.7.0.208"
What are the names of the songs that have a lower rating than at least one blues song?
SELECT song_name FROM song WHERE rating < (SELECT max(rating) FROM song WHERE genre_is = "blues")
Thank you! Can you update that list to include the building ID for each of those apartment IDs?
SELECT building_id, apt_id FROM Apartments WHERE apt_type_code = 'Flat'
How many courses are taught?
SELECT COUNT ( * ) FROM Courses
What is the ratio of professors and students?
SELECT CAST(SUM(CASE WHEN professor = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN student = 1 THEN 1 ELSE 0 END) AS per FROM person
Show the name of the county with the biggest population.
SELECT County_name FROM county ORDER BY Population DESC LIMIT 1
What was the host of the round at Hammons Student Center?
SELECT host FROM table_name_12 WHERE venue = "hammons student center"
What is the latest death with a description of BR-Built inspection saloon?
SELECT MAX(date) FROM table_name_4 WHERE description = "br-built inspection saloon"
Provide the first name of employee who did inspection ID 48225?
SELECT T1.first_name FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.inspection_id = 48225
Which Platelet count has a Condition of bernard-soulier syndrome?
SELECT platelet_count FROM table_name_34 WHERE condition = "bernard-soulier syndrome"
How many customers live in Prague city?
SELECT count(*) FROM customers WHERE city = "Prague";
What percentage of Catalan-language Wikipedia pages have more than 10,000 words?
SELECT CAST(COUNT(CASE WHEN T2.words > 10000 THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T2.page) FROM langs AS T1 INNER JOIN pages AS T2 ON T1.lid = T2.lid WHERE T1.lang = 'ca'
List the title for the season episode number of 8.
SELECT title FROM table_23916272_6 WHERE season__number = 8
What is the average snatch score of body builders?
SELECT avg(Snatch) FROM body_builder
How many customers are there of each gender?
SELECT gender , count(*) FROM Customers GROUP BY gender
Which Games have Years at club of 1974–1975, and Goals of 4?
SELECT AVG(games) FROM table_name_89 WHERE years_at_club = "1974–1975" AND goals = 4
What is the lowest size of the school with titans as the mascot?
SELECT MIN(size) FROM table_name_93 WHERE mascot = "titans"
What is the percent for when against prohibition is 2978?
SELECT percent_for FROM table_120778_1 WHERE against_prohibition = 2978
How many times was Elly Koss given a care plan between 1/11/2009 and 10/23/2010?
SELECT COUNT(T2.PATIENT) FROM patients AS T1 INNER JOIN careplans AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.START BETWEEN '2009-01-11' AND '2010-10-23'
what is the prof extension of hist
SELECT PROF_EXTENSION from PROFESSOR where DEPT_CODE = 'HIST'
What's the category in 1998 with the role/episode of David Duchovny?
SELECT category FROM table_name_37 WHERE year = 1998 AND role_episode = "david duchovny"
Which class has a Qual position of 30?
SELECT class FROM table_name_48 WHERE qual_pos = 30
What year was Sam Kazman a producer?
SELECT year FROM table_name_35 WHERE producer = "sam kazman"
How many departments are in each school?
SELECT count(DISTINCT dept_name) , school_code FROM department GROUP BY school_code
Which Artist has a Draw smaller than 14, and Points less than 73, and a Language of turkish?
SELECT artist FROM table_name_70 WHERE draw < 14 AND points < 73 AND language = "turkish"
can you tell me their first names and offices, please?
SELECT EMP_FNAME, PROF_OFFICE FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num WHERE T1.CRS_CODE = "ACCT-211"
How many vendors does Adventure Works still work with but are not preferable?
SELECT COUNT(BusinessEntityID) FROM Vendor WHERE PreferredVendorStatus = 0 AND ActiveFlag = 1
State the opensecrets_id of the legislator whose YouTube name is Bluetkemeyer.
SELECT T1.opensecrets_id FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T2.youtube = 'BLuetkemeyer'
What is the earliest date of a transcript release, and what details can you tell me?
SELECT transcript_date , other_details FROM Transcripts ORDER BY transcript_date ASC LIMIT 1
What's Pedro S Afonso's job title?
SELECT T2.job_desc FROM employee AS T1 INNER JOIN jobs AS T2 ON T1.job_id = T2.job_id WHERE T1.fname = 'Pedro' AND T1.minit = 'S' AND T1.lname = 'Afonso'
What is the lowest Week when the result was l 13–10, November 30, 1975, with more than 44,982 people in attendance?
SELECT MIN(week) FROM table_name_93 WHERE result = "l 13–10" AND date = "november 30, 1975" AND attendance > 44 OFFSET 982
Perfect, and how many of those students are majoring in 600?
SELECT count ( * ) FROM Student WHERE Major = 600
Which house has an abbreviation of G?
SELECT house FROM table_name_60 WHERE abbr = "g"
What was the team's record after week 7 with 28,161 attending?
SELECT record FROM table_name_58 WHERE week > 7 AND attenmdance = "28,161"
What are the 1994 results with a career SR of 0 / 3?
SELECT 1994 FROM table_name_98 WHERE career_sr = "0 / 3"
What was the most common answer for the question "What country do you work in?"?
SELECT T1.AnswerText FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T2.questiontext = 'What country do you work in?' GROUP BY T1.AnswerText ORDER BY COUNT(T1.AnswerText) DESC LIMIT 1
Which episode was watched by 7.2 million viewers?
SELECT episode FROM table_2101431_1 WHERE viewers__in_millions_ = "7.2"
The candidates Charles Fisher (DR) 65.1% W. Jones (F) 34.9% is for what incumbent?
SELECT incumbent FROM table_2668336_17 WHERE candidates = "Charles Fisher (DR) 65.1% W. Jones (F) 34.9%"
what are the departments? | Do you want the names of all department? | yes
SELECT name FROM department
How many goals against did Clitheroe have when the loss was larger than 2?
SELECT COUNT(goals_against) FROM table_name_44 WHERE team = "clitheroe" AND lost > 2
Who is the Vice President of Engineering and when did he join the company? Indicate his/her full name.
SELECT T2.FirstName, T2.MiddleName, T2.LastName, T1.HireDate FROM Employee AS T1 INNER JOIN Person AS T2 USING (BusinessEntityID) WHERE T1.JobTitle = 'Vice President of Engineering'
What are the names of parties that do not have delegates in election?
SELECT Party FROM party WHERE Party_ID NOT IN (SELECT Party FROM election)
Return the city with the customer type code "Good Credit Rating" that had the fewest customers.
SELECT town_city FROM customers WHERE customer_type_code = "Good Credit Rating" GROUP BY town_city ORDER BY count(*) LIMIT 1
Who is the driver that transported the lightest weight of shipment? Provide the full name of the driver.
SELECT T2.first_name, T2.last_name FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id ORDER BY T1.weight ASC LIMIT 1
What is the lowest points for a time/retired of +30.7 secs, and laps smaller than 165?
SELECT MIN(points) FROM table_name_70 WHERE time_retired = "+30.7 secs" AND laps < 165
Who had the most assist when the opponent was Cleveland?
SELECT high_assists FROM table_15780049_6 WHERE team = "Cleveland"
Please find all the papers published by "Aaron Turon"?
SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = "Aaron" AND t1.lname = "Turon"
What are the average prominence of the mountains in country 'Morocco'?
SELECT avg(prominence) FROM mountain WHERE country = 'Morocco'
Can you list all product names and their corresponding type codes of the products with prices below the average price?
SELECT Product_Name, Product_Type_Code FROM Products WHERE Product_Price < ( SELECT AVG ( Product_Price ) FROM Products )
Who is the driver with 1 grid?
SELECT driver FROM table_name_30 WHERE grid = 1
How many players whose teams were ranked 6 in 1937?
SELECT COUNT(DISTINCT T1.playerID) FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID INNER JOIN teams AS T3 ON T3.tmID = T2.tmID WHERE T3.year = 1937 AND T3.rank = 6
Who is the director of Little Beau Porky?
SELECT director FROM table_name_31 WHERE title = "little beau porky"
How many different types of beds are there?
SELECT count(DISTINCT bedType) FROM Rooms;
What is the term of acharya shree vasudevprasadji maharaj?
SELECT term FROM table_name_5 WHERE name_of_acharya = "acharya shree vasudevprasadji maharaj"
Which of the two courses, "Advanced Operating System" or "Intro to BlockChain', did most of the students receive an A in?
SELECT T2.name FROM registration AS T1 INNER JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T1.grade = 'A' AND T2.name IN ('Advanced Operating System', 'Intro to BlockChain') GROUP BY T2.name ORDER BY COUNT(T1.student_id) DESC LIMIT 1
Who was the leading lady for Uni studio and Frank Strayer?
SELECT leading_lady FROM table_name_71 WHERE studio = "uni" AND director = "frank strayer"
How many students are affected by cat allergies?
SELECT count(*) FROM Has_allergy WHERE Allergy = "Cat"
Find all the product whose name contains the word "Scanner".
SELECT product FROM product WHERE product LIKE "%Scanner%"
How many times what the comptroller alan hevesi and the party working families?
SELECT COUNT(year) FROM table_name_78 WHERE comptroller = "alan hevesi" AND party = "working families"
In which city has the greatest population, what is its percentage to its country population?
SELECT T3.Name, CAST(T3.Population AS REAL) * 100 / T1.Population FROM country AS T1 INNER JOIN province AS T2 ON T1.Code = T2.Country INNER JOIN city AS T3 ON T3.Country = T2.Country ORDER BY T3.Population DESC LIMIT 1
What is the name of the customer who has greatest total loan amount?
SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name ORDER BY sum(T2.amount) DESC LIMIT 1
What is the name of the school with the Tornadoes Lady Tornadoes?
SELECT school FROM table_name_41 WHERE nickname_s_ = "tornadoes lady tornadoes"
Find the name of players whose card is yes in the descending order of training hours.
SELECT pName FROM Player WHERE yCard = 'yes' ORDER BY HS DESC
State the different ethnic group and percentage of the language in Singapore.
SELECT T1.Name, T1.Percentage FROM ethnicGroup AS T1 INNER JOIN country AS T2 ON T1.Country = T2.Code WHERE T2.Name = 'Singapore' GROUP BY T1.Name, T1.Percentage
Find the states of the colleges that have students in the tryout who played in striker position.
SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker'
Please list all the customers that have Steve Patterson as their sales representitive.
SELECT t1.customerName FROM customers AS t1 INNER JOIN employees AS t2 ON t1.salesRepEmployeeNumber = t2.employeeNumber WHERE t2.firstName = 'Steve' AND t2.lastName = 'Patterson'
List the names of the countries with the below-average number of customers in ascending order of customer numbers.
SELECT T2.n_name FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey GROUP BY T2.n_name HAVING COUNT(T1.c_name) > ( SELECT COUNT(customer.c_name) / COUNT(DISTINCT nation.n_name) FROM customer INNER JOIN nation ON customer.c_nationkey = nation.n_nationkey ) ORDER BY COUNT(T1.c_name)
Name the least season
SELECT MIN(season) FROM table_2223177_3
Which Asian countries have a population that is larger than any country in Africa?
SELECT Name FROM country WHERE Continent = "Asia" AND population > (SELECT max(population) FROM country WHERE Continent = "Africa")
Who had the lowest interview score from South Dakota with an evening gown less than 8.513?
SELECT MIN(interview) FROM table_name_52 WHERE state = "south dakota" AND evening_gown < 8.513
How many people on average attend round f?
SELECT AVG(attendance) FROM table_name_28 WHERE round = "f"
What are the names of all the physicians who took appointments.
SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID
what is the school code for accounting?
SELECT school_code from department where dept_name = "Accounting"
List total amount of invoice from Germany?
SELECT sum ( total ) FROM invoices WHERE billing_country = "Germany"
How many people lived in the census division spread out on 9909.31 km2 in 1996?
SELECT pop__1996_ FROM table_2134521_1 WHERE area__km²_ = "9909.31"
What is employee Nancy Edwards's phone number?
SELECT phone FROM employees WHERE first_name = "Nancy" AND last_name = "Edwards";
Among orders in 2020, name the customers who had the greatest discount applied for 'Cocktail Glasses'
SELECT DISTINCT T1.`Customer Names` FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID INNER JOIN Products AS T3 ON T3.ProductID = T2._ProductID WHERE T3.`Product Name` = 'Cocktail Glasses' AND SUBSTR(T2.OrderDate, -2) = '20' AND T2.`Discount Applied` = ( SELECT T2.`Discount Applied` FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID INNER JOIN Products AS T3 ON T3.ProductID = T2._ProductID WHERE T3.`Product Name` = 'Cocktail Glasses' AND T2.OrderDate LIKE '%/%/20' ORDER BY T2.`Discount Applied` DESC LIMIT 1 )
List the names and birthdays of the top five players in terms of potential.
SELECT DISTINCT T1.player_name , T1.birthday FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id ORDER BY potential DESC LIMIT 5
what is the director name of Star Wars
SELECT director FROM Movie WHERE title = 'Star Wars'
What is the location of the fight against Zaza Tkeshelashvili?
SELECT location FROM table_name_26 WHERE opponent = "zaza tkeshelashvili"
Among the episodes which have star score greater than 5, how many episodes have air date in 2008?
SELECT COUNT(DISTINCT T2.episode_id) FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE strftime('%Y', T1.air_date) = '2008' AND T2.stars > 5;
Which allergy has the least number of students affected?
SELECT Allergy FROM Has_allergy GROUP BY Allergy ORDER BY count ( * ) asc LIMIT 1
Find the name of the organization that has published the largest number of papers.
SELECT t1.name FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.name ORDER BY count(*) DESC LIMIT 1
What was the aggregate for the match with a team 2 of Hafia FC?
SELECT agg FROM table_name_98 WHERE team_2 = "hafia fc"
What is the kr td when mfg lg is 64?
SELECT kr_td FROM table_16912000_13 WHERE mfg_lg = 64
Find the last name of the student who has a cat that is age 3.
SELECT T1.lname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pet_age = 3 AND T3.pettype = 'cat'
Calculate the percentage of the app user IDs under Industry tag category.
SELECT SUM(IIF(T1.category = 'Industry tag', 1, 0)) * 100 / COUNT(T2.app_id) AS per FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T2.label_id = T1.label_id
What years for the rockets did player ford, alton alton ford play?
SELECT years_for_rockets FROM table_11734041_6 WHERE player = "Ford, Alton Alton Ford"
What is the nationality with a 13.21 time?
SELECT nationality FROM table_name_55 WHERE time = 13.21
Which Home Town had the weight of 201?
SELECT home_town FROM table_name_67 WHERE weight = 201
which Completion % has a Yards of 2,175?
SELECT completion__percentage FROM table_name_57 WHERE yards = "2,175"
What is the smallest point total when the grid is larger than 5 and the time/retired is fire?
SELECT MIN(points) FROM table_name_52 WHERE grid > 5 AND time_retired = "fire"