target-benchmark/spider-queries huggingface dataset:
Database: icfp_1 (tables: authorship, authors, papers)
Question: Find the titles of all the papers written by "Aaron Turon".
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"
Database: icfp_1 (tables: authorship, authors, papers)
Question: How many papers have "Atsushi Ohori" published?
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"
Database: icfp_1 (tables: authorship, authors, papers)
Question: How many papers are "Atsushi Ohori" the author of?
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"
Database: icfp_1 (tables: authorship, inst, authors)
Question: What is the name of the institution that "Matthias Blume" belongs to?
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"
Database: icfp_1 (tables: authorship, inst, authors)
Question: Which institution is the author "Matthias Blume" belong to? Give me the name of the institution.
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"
Database: icfp_1 (tables: authorship, inst, authors)
Question: Which institution does "Katsuhiro Ueno" belong to?
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"
Database: icfp_1 (tables: authorship, inst, authors)
Question: What is the name of the institution the author "Katsuhiro Ueno" belongs to?
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"
Database: icfp_1 (tables: authorship, inst, authors)
Question: Who belong to the institution "University of Oxford"? Show the first names and last names.
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"
Database: icfp_1 (tables: authorship, inst, authors)
Question: Find the first names and last names of the authors whose institution affiliation is "University of Oxford".
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"
Database: icfp_1 (tables: authorship, inst, authors)
Question: Which authors belong to the institution "Google"? Show the first names and last names.
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"
Database: icfp_1 (tables: authorship, inst, authors)
Question: Find the first names and last names of the authors whose institution affiliation is "Google".
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"
Database: icfp_1 (tables: authorship, authors, papers)
Question: What are the last names of the author of the paper titled "Binders Unbound"?
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"
Database: icfp_1 (tables: authorship, authors, papers)
Question: Who is the author of the paper titled "Binders Unbound"? Give me the last name.
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"
Database: icfp_1 (tables: authorship, authors, papers)
Question: Find the first and last name of the author(s) who wrote the paper "Nameless, Painless".
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"
Database: icfp_1 (tables: authorship, authors, papers)
Question: What are the first and last name of the author who published the paper titled "Nameless, Painless"?
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"
Database: icfp_1 (tables: authorship, inst, papers)
Question: What are the papers published under the institution "Indiana University"?
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"
Database: icfp_1 (tables: authorship, inst, papers)
Question: List the titles of the papers whose authors are from the institution "Indiana University".
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"
Database: icfp_1 (tables: authorship, inst, papers)
Question: Find all the papers published by the institution "Google".
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"
Database: icfp_1 (tables: authorship, inst, papers)
Question: Which papers were written by authors from the institution "Google"?
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"
Database: icfp_1 (tables: authorship, inst, papers)
Question: How many papers are published by the institution "Tokohu University"?
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"
Database: icfp_1 (tables: authorship, inst, papers)
Question: Find the number of papers published by authors from the institution "Tokohu University".
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"
Database: icfp_1 (tables: authorship, inst, papers)
Question: Find the number of papers published by the institution "University of Pennsylvania".
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"
Database: icfp_1 (tables: authorship, inst, papers)
Question: How many papers are written by authors from the institution "University of Pennsylvania"?
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"
Database: icfp_1 (tables: authorship, authors, papers)
Question: Find the papers which have "Olin Shivers" as an author.
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"
Database: icfp_1 (tables: authorship, authors, papers)
Question: Which papers did the author "Olin Shivers" write? Give me the paper titles.
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"
Database: icfp_1 (tables: authorship, authors, papers)
Question: Which papers have "Stephanie Weirich" as an author?
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"
Database: icfp_1 (tables: authorship, authors, papers)
Question: Find the titles of the papers the author "Stephanie Weirich" wrote.
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"
Database: icfp_1 (tables: authorship, inst, authors, papers)
Question: Which paper is published in an institution in "USA" and have "Turon" as its second author?
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"
Database: icfp_1 (tables: authorship, inst, authors, papers)
Question: Find papers whose second author has last name "Turon" and is affiliated with an institution in the country "USA".
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"
Database: icfp_1 (tables: authorship, inst, authors, papers)
Question: Find the titles of papers whose first author is affiliated with an institution in the country "Japan" and has last name "Ohori"?
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"
Database: icfp_1 (tables: authorship, inst, authors, papers)
Question: 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.
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"
Database: icfp_1 (tables: authorship, authors, papers)
Question: What is the last name of the author that has published the most papers?
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
Database: icfp_1 (tables: authorship, authors, papers)
Question: Which author has written the most papers? Find his or her last name.
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
Database: icfp_1 (tables: authorship, inst, papers)
Question: Retrieve the country that has published the most papers.
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
Database: icfp_1 (tables: authorship, inst, papers)
Question: Find the country that the most papers are affiliated with.
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
Database: icfp_1 (tables: authorship, inst, papers)
Question: Find the name of the organization that has published the largest number of papers.
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
Database: icfp_1 (tables: authorship, inst, papers)
Question: Which institution has the most papers? Find the name of the institution.
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
Database: icfp_1 (tables: papers)
Question: Find the titles of the papers that contain the word "ML".
SQL: SELECT title FROM papers WHERE title LIKE "%ML%"
Database: icfp_1 (tables: papers)
Question: Which papers have the substring "ML" in their titles? Return the titles of the papers.
SQL: SELECT title FROM papers WHERE title LIKE "%ML%"
Database: icfp_1 (tables: papers)
Question: Which paper's title contains the word "Database"?
SQL: SELECT title FROM papers WHERE title LIKE "%Database%"
Database: icfp_1 (tables: papers)
Question: Which papers have the substring "Database" in their titles? Show the titles of the papers.
SQL: SELECT title FROM papers WHERE title LIKE "%Database%"
Database: icfp_1 (tables: authorship, authors, papers)
Question: Find the first names of all the authors who have written a paper with title containing the word "Functional".
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%"
Database: icfp_1 (tables: authorship, authors, papers)
Question: Who has written a paper that has the word "Functional" in its title? Return the first names of the authors.
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%"
Database: icfp_1 (tables: authorship, authors, papers)
Question: Find the last names of all the authors that have written a paper with title containing the word "Monadic".
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%"
Database: icfp_1 (tables: authorship, authors, papers)
Question: Which authors have written a paper with title containing the word "Monadic"? Return their last names.
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%"
Database: icfp_1 (tables: authorship, papers)
Question: Retrieve the title of the paper that has the largest number of authors.
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)
Database: icfp_1 (tables: authorship, papers)
Question: Which paper has the most authors? Give me the paper title.
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)
Database: icfp_1 (tables: authors)
Question: What is the first name of the author with last name "Ueno"?
SQL: SELECT fname FROM authors WHERE lname  =  "Ueno"
Database: icfp_1 (tables: authors)
Question: Which authors have last name "Ueno"? List their first names.
SQL: SELECT fname FROM authors WHERE lname  =  "Ueno"
Database: icfp_1 (tables: authors)
Question: Find the last name of the author with first name "Amal".
SQL: SELECT lname FROM authors WHERE fname  =  "Amal"
Database: icfp_1 (tables: authors)
Question: Which authors have first name "Amal"? List their last names.
SQL: SELECT lname FROM authors WHERE fname  =  "Amal"
Database: icfp_1 (tables: authors)
Question: Find the first names of all the authors ordered in alphabetical order.
SQL: SELECT fname FROM authors ORDER BY fname
Database: icfp_1 (tables: authors)
Question: Sort the first names of all the authors in alphabetical order.
SQL: SELECT fname FROM authors ORDER BY fname
Database: icfp_1 (tables: authors)
Question: Retrieve all the last names of authors in alphabetical order.
SQL: SELECT lname FROM authors ORDER BY lname
Database: icfp_1 (tables: authors)
Question: Give me a list of all the last names of authors sorted in alphabetical order
SQL: SELECT lname FROM authors ORDER BY lname
Database: icfp_1 (tables: authors)
Question: Retrieve all the first and last names of authors in the alphabetical order of last names.
SQL: SELECT fname ,  lname FROM authors ORDER BY lname
Database: icfp_1 (tables: authors)
Question: Sort the list of all the first and last names of authors in alphabetical order of the last names.
SQL: SELECT fname ,  lname FROM authors ORDER BY lname
Database: sakila_1 (tables: actor)
Question: How many different last names do the actors and actresses have?
SQL: SELECT count(DISTINCT last_name) FROM actor
Database: sakila_1 (tables: actor)
Question: Count the number of different last names actors have.
SQL: SELECT count(DISTINCT last_name) FROM actor
Database: sakila_1 (tables: actor)
Question: What is the most popular first name of the actors?
SQL: SELECT first_name FROM actor GROUP BY first_name ORDER BY count(*) DESC LIMIT 1
Database: sakila_1 (tables: actor)
Question: Return the most common first name among all actors.
SQL: SELECT first_name FROM actor GROUP BY first_name ORDER BY count(*) DESC LIMIT 1
Database: sakila_1 (tables: actor)
Question: What is the most popular full name of the actors?
SQL: SELECT first_name ,  last_name FROM actor GROUP BY first_name ,  last_name ORDER BY count(*) DESC LIMIT 1
Database: sakila_1 (tables: actor)
Question: Return the most common full name among all actors.
SQL: SELECT first_name ,  last_name FROM actor GROUP BY first_name ,  last_name ORDER BY count(*) DESC LIMIT 1
Database: sakila_1 (tables: address)
Question: Which districts have at least two addresses?
SQL: SELECT district FROM address GROUP BY district HAVING count(*)  >=  2
Database: sakila_1 (tables: address)
Question: Give the districts which have two or more addresses.
SQL: SELECT district FROM address GROUP BY district HAVING count(*)  >=  2
Database: sakila_1 (tables: address)
Question: What is the phone number and postal code of the address 1031 Daugavpils Parkway?
SQL: SELECT phone ,  postal_code FROM address WHERE address  =  '1031 Daugavpils Parkway'
Database: sakila_1 (tables: address)
Question: Give the phone and postal code corresponding to the address '1031 Daugavpils Parkway'.
SQL: SELECT phone ,  postal_code FROM address WHERE address  =  '1031 Daugavpils Parkway'
Database: sakila_1 (tables: address, city)
Question: Which city has the most addresses? List the city name, number of addresses, and city id.
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
Database: sakila_1 (tables: address, city)
Question: What are the city name, id, and number of addresses corresponding to the city with the most addressed?
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
Database: sakila_1 (tables: address)
Question: How many addresses are in the district of California?
SQL: SELECT count(*) FROM address WHERE district  =  'California'
Database: sakila_1 (tables: address)
Question: Count the number of addressed in the California district.
SQL: SELECT count(*) FROM address WHERE district  =  'California'
Database: sakila_1 (tables: inventory, film)
Question: Which film is rented at a fee of 0.99 and has less than 3 in the inventory? List the film title and id.
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
Database: sakila_1 (tables: inventory, film)
Question: What are the title and id of the film which has a rental rate of 0.99 and an inventory of below 3?
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
Database: sakila_1 (tables: city, country)
Question: How many cities are in Australia?
SQL: SELECT count(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id  =  T2.country_id WHERE T2.country  =  'Australia'
Database: sakila_1 (tables: city, country)
Question: Count the number of cities in Australia.
SQL: SELECT count(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id  =  T2.country_id WHERE T2.country  =  'Australia'
Database: sakila_1 (tables: city, country)
Question: Which countries have at least 3 cities?
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
Database: sakila_1 (tables: city, country)
Question: What are the countries that contain 3 or more cities?
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
Database: sakila_1 (tables: payment, staff)
Question: 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.
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'
Database: sakila_1 (tables: payment, staff)
Question: 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?
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'
Database: sakila_1 (tables: customer)
Question: How many customers have an active value of 1?
SQL: SELECT count(*) FROM customer WHERE active = '1'
Database: sakila_1 (tables: customer)
Question: Count the number of customers who are active.
SQL: SELECT count(*) FROM customer WHERE active = '1'
Database: sakila_1 (tables: film)
Question: Which film has the highest rental rate? And what is the rate?
SQL: SELECT title ,  rental_rate FROM film ORDER BY rental_rate DESC LIMIT 1
Database: sakila_1 (tables: film)
Question: What are the title and rental rate of the film with the highest rental rate?
SQL: SELECT title ,  rental_rate FROM film ORDER BY rental_rate DESC LIMIT 1
Database: sakila_1 (tables: film_actor, film)
Question: Which film has the most number of actors or actresses? List the film name, film id and description.
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
Database: sakila_1 (tables: film_actor, film)
Question: What are the title, id, and description of the movie with the greatest number of actors?
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
Database: sakila_1 (tables: film_actor, actor)
Question: Which film actor (actress) starred the most films? List his or her first name, last name and actor id.
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
Database: sakila_1 (tables: film_actor, actor)
Question: Return the full name and id of the actor or actress who starred in the greatest number of films.
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
Database: sakila_1 (tables: film_actor, actor)
Question: Which film actors (actresses) played a role in more than 30 films? List his or her first name and last name.
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