input stringlengths 191 7.13k | output stringlengths 19 578 |
|---|---|
Tables: Inst, Authors, Papers, Authorship
Columns: Inst.instID, Inst.name, Inst.country, Authors.authID, Authors.lname, Authors.fname, Papers.paperID, Papers.title, Authorship.authID, Authorship.instID, Authorship.paperID, Authorship.authOrder
Question: Retrieve the country that has published the most papers. [/INST] | 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; |
Tables: Inst, Authors, Papers, Authorship
Columns: Inst.instID, Inst.name, Inst.country, Authors.authID, Authors.lname, Authors.fname, Papers.paperID, Papers.title, Authorship.authID, Authorship.instID, Authorship.paperID, Authorship.authOrder
Question: Find the country that the most papers are affiliated with. [/INST] | 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; |
Tables: Inst, Authors, Papers, Authorship
Columns: Inst.instID, Inst.name, Inst.country, Authors.authID, Authors.lname, Authors.fname, Papers.paperID, Papers.title, Authorship.authID, Authorship.instID, Authorship.paperID, Authorship.authOrder
Question: Find the name of the organization that has published the largest n... | 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; |
Tables: Inst, Authors, Papers, Authorship
Columns: Inst.instID, Inst.name, Inst.country, Authors.authID, Authors.lname, Authors.fname, Papers.paperID, Papers.title, Authorship.authID, Authorship.instID, Authorship.paperID, Authorship.authOrder
Question: Which institution has the most papers? Find the name of the instit... | 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; |
Tables: Inst, Authors, Papers, Authorship
Columns: Inst.instID, Inst.name, Inst.country, Authors.authID, Authors.lname, Authors.fname, Papers.paperID, Papers.title, Authorship.authID, Authorship.instID, Authorship.paperID, Authorship.authOrder
Question: Find the titles of the papers that contain the word "ML". [/INST] | SELECT title FROM papers WHERE title LIKE "%ML%"; |
Tables: Inst, Authors, Papers, Authorship
Columns: Inst.instID, Inst.name, Inst.country, Authors.authID, Authors.lname, Authors.fname, Papers.paperID, Papers.title, Authorship.authID, Authorship.instID, Authorship.paperID, Authorship.authOrder
Question: Which papers have the substring "ML" in their titles? Return the t... | SELECT title FROM papers WHERE title LIKE "%ML%"; |
Tables: Inst, Authors, Papers, Authorship
Columns: Inst.instID, Inst.name, Inst.country, Authors.authID, Authors.lname, Authors.fname, Papers.paperID, Papers.title, Authorship.authID, Authorship.instID, Authorship.paperID, Authorship.authOrder
Question: Which paper's title contains the word "Database"? [/INST] | SELECT title FROM papers WHERE title LIKE "%Database%"; |
Tables: Inst, Authors, Papers, Authorship
Columns: Inst.instID, Inst.name, Inst.country, Authors.authID, Authors.lname, Authors.fname, Papers.paperID, Papers.title, Authorship.authID, Authorship.instID, Authorship.paperID, Authorship.authOrder
Question: Which papers have the substring "Database" in their titles? Show t... | SELECT title FROM papers WHERE title LIKE "%Database%"; |
Tables: Inst, Authors, Papers, Authorship
Columns: Inst.instID, Inst.name, Inst.country, Authors.authID, Authors.lname, Authors.fname, Papers.paperID, Papers.title, Authorship.authID, Authorship.instID, Authorship.paperID, Authorship.authOrder
Question: Find the first names of all the authors who have written a paper w... | 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%"; |
Tables: Inst, Authors, Papers, Authorship
Columns: Inst.instID, Inst.name, Inst.country, Authors.authID, Authors.lname, Authors.fname, Papers.paperID, Papers.title, Authorship.authID, Authorship.instID, Authorship.paperID, Authorship.authOrder
Question: Who has written a paper that has the word "Functional" in its titl... | 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%"; |
Tables: Inst, Authors, Papers, Authorship
Columns: Inst.instID, Inst.name, Inst.country, Authors.authID, Authors.lname, Authors.fname, Papers.paperID, Papers.title, Authorship.authID, Authorship.instID, Authorship.paperID, Authorship.authOrder
Question: Find the last names of all the authors that have written a paper w... | 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%"; |
Tables: Inst, Authors, Papers, Authorship
Columns: Inst.instID, Inst.name, Inst.country, Authors.authID, Authors.lname, Authors.fname, Papers.paperID, Papers.title, Authorship.authID, Authorship.instID, Authorship.paperID, Authorship.authOrder
Question: Which authors have written a paper with title containing the word ... | 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%"; |
Tables: Inst, Authors, Papers, Authorship
Columns: Inst.instID, Inst.name, Inst.country, Authors.authID, Authors.lname, Authors.fname, Papers.paperID, Papers.title, Authorship.authID, Authorship.instID, Authorship.paperID, Authorship.authOrder
Question: Retrieve the title of the paper that has the largest number of aut... | SELECT t2.title FROM authorship AS t1 JOIN papers AS t2 ON t1.paperid = t2.paperid WHERE t1.authorder = (SELECT max(authorder) FROM authorship); |
Tables: Inst, Authors, Papers, Authorship
Columns: Inst.instID, Inst.name, Inst.country, Authors.authID, Authors.lname, Authors.fname, Papers.paperID, Papers.title, Authorship.authID, Authorship.instID, Authorship.paperID, Authorship.authOrder
Question: Which paper has the most authors? Give me the paper title. [/INST] | SELECT t2.title FROM authorship AS t1 JOIN papers AS t2 ON t1.paperid = t2.paperid WHERE t1.authorder = (SELECT max(authorder) FROM authorship); |
Tables: Inst, Authors, Papers, Authorship
Columns: Inst.instID, Inst.name, Inst.country, Authors.authID, Authors.lname, Authors.fname, Papers.paperID, Papers.title, Authorship.authID, Authorship.instID, Authorship.paperID, Authorship.authOrder
Question: What is the first name of the author with last name "Ueno"? [/INST... | SELECT fname FROM authors WHERE lname = "Ueno"; |
Tables: Inst, Authors, Papers, Authorship
Columns: Inst.instID, Inst.name, Inst.country, Authors.authID, Authors.lname, Authors.fname, Papers.paperID, Papers.title, Authorship.authID, Authorship.instID, Authorship.paperID, Authorship.authOrder
Question: Which authors have last name "Ueno"? List their first names. [/INS... | SELECT fname FROM authors WHERE lname = "Ueno"; |
Tables: Inst, Authors, Papers, Authorship
Columns: Inst.instID, Inst.name, Inst.country, Authors.authID, Authors.lname, Authors.fname, Papers.paperID, Papers.title, Authorship.authID, Authorship.instID, Authorship.paperID, Authorship.authOrder
Question: Find the last name of the author with first name "Amal". [/INST] | SELECT lname FROM authors WHERE fname = "Amal"; |
Tables: Inst, Authors, Papers, Authorship
Columns: Inst.instID, Inst.name, Inst.country, Authors.authID, Authors.lname, Authors.fname, Papers.paperID, Papers.title, Authorship.authID, Authorship.instID, Authorship.paperID, Authorship.authOrder
Question: Which authors have first name "Amal"? List their last names. [/INS... | SELECT lname FROM authors WHERE fname = "Amal"; |
Tables: Inst, Authors, Papers, Authorship
Columns: Inst.instID, Inst.name, Inst.country, Authors.authID, Authors.lname, Authors.fname, Papers.paperID, Papers.title, Authorship.authID, Authorship.instID, Authorship.paperID, Authorship.authOrder
Question: Find the first names of all the authors ordered in alphabetical or... | SELECT fname FROM authors ORDER BY fname; |
Tables: Inst, Authors, Papers, Authorship
Columns: Inst.instID, Inst.name, Inst.country, Authors.authID, Authors.lname, Authors.fname, Papers.paperID, Papers.title, Authorship.authID, Authorship.instID, Authorship.paperID, Authorship.authOrder
Question: Sort the first names of all the authors in alphabetical order. [/I... | SELECT fname FROM authors ORDER BY fname; |
Tables: Inst, Authors, Papers, Authorship
Columns: Inst.instID, Inst.name, Inst.country, Authors.authID, Authors.lname, Authors.fname, Papers.paperID, Papers.title, Authorship.authID, Authorship.instID, Authorship.paperID, Authorship.authOrder
Question: Retrieve all the last names of authors in alphabetical order. [/IN... | SELECT lname FROM authors ORDER BY lname; |
Tables: Inst, Authors, Papers, Authorship
Columns: Inst.instID, Inst.name, Inst.country, Authors.authID, Authors.lname, Authors.fname, Papers.paperID, Papers.title, Authorship.authID, Authorship.instID, Authorship.paperID, Authorship.authOrder
Question: Give me a list of all the last names of authors sorted in alphabet... | SELECT lname FROM authors ORDER BY lname; |
Tables: Inst, Authors, Papers, Authorship
Columns: Inst.instID, Inst.name, Inst.country, Authors.authID, Authors.lname, Authors.fname, Papers.paperID, Papers.title, Authorship.authID, Authorship.instID, Authorship.paperID, Authorship.authOrder
Question: Retrieve all the first and last names of authors in the alphabetic... | SELECT fname , lname FROM authors ORDER BY lname; |
Tables: Inst, Authors, Papers, Authorship
Columns: Inst.instID, Inst.name, Inst.country, Authors.authID, Authors.lname, Authors.fname, Papers.paperID, Papers.title, Authorship.authID, Authorship.instID, Authorship.paperID, Authorship.authOrder
Question: Sort the list of all the first and last names of authors in alphab... | SELECT fname , lname FROM authors ORDER BY lname; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT count(DISTINCT last_name) FROM actor; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT count(DISTINCT last_name) FROM actor; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT first_name FROM actor GROUP BY first_name ORDER BY count(*) DESC LIMIT 1; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT first_name FROM actor GROUP BY first_name ORDER BY count(*) DESC LIMIT 1; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT first_name , last_name FROM actor GROUP BY first_name , last_name ORDER BY count(*) DESC LIMIT 1; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT first_name , last_name FROM actor GROUP BY first_name , last_name ORDER BY count(*) DESC LIMIT 1; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT district FROM address GROUP BY district HAVING count(*) >= 2; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT district FROM address GROUP BY district HAVING count(*) >= 2; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT phone , postal_code FROM address WHERE address = '1031 Daugavpils Parkway'; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT phone , postal_code FROM address WHERE address = '1031 Daugavpils Parkway'; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT count(*) FROM address WHERE district = 'California'; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT count(*) FROM address WHERE district = 'California'; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT count(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id WHERE T2.country = 'Australia'; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT count(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id WHERE T2.country = 'Australia'; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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'; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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'; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT count(*) FROM customer WHERE active = '1'; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT count(*) FROM customer WHERE active = '1'; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT title , rental_rate FROM film ORDER BY rental_rate DESC LIMIT 1; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT title , rental_rate FROM film ORDER BY rental_rate DESC LIMIT 1; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT store_id FROM inventory GROUP BY store_id ORDER BY count(*) DESC LIMIT 1; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT store_id FROM inventory GROUP BY store_id ORDER BY count(*) DESC LIMIT 1; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT sum(amount) FROM payment; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT sum(amount) FROM payment; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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 LIMIT 1; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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 LIMIT 1; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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'; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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'; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT count(DISTINCT language_id) FROM film; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT count(DISTINCT language_id) FROM film; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT title FROM film WHERE rating = 'R'; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT title FROM film WHERE rating = 'R'; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT T2.address FROM store AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE store_id = 1; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT T2.address FROM store AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE store_id = 1; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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 LIMIT 1; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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 LIMIT 1; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT T2.name FROM film AS T1 JOIN LANGUAGE AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'AIRPORT POLLOCK'; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT T2.name FROM film AS T1 JOIN LANGUAGE AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'AIRPORT POLLOCK'; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT count(*) FROM store; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT count(*) FROM store; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT count(DISTINCT rating) FROM film; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT count(DISTINCT rating) FROM film; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%'; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%'; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT count(*) FROM inventory WHERE store_id = 1; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT count(*) FROM inventory WHERE store_id = 1; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT payment_date FROM payment ORDER BY payment_date ASC LIMIT 1; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT payment_date FROM payment ORDER BY payment_date ASC LIMIT 1; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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'; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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'; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT title FROM film WHERE LENGTH > 100 OR rating = 'PG' EXCEPT SELECT title FROM film WHERE replacement_cost > 200; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT title FROM film WHERE LENGTH > 100 OR rating = 'PG' EXCEPT SELECT title FROM film WHERE replacement_cost > 200; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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 LIMIT 1; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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 LIMIT 1; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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'; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | 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'; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT store_id FROM customer GROUP BY store_id ORDER BY count(*) DESC LIMIT 1; |
Tables: actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store
Columns: actor.actor_id, actor.first_name, actor.last_name, actor.last_update, address.address_id, address.address, address.address2, address.district, address.city_i... | SELECT store_id FROM customer GROUP BY store_id ORDER BY count(*) DESC LIMIT 1; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.