cnatale/presto-athena-txt-2-sql huggingface dataset:
Which parties have delegates in both the 'Appropriations' committee and the 'Economic Matters' committee?
Additional table information: table: election
SQL: SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = 'Appropriations' INTERSECT SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = 'Economic Matters'
Which committees have delegates from both democratic party and liberal party?
Additional table information: table: election
SQL: SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = 'Democratic' INTERSECT SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = 'Liberal'
Find the committees that have delegates both from from the democratic party and the liberal party.
Additional table information: table: election
SQL: SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = 'Democratic' INTERSECT SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = 'Liberal'
How many journalists are there?
Additional table information: table: news_report
SQL: SELECT COUNT(*) FROM journalist
List the names of journalists in ascending order of years working.
Additional table information: table: news_report
SQL: SELECT Name FROM journalist ORDER BY Years_working ASC NULLS FIRST
What are the nationalities and ages of journalists?
Additional table information: table: news_report
SQL: SELECT Nationality, Age FROM journalist
Show the names of journalists from 'England' or 'Wales'.
Additional table information: table: news_report
SQL: SELECT Name FROM journalist WHERE Nationality = 'England' OR Nationality = 'Wales'
What is the average number of years spent working as a journalist?
Additional table information: table: news_report
SQL: SELECT AVG(Years_working) FROM journalist
What is the nationality of the journalist with the largest number of years working?
Additional table information: table: news_report
SQL: SELECT Nationality FROM journalist ORDER BY Years_working DESC LIMIT 1
Show the different nationalities and the number of journalists of each nationality.
Additional table information: table: news_report
SQL: SELECT Nationality, COUNT(*) FROM journalist GROUP BY Nationality
Show the most common nationality for journalists.
Additional table information: table: news_report
SQL: SELECT Nationality FROM journalist GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1
Show the nations that have both journalists with more than 10 years of working and journalists with less than 3 years of working.
Additional table information: table: news_report
SQL: SELECT Nationality FROM journalist WHERE Years_working > 10 INTERSECT SELECT Nationality FROM journalist WHERE Years_working < 3
Show the dates, places, and names of events in descending order of the attendance.
Additional table information: table: news_report
SQL: SELECT Date, Name, venue FROM event ORDER BY Event_Attendance DESC
Show the names of journalists and the dates of the events they reported.
Additional table information: table: news_report
SQL: SELECT T3.Name, T2.Date FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID
Show the names of journalists and the names of the events they reported in ascending order
Additional table information: table: news_report
SQL: SELECT T3.Name, T2.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID ORDER BY T2.Event_Attendance ASC NULLS FIRST
Show the names of journalists and the number of events they reported.
Additional table information: table: news_report
SQL: SELECT T3.Name, COUNT(*) FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID GROUP BY T3.Name
Show the names of journalists that have reported more than one event.
Additional table information: table: news_report
SQL: SELECT T3.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID GROUP BY T3.Name HAVING COUNT(*) > 1
List the names of journalists who have not reported any event.
Additional table information: table: news_report
SQL: SELECT Name FROM journalist WHERE NOT journalist_ID IN (SELECT journalist_ID FROM news_report)
what are the average and maximum attendances of all events?
Additional table information: table: news_report
SQL: SELECT AVG(Event_Attendance), MAX(Event_Attendance) FROM event
Find the average age and experience working length of journalists working on different role type.
Additional table information: table: news_report
SQL: SELECT AVG(t1.age), AVG(Years_working), t2.work_type FROM journalist AS t1 JOIN news_report AS t2 ON t1.journalist_id = t2.journalist_id GROUP BY t2.work_type
List the event venues and names that have the top 2 most number of people attended.
Additional table information: table: news_report
SQL: SELECT venue, name FROM event ORDER BY Event_Attendance DESC LIMIT 2
Show me all the restaurants.
Additional table information: table: restaurant_1
SQL: SELECT ResName FROM Restaurant
What is the address of the restaurant Subway?
Additional table information: table: restaurant_1
SQL: SELECT Address FROM Restaurant WHERE ResName = 'Subway'
What is the rating of the restaurant Subway?
Additional table information: table: restaurant_1
SQL: SELECT Rating FROM Restaurant WHERE ResName = 'Subway'
List all restaurant types.
Additional table information: table: restaurant_1
SQL: SELECT ResTypeName FROM Restaurant_Type
What is the description of the restaurant type Sandwich?
Additional table information: table: restaurant_1
SQL: SELECT ResTypeDescription FROM Restaurant_Type WHERE ResTypeName = 'Sandwich'
Which restaurants have highest rating? List the restaurant name and its rating.
Additional table information: table: restaurant_1
SQL: SELECT ResName, Rating FROM Restaurant ORDER BY Rating DESC LIMIT 1
What is the age of student Linda Smith?
Additional table information: table: restaurant_1
SQL: SELECT Age FROM Student WHERE Fname = 'Linda' AND Lname = 'Smith'
What is the gender of the student Linda Smith?
Additional table information: table: restaurant_1
SQL: SELECT Sex FROM Student WHERE Fname = 'Linda' AND Lname = 'Smith'
List all students' first names and last names who majored in 600.
Additional table information: table: restaurant_1
SQL: SELECT Fname, Lname FROM Student WHERE Major = 600
Which city does student Linda Smith live in?
Additional table information: table: restaurant_1
SQL: SELECT city_code FROM Student WHERE Fname = 'Linda' AND Lname = 'Smith'
Advisor 1121 has how many students?
Additional table information: table: restaurant_1
SQL: SELECT COUNT(*) FROM Student WHERE Advisor = 1121
Which Advisor has most of students? List advisor and the number of students.
Additional table information: table: restaurant_1
SQL: SELECT Advisor, COUNT(*) FROM Student GROUP BY Advisor ORDER BY COUNT(Advisor) DESC LIMIT 1
Which major has least number of students? List the major and the number of students.
Additional table information: table: restaurant_1
SQL: SELECT Major, COUNT(*) FROM Student GROUP BY Major ORDER BY COUNT(Major) ASC NULLS FIRST LIMIT 1
Which major has between 2 and 30 number of students? List major and the number of students.
Additional table information: table: restaurant_1
SQL: SELECT Major, COUNT(*) FROM Student GROUP BY Major HAVING COUNT(Major) BETWEEN 2 AND 30
Which student's age is older than 18 and is majoring in 600? List each student's first and last name.
Additional table information: table: restaurant_1
SQL: SELECT Fname, Lname FROM Student WHERE Age > 18 AND Major = 600
List all female students age is older than 18 who is not majoring in 600. List students' first name and last name.
Additional table information: table: restaurant_1
SQL: SELECT Fname, Lname FROM Student WHERE Age > 18 AND Major <> 600 AND Sex = 'F'
How many restaurant is the Sandwich type restaurant?
Additional table information: table: restaurant_1
SQL: SELECT COUNT(*) FROM Restaurant JOIN Type_Of_Restaurant ON Restaurant.ResID = Type_Of_Restaurant.ResID JOIN Restaurant_Type ON Type_Of_Restaurant.ResTypeID = Restaurant_Type.ResTypeID GROUP BY Type_Of_Restaurant.ResTypeID HAVING Restaurant_Type.ResTypeName = 'Sandwich'
How long does student Linda Smith spend on the restaurant in total?
Additional table information: table: restaurant_1
SQL: SELECT SUM(Spent) FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID WHERE Student.Fname = 'Linda' AND Student.Lname = 'Smith'
How many times has the student Linda Smith visited Subway?
Additional table information: table: restaurant_1
SQL: SELECT COUNT(*) FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID WHERE Student.Fname = 'Linda' AND Student.Lname = 'Smith' AND Restaurant.ResName = 'Subway'
When did Linda Smith visit Subway?
Additional table information: table: restaurant_1
SQL: SELECT TIME FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID WHERE Student.Fname = 'Linda' AND Student.Lname = 'Smith' AND Restaurant.ResName = 'Subway'
At which restaurant did the students spend the least amount of time? List restaurant and the time students spent on in total.
Additional table information: table: restaurant_1
SQL: SELECT Restaurant.ResName, SUM(Visits_Restaurant.Spent) FROM Visits_Restaurant JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID GROUP BY Restaurant.ResID ORDER BY SUM(Visits_Restaurant.Spent) ASC NULLS FIRST LIMIT 1
Which student visited restaurant most often? List student's first name and last name.
Additional table information: table: restaurant_1
SQL: SELECT Student.Fname, Student.Lname FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID GROUP BY Student.StuID ORDER BY COUNT(*) DESC LIMIT 1
Find the ids of orders whose status is 'Success'.
Additional table information: table: customer_deliveries
SQL: SELECT actual_order_id FROM actual_orders WHERE order_status_code = 'Success'
Find the name and price of the product that has been ordered the greatest number of times.
Additional table information: table: customer_deliveries
SQL: SELECT t1.product_name, t1.product_price FROM products AS t1 JOIN regular_order_products AS t2 ON t1.product_id = t2.product_id GROUP BY t2.product_id ORDER BY COUNT(*) DESC LIMIT 1
Find the number of customers in total.
Additional table information: table: customer_deliveries
SQL: SELECT COUNT(*) FROM customers
How many different payment methods are there?
Additional table information: table: customer_deliveries
SQL: SELECT COUNT(DISTINCT payment_method) FROM customers
Show the details of all trucks in the order of their license number.
Additional table information: table: customer_deliveries
SQL: SELECT truck_details FROM trucks ORDER BY truck_licence_number NULLS FIRST
Find the name of the most expensive product.
Additional table information: table: customer_deliveries
SQL: SELECT product_name FROM products ORDER BY product_price DESC LIMIT 1
Find the names of customers who are not living in the state of California.
Additional table information: table: customer_deliveries
SQL: SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = 'California'
List the names and emails of customers who payed by Visa card.
Additional table information: table: customer_deliveries
SQL: SELECT customer_email, customer_name FROM customers WHERE payment_method = 'Visa'
Find the names and phone numbers of customers living in California state.
Additional table information: table: customer_deliveries
SQL: SELECT t1.customer_name, t1.customer_phone FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = 'California'
Find the states which do not have any employee in their record.
Additional table information: table: customer_deliveries
SQL: SELECT state_province_county FROM addresses WHERE NOT address_id IN (SELECT employee_address_id FROM Employees)
List the names, phone numbers, and emails of all customers sorted by their dates of becoming customers.
Additional table information: table: customer_deliveries
SQL: SELECT customer_name, customer_phone, customer_email FROM Customers ORDER BY date_became_customer NULLS FIRST
Find the name of the first 5 customers.
Additional table information: table: customer_deliveries
SQL: SELECT customer_name FROM Customers ORDER BY date_became_customer NULLS FIRST LIMIT 5
Find the payment method that is used most frequently.
Additional table information: table: customer_deliveries
SQL: SELECT payment_method FROM Customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1
List the names of all routes in alphabetic order.
Additional table information: table: customer_deliveries
SQL: SELECT route_name FROM Delivery_Routes ORDER BY route_name NULLS FIRST
Find the name of route that has the highest number of deliveries.
Additional table information: table: customer_deliveries
SQL: SELECT t1.route_name FROM Delivery_Routes AS t1 JOIN Delivery_Route_Locations AS t2 ON t1.route_id = t2.route_id GROUP BY t1.route_id ORDER BY COUNT(*) DESC LIMIT 1
List the state names and the number of customers living in each state.
Additional table information: table: customer_deliveries
SQL: SELECT t2.state_province_county, COUNT(*) FROM customer_addresses AS t1 JOIN addresses AS t2 ON t1.address_id = t2.address_id GROUP BY t2.state_province_county
How many authors are there?
Additional table information: table: icfp_1
SQL: SELECT COUNT(*) FROM authors
Count the number of authors.
Additional table information: table: icfp_1
SQL: SELECT COUNT(*) FROM authors
How many institutions are there?
Additional table information: table: icfp_1
SQL: SELECT COUNT(*) FROM inst
Count the number of institutions.
Additional table information: table: icfp_1
SQL: SELECT COUNT(*) FROM inst
How many papers are published in total?
Additional table information: table: icfp_1
SQL: SELECT COUNT(*) FROM papers
Count the number of total papers.
Additional table information: table: icfp_1
SQL: SELECT COUNT(*) FROM papers
What are the titles of papers published by 'Jeremy Gibbons'?
Additional table information: table: icfp_1
SQL: 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 = 'Jeremy' AND t1.lname = 'Gibbons'
Find the titles of all the papers written by 'Jeremy Gibbons'
Additional table information: table: icfp_1
SQL: 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 = 'Jeremy' AND t1.lname = 'Gibbons'
Find all the papers published by 'Aaron Turon'.
Additional table information: table: icfp_1
SQL: 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'
Find the titles of all the papers written by 'Aaron Turon'.
Additional table information: table: icfp_1
SQL: 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'
How many papers have 'Atsushi Ohori' published?
Additional table information: table: icfp_1
SQL: SELECT COUNT(*) 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 = 'Atsushi' AND t1.lname = 'Ohori'
How many papers are 'Atsushi Ohori' the author of?
Additional table information: table: icfp_1
SQL: SELECT COUNT(*) 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 = 'Atsushi' AND t1.lname = 'Ohori'
What is the name of the institution that 'Matthias Blume' belongs to?
Additional table information: table: icfp_1
SQL: SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = 'Matthias' AND t1.lname = 'Blume'
Which institution is the author 'Matthias Blume' belong to? Give me the name of the institution.
Additional table information: table: icfp_1
SQL: SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = 'Matthias' AND t1.lname = 'Blume'
Which institution does 'Katsuhiro Ueno' belong to?
Additional table information: table: icfp_1
SQL: SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = 'Katsuhiro' AND t1.lname = 'Ueno'
What is the name of the institution the author 'Katsuhiro Ueno' belongs to?
Additional table information: table: icfp_1
SQL: SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = 'Katsuhiro' AND t1.lname = 'Ueno'
Who belong to the institution 'University of Oxford'? Show the first names and last names.
Additional table information: table: icfp_1
SQL: SELECT DISTINCT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'University of Oxford'
Find the first names and last names of the authors whose institution affiliation is 'University of Oxford'.
Additional table information: table: icfp_1
SQL: SELECT DISTINCT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'University of Oxford'
Which authors belong to the institution 'Google'? Show the first names and last names.
Additional table information: table: icfp_1
SQL: SELECT DISTINCT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Google'
Find the first names and last names of the authors whose institution affiliation is 'Google'.
Additional table information: table: icfp_1
SQL: SELECT DISTINCT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Google'
What are the last names of the author of the paper titled 'Binders Unbound'?
Additional table information: table: icfp_1
SQL: SELECT t1.lname 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 = 'Binders Unbound'
Who is the author of the paper titled 'Binders Unbound'? Give me the last name.
Additional table information: table: icfp_1
SQL: SELECT t1.lname 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 = 'Binders Unbound'
Find the first and last name of the author(s) who wrote the paper 'Nameless, Painless'.
Additional table information: table: icfp_1
SQL: SELECT t1.fname, t1.lname 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 = 'Nameless ,  Painless'
What are the first and last name of the author who published the paper titled 'Nameless, Painless'?
Additional table information: table: icfp_1
SQL: SELECT t1.fname, t1.lname 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 = 'Nameless ,  Painless'
What are the papers published under the institution 'Indiana University'?
Additional table information: table: icfp_1
SQL: SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Indiana University'
List the titles of the papers whose authors are from the institution 'Indiana University'.
Additional table information: table: icfp_1
SQL: SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Indiana University'
Find all the papers published by the institution 'Google'.
Additional table information: table: icfp_1
SQL: SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Google'
Which papers were written by authors from the institution 'Google'?
Additional table information: table: icfp_1
SQL: SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Google'
How many papers are published by the institution 'Tokohu University'?
Additional table information: table: icfp_1
SQL: SELECT COUNT(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Tokohu University'
Find the number of papers published by authors from the institution 'Tokohu University'.
Additional table information: table: icfp_1
SQL: SELECT COUNT(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Tokohu University'
Find the number of papers published by the institution 'University of Pennsylvania'.
Additional table information: table: icfp_1
SQL: SELECT COUNT(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'University of Pennsylvania'
How many papers are written by authors from the institution 'University of Pennsylvania'?
Additional table information: table: icfp_1
SQL: SELECT COUNT(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'University of Pennsylvania'
Find the papers which have 'Olin Shivers' as an author.
Additional table information: table: icfp_1
SQL: 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 = 'Olin' AND t1.lname = 'Shivers'
Which papers did the author 'Olin Shivers' write? Give me the paper titles.
Additional table information: table: icfp_1
SQL: 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 = 'Olin' AND t1.lname = 'Shivers'
Which papers have 'Stephanie Weirich' as an author?
Additional table information: table: icfp_1
SQL: 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 = 'Stephanie' AND t1.lname = 'Weirich'
Find the titles of the papers the author 'Stephanie Weirich' wrote.
Additional table information: table: icfp_1
SQL: 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 = 'Stephanie' AND t1.lname = 'Weirich'
Which paper is published in an institution in 'USA' and have 'Turon' as its second author?
Additional table information: table: icfp_1
SQL: 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 JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = 'USA' AND t2.authorder = 2 AND t1.lname = 'Turon'
Find papers whose second author has last name 'Turon' and is affiliated with an institution in the country 'USA'.
Additional table information: table: icfp_1
SQL: 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 JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = 'USA' AND t2.authorder = 2 AND t1.lname = 'Turon'
Find the titles of papers whose first author is affiliated with an institution in the country 'Japan' and has last name 'Ohori'?
Additional table information: table: icfp_1
SQL: 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 JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = 'Japan' AND t2.authorder = 1 AND t1.lname = 'Ohori'
Which papers' first author is affiliated with an institution in the country 'Japan' and has last name 'Ohori'? Give me the titles of the papers.
Additional table information: table: icfp_1
SQL: 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 JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = 'Japan' AND t2.authorder = 1 AND t1.lname = 'Ohori'
What is the last name of the author that has published the most papers?
Additional table information: table: icfp_1
SQL: SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.fname, t1.lname ORDER BY COUNT(*) DESC LIMIT 1
Which author has written the most papers? Find his or her last name.
Additional table information: table: icfp_1
SQL: SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.fname, t1.lname ORDER BY COUNT(*) DESC LIMIT 1
Retrieve the country that has published the most papers.
Additional table information: table: icfp_1
SQL: SELECT t1.country 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.country ORDER BY COUNT(*) DESC LIMIT 1
Find the country that the most papers are affiliated with.
Additional table information: table: icfp_1
SQL: SELECT t1.country 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.country ORDER BY COUNT(*) DESC LIMIT 1
Find the name of the organization that has published the largest number of papers.
Additional table information: table: icfp_1
SQL: 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
Which institution has the most papers? Find the name of the institution.
Additional table information: table: icfp_1
SQL: 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
Find the titles of the papers that contain the word 'ML'.
Additional table information: table: icfp_1
SQL: SELECT title FROM papers WHERE title LIKE '%ML%'
Which papers have the substring 'ML' in their titles? Return the titles of the papers.
Additional table information: table: icfp_1
SQL: SELECT title FROM papers WHERE title LIKE '%ML%'
Which paper's title contains the word 'Database'?
Additional table information: table: icfp_1
SQL: SELECT title FROM papers WHERE title LIKE '%Database%'
Which papers have the substring 'Database' in their titles? Show the titles of the papers.
Additional table information: table: icfp_1
SQL: SELECT title FROM papers WHERE title LIKE '%Database%'
Find the first names of all the authors who have written a paper with title containing the word 'Functional'.
Additional table information: table: icfp_1
SQL: 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%'
Who has written a paper that has the word 'Functional' in its title? Return the first names of the authors.
Additional table information: table: icfp_1
SQL: 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%'
Find the last names of all the authors that have written a paper with title containing the word 'Monadic'.
Additional table information: table: icfp_1
SQL: SELECT t1.lname 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 '%Monadic%'
Which authors have written a paper with title containing the word 'Monadic'? Return their last names.
Additional table information: table: icfp_1
SQL: SELECT t1.lname 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 '%Monadic%'
Retrieve the title of the paper that has the largest number of authors.
Additional table information: table: icfp_1
SQL: SELECT t2.title FROM authorship AS t1 JOIN papers AS t2 ON t1.paperid = t2.paperid WHERE t1.authorder = (SELECT MAX(authorder) FROM authorship)
Which paper has the most authors? Give me the paper title.
Additional table information: table: icfp_1
SQL: SELECT t2.title FROM authorship AS t1 JOIN papers AS t2 ON t1.paperid = t2.paperid WHERE t1.authorder = (SELECT MAX(authorder) FROM authorship)
What is the first name of the author with last name 'Ueno'?
Additional table information: table: icfp_1
SQL: SELECT fname FROM authors WHERE lname = 'Ueno'
Which authors have last name 'Ueno'? List their first names.
Additional table information: table: icfp_1
SQL: SELECT fname FROM authors WHERE lname = 'Ueno'
Find the last name of the author with first name 'Amal'.
Additional table information: table: icfp_1
SQL: SELECT lname FROM authors WHERE fname = 'Amal'
Which authors have first name 'Amal'? List their last names.
Additional table information: table: icfp_1
SQL: SELECT lname FROM authors WHERE fname = 'Amal'
Find the first names of all the authors ordered in alphabetical order.
Additional table information: table: icfp_1
SQL: SELECT fname FROM authors ORDER BY fname NULLS FIRST
Sort the first names of all the authors in alphabetical order.
Additional table information: table: icfp_1
SQL: SELECT fname FROM authors ORDER BY fname NULLS FIRST
Retrieve all the last names of authors in alphabetical order.
Additional table information: table: icfp_1
SQL: SELECT lname FROM authors ORDER BY lname NULLS FIRST
Give me a list of all the last names of authors sorted in alphabetical order
Additional table information: table: icfp_1
SQL: SELECT lname FROM authors ORDER BY lname NULLS FIRST
Retrieve all the first and last names of authors in the alphabetical order of last names.
Additional table information: table: icfp_1
SQL: SELECT fname, lname FROM authors ORDER BY lname NULLS FIRST
Sort the list of all the first and last names of authors in alphabetical order of the last names.
Additional table information: table: icfp_1
SQL: SELECT fname, lname FROM authors ORDER BY lname NULLS FIRST
How many different last names do the actors and actresses have?
Additional table information: table: sakila_1
SQL: SELECT COUNT(DISTINCT last_name) FROM actor
Count the number of different last names actors have.
Additional table information: table: sakila_1
SQL: SELECT COUNT(DISTINCT last_name) FROM actor
What is the most popular first name of the actors?
Additional table information: table: sakila_1
SQL: SELECT first_name FROM actor GROUP BY first_name ORDER BY COUNT(*) DESC LIMIT 1
Return the most common first name among all actors.
Additional table information: table: sakila_1
SQL: SELECT first_name FROM actor GROUP BY first_name ORDER BY COUNT(*) DESC LIMIT 1
What is the most popular full name of the actors?
Additional table information: table: sakila_1
SQL: SELECT first_name, last_name FROM actor GROUP BY first_name, last_name ORDER BY COUNT(*) DESC LIMIT 1
Return the most common full name among all actors.
Additional table information: table: sakila_1
SQL: SELECT first_name, last_name FROM actor GROUP BY first_name, last_name ORDER BY COUNT(*) DESC LIMIT 1
Which districts have at least two addresses?
Additional table information: table: sakila_1
SQL: SELECT district FROM address GROUP BY district HAVING COUNT(*) >= 2
Give the districts which have two or more addresses.
Additional table information: table: sakila_1
SQL: SELECT district FROM address GROUP BY district HAVING COUNT(*) >= 2
What is the phone number and postal code of the address 1031 Daugavpils Parkway?
Additional table information: table: sakila_1
SQL: SELECT phone, postal_code FROM address WHERE address = '1031 Daugavpils Parkway'
Give the phone and postal code corresponding to the address '1031 Daugavpils Parkway'.
Additional table information: table: sakila_1
SQL: SELECT phone, postal_code FROM address WHERE address = '1031 Daugavpils Parkway'
Which city has the most addresses? List the city name, number of addresses, and city id.
Additional table information: table: sakila_1
SQL: SELECT T2.city, COUNT(*), T1.city_id FROM address AS T1 JOIN city AS T2 ON T1.city_id = T2.city_id GROUP BY T1.city_id ORDER BY COUNT(*) DESC LIMIT 1
What are the city name, id, and number of addresses corresponding to the city with the most addressed?
Additional table information: table: sakila_1
SQL: SELECT T2.city, COUNT(*), T1.city_id FROM address AS T1 JOIN city AS T2 ON T1.city_id = T2.city_id GROUP BY T1.city_id ORDER BY COUNT(*) DESC LIMIT 1
How many addresses are in the district of California?
Additional table information: table: sakila_1
SQL: SELECT COUNT(*) FROM address WHERE district = 'California'
Count the number of addressed in the California district.
Additional table information: table: sakila_1
SQL: SELECT COUNT(*) FROM address WHERE district = 'California'
Which film is rented at a fee of 0.99 and has less than 3 in the inventory? List the film title and id.
Additional table information: table: sakila_1
SQL: SELECT title, film_id FROM film WHERE rental_rate = 0.99 INTERSECT SELECT T1.title, T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id HAVING COUNT(*) < 3
What are the title and id of the film which has a rental rate of 0.99 and an inventory of below 3?
Additional table information: table: sakila_1
SQL: SELECT title, film_id FROM film WHERE rental_rate = 0.99 INTERSECT SELECT T1.title, T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id HAVING COUNT(*) < 3
How many cities are in Australia?
Additional table information: table: sakila_1
SQL: SELECT COUNT(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id WHERE T2.country = 'Australia'
Count the number of cities in Australia.
Additional table information: table: sakila_1
SQL: SELECT COUNT(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id WHERE T2.country = 'Australia'
Which countries have at least 3 cities?
Additional table information: table: sakila_1
SQL: SELECT T2.country FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id GROUP BY T2.country_id HAVING COUNT(*) >= 3
What are the countries that contain 3 or more cities?
Additional table information: table: sakila_1
SQL: SELECT T2.country FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id GROUP BY T2.country_id HAVING COUNT(*) >= 3
Find all the payment dates for the payments with an amount larger than 10 and the payments handled by a staff person with the first name Elsa.
Additional table information: table: sakila_1
SQL: SELECT payment_date FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa'
What are the payment dates for any payments that have an amount greater than 10 or were handled by a staff member with the first name Elsa?
Additional table information: table: sakila_1
SQL: SELECT payment_date FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa'
How many customers have an active value of 1?
Additional table information: table: sakila_1
SQL: SELECT COUNT(*) FROM customer WHERE active = '1'
Count the number of customers who are active.
Additional table information: table: sakila_1
SQL: SELECT COUNT(*) FROM customer WHERE active = '1'
Which film has the highest rental rate? And what is the rate?
Additional table information: table: sakila_1
SQL: SELECT title, rental_rate FROM film ORDER BY rental_rate DESC LIMIT 1
What are the title and rental rate of the film with the highest rental rate?
Additional table information: table: sakila_1
SQL: SELECT title, rental_rate FROM film ORDER BY rental_rate DESC LIMIT 1
Which film has the most number of actors or actresses? List the film name, film id and description.
Additional table information: table: sakila_1
SQL: SELECT T2.title, T2.film_id, T2.description FROM film_actor AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.film_id ORDER BY COUNT(*) DESC LIMIT 1
What are the title, id, and description of the movie with the greatest number of actors?
Additional table information: table: sakila_1
SQL: SELECT T2.title, T2.film_id, T2.description FROM film_actor AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.film_id ORDER BY COUNT(*) DESC LIMIT 1
Which film actor (actress) starred the most films? List his or her first name, last name and actor id.
Additional table information: table: sakila_1
SQL: SELECT T2.first_name, T2.last_name, T2.actor_id FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id ORDER BY COUNT(*) DESC LIMIT 1
Return the full name and id of the actor or actress who starred in the greatest number of films.
Additional table information: table: sakila_1
SQL: SELECT T2.first_name, T2.last_name, T2.actor_id FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id ORDER BY COUNT(*) DESC LIMIT 1
Which film actors (actresses) played a role in more than 30 films? List his or her first name and last name.
Additional table information: table: sakila_1
SQL: SELECT T2.first_name, T2.last_name FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id HAVING COUNT(*) > 30
What are the full names of actors who had roles in more than 30 films?
Additional table information: table: sakila_1
SQL: SELECT T2.first_name, T2.last_name FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id HAVING COUNT(*) > 30
Which store owns most items?
Additional table information: table: sakila_1
SQL: SELECT store_id FROM inventory GROUP BY store_id ORDER BY COUNT(*) DESC LIMIT 1
What is the id of the store that has the most items in inventory?
Additional table information: table: sakila_1
SQL: SELECT store_id FROM inventory GROUP BY store_id ORDER BY COUNT(*) DESC LIMIT 1
What is the total amount of all payments?
Additional table information: table: sakila_1
SQL: SELECT SUM(amount) FROM payment
Return the sum of all payment amounts.
Additional table information: table: sakila_1
SQL: SELECT SUM(amount) FROM payment
Which customer, who has made at least one payment, has spent the least money? List his or her first name, last name, and the id.
Additional table information: table: sakila_1
SQL: SELECT T1.first_name, T1.last_name, T1.customer_id FROM customer AS T1 JOIN payment AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY SUM(amount) ASC NULLS FIRST LIMIT 1
What is the full name and id of the customer who has the lowest total amount of payment?
Additional table information: table: sakila_1
SQL: SELECT T1.first_name, T1.last_name, T1.customer_id FROM customer AS T1 JOIN payment AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY SUM(amount) ASC NULLS FIRST LIMIT 1
What is the genre name of the film HUNGER ROOF?
Additional table information: table: sakila_1
SQL: SELECT T1.name FROM category AS T1 JOIN film_category AS T2 ON T1.category_id = T2.category_id JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.title = 'HUNGER ROOF'
Return the name of the category to which the film 'HUNGER ROOF' belongs.
Additional table information: table: sakila_1
SQL: SELECT T1.name FROM category AS T1 JOIN film_category AS T2 ON T1.category_id = T2.category_id JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.title = 'HUNGER ROOF'
How many films are there in each category? List the genre name, genre id and the count.
Additional table information: table: sakila_1
SQL: SELECT T2.name, T1.category_id, COUNT(*) FROM film_category AS T1 JOIN category AS T2 ON T1.category_id = T2.category_id GROUP BY T1.category_id
What are the names and ids of the different categories, and how many films are in each?
Additional table information: table: sakila_1
SQL: SELECT T2.name, T1.category_id, COUNT(*) FROM film_category AS T1 JOIN category AS T2 ON T1.category_id = T2.category_id GROUP BY T1.category_id
Which film has the most copies in the inventory? List both title and id.
Additional table information: table: sakila_1
SQL: SELECT T1.title, T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id ORDER BY COUNT(*) DESC LIMIT 1
What is the title and id of the film that has the greatest number of copies in inventory?
Additional table information: table: sakila_1
SQL: SELECT T1.title, T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id ORDER BY COUNT(*) DESC LIMIT 1
What is the film title and inventory id of the item in the inventory which was rented most frequently?
Additional table information: table: sakila_1
SQL: SELECT T1.title, T2.inventory_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id JOIN rental AS T3 ON T2.inventory_id = T3.inventory_id GROUP BY T2.inventory_id ORDER BY COUNT(*) DESC LIMIT 1
Return the title and inventory id of the film that is rented most often.
Additional table information: table: sakila_1
SQL: SELECT T1.title, T2.inventory_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id JOIN rental AS T3 ON T2.inventory_id = T3.inventory_id GROUP BY T2.inventory_id ORDER BY COUNT(*) DESC LIMIT 1
How many languages are in these films?
Additional table information: table: sakila_1
SQL: SELECT COUNT(DISTINCT language_id) FROM film
Count the number of different languages in these films.
Additional table information: table: sakila_1
SQL: SELECT COUNT(DISTINCT language_id) FROM film
What are all the movies rated as R? List the titles.
Additional table information: table: sakila_1
SQL: SELECT title FROM film WHERE rating = 'R'
Return the titles of any movies with an R rating.
Additional table information: table: sakila_1
SQL: SELECT title FROM film WHERE rating = 'R'
Where is store 1 located?
Additional table information: table: sakila_1
SQL: SELECT T2.address FROM store AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE store_id = 1
Return the address of store 1.
Additional table information: table: sakila_1
SQL: SELECT T2.address FROM store AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE store_id = 1
Which staff handled least number of payments? List the full name and the id.
Additional table information: table: sakila_1
SQL: SELECT T1.first_name, T1.last_name, T1.staff_id FROM staff AS T1 JOIN payment AS T2 ON T1.staff_id = T2.staff_id GROUP BY T1.staff_id ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1
Give the full name and staff id of the staff who has handled the fewest payments.
Additional table information: table: sakila_1
SQL: SELECT T1.first_name, T1.last_name, T1.staff_id FROM staff AS T1 JOIN payment AS T2 ON T1.staff_id = T2.staff_id GROUP BY T1.staff_id ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1
Which language does the film AIRPORT POLLOCK use? List the language name.
Additional table information: table: sakila_1
SQL: SELECT T2.name FROM film AS T1 JOIN LANGUAGE AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'AIRPORT POLLOCK'
What is the name of the language that the film 'AIRPORT POLLOCK' is in?
Additional table information: table: sakila_1
SQL: SELECT T2.name FROM film AS T1 JOIN LANGUAGE AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'AIRPORT POLLOCK'
How many stores are there?
Additional table information: table: sakila_1
SQL: SELECT COUNT(*) FROM store
Count the number of stores.
Additional table information: table: sakila_1
SQL: SELECT COUNT(*) FROM store
How many kinds of different ratings are listed?
Additional table information: table: sakila_1
SQL: SELECT COUNT(DISTINCT rating) FROM film
Count the number of different film ratings.
Additional table information: table: sakila_1
SQL: SELECT COUNT(DISTINCT rating) FROM film
Which movies have 'Deleted Scenes' as a substring in the special feature?
Additional table information: table: sakila_1
SQL: SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%'
Return the titles of films that include 'Deleted Scenes' in their special feature section.
Additional table information: table: sakila_1
SQL: SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%'
How many items in inventory does store 1 have?
Additional table information: table: sakila_1
SQL: SELECT COUNT(*) FROM inventory WHERE store_id = 1
Count the number of items store 1 has in stock.
Additional table information: table: sakila_1
SQL: SELECT COUNT(*) FROM inventory WHERE store_id = 1
When did the first payment happen?
Additional table information: table: sakila_1
SQL: SELECT payment_date FROM payment ORDER BY payment_date ASC NULLS FIRST LIMIT 1
What was the date of the earliest payment?
Additional table information: table: sakila_1
SQL: SELECT payment_date FROM payment ORDER BY payment_date ASC NULLS FIRST LIMIT 1
Where does the customer with the first name Linda live? And what is her email?
Additional table information: table: sakila_1
SQL: SELECT T2.address, T1.email FROM customer AS T1 JOIN address AS T2 ON T2.address_id = T1.address_id WHERE T1.first_name = 'LINDA'
Return the address and email of the customer with the first name Linda.
Additional table information: table: sakila_1
SQL: SELECT T2.address, T1.email FROM customer AS T1 JOIN address AS T2 ON T2.address_id = T1.address_id WHERE T1.first_name = 'LINDA'
Find all the films longer than 100 minutes, or rated PG, except those who cost more than 200 for replacement. List the titles.
Additional table information: table: sakila_1
SQL: SELECT title FROM film WHERE LENGTH > 100 OR rating = 'PG' EXCEPT SELECT title FROM film WHERE replacement_cost > 200
What are the titles of films that are either longer than 100 minutes or rated PG other than those that cost more than 200 to replace?
Additional table information: table: sakila_1
SQL: SELECT title FROM film WHERE LENGTH > 100 OR rating = 'PG' EXCEPT SELECT title FROM film WHERE replacement_cost > 200
What is the first name and the last name of the customer who made the earliest rental?
Additional table information: table: sakila_1
SQL: SELECT T1.first_name, T1.last_name FROM customer AS T1 JOIN rental AS T2 ON T1.customer_id = T2.customer_id ORDER BY T2.rental_date ASC NULLS FIRST LIMIT 1
Return the full name of the customer who made the first rental.
Additional table information: table: sakila_1
SQL: SELECT T1.first_name, T1.last_name FROM customer AS T1 JOIN rental AS T2 ON T1.customer_id = T2.customer_id ORDER BY T2.rental_date ASC NULLS FIRST LIMIT 1
What is the full name of the staff member who has rented a film to a customer with the first name April and the last name Burns?
Additional table information: table: sakila_1
SQL: SELECT DISTINCT T1.first_name, T1.last_name FROM staff AS T1 JOIN rental AS T2 ON T1.staff_id = T2.staff_id JOIN customer AS T3 ON T2.customer_id = T3.customer_id WHERE T3.first_name = 'APRIL' AND T3.last_name = 'BURNS'
Return the full name of the staff who provided a customer with the first name April and the last name Burns with a film rental.
Additional table information: table: sakila_1
SQL: SELECT DISTINCT T1.first_name, T1.last_name FROM staff AS T1 JOIN rental AS T2 ON T1.staff_id = T2.staff_id JOIN customer AS T3 ON T2.customer_id = T3.customer_id WHERE T3.first_name = 'APRIL' AND T3.last_name = 'BURNS'
Which store has most the customers?
Additional table information: table: sakila_1
SQL: SELECT store_id FROM customer GROUP BY store_id ORDER BY COUNT(*) DESC LIMIT 1
Return the id of the store with the most customers.
Additional table information: table: sakila_1
SQL: SELECT store_id FROM customer GROUP BY store_id ORDER BY COUNT(*) DESC LIMIT 1
What is the largest payment amount?
Additional table information: table: sakila_1
SQL: SELECT amount FROM payment ORDER BY amount DESC LIMIT 1