1sf/bird-sql-train-with-schema huggingface dataset:
Database: movie_3
Tables: film_text, actor, address, category, city, country, customer, film, film_actor, film_category, inventory, language, payment, rental, staff, store
Columns (table index, column name): -1, *, 0, film_id, 0, title, 0, description, 1, actor_id, 1, first_name, 1, last_name, 1, last_update, 2, address_id, 2, address, 2, address2, 2, district, 2, city_id, 2, postal_code, 2, phone, 2, last_update, 3, category_id, 3, name, 3, last_update, 4, city_id, 4, city, 4, country_id, 4, last_update, 5, country_id, 5, country, 5, last_update, 6, customer_id, 6, store_id, 6, first_name, 6, last_name, 6, email, 6, address_id, 6, active, 6, create_date, 6, last_update, 7, film_id, 7, title, 7, description, 7, release_year, 7, language_id, 7, original_language_id, 7, rental_duration, 7, rental_rate, 7, length, 7, replacement_cost, 7, rating, 7, special_features, 7, last_update, 8, actor_id, 8, film_id, 8, last_update, 9, film_id, 9, category_id, 9, last_update, 10, inventory_id, 10, film_id, 10, store_id, 10, last_update, 11, language_id, 11, name, 11, last_update, 12, payment_id, 12, customer_id, 12, staff_id, 12, rental_id, 12, amount, 12, payment_date, 12, last_update, 13, rental_id, 13, rental_date, 13, inventory_id, 13, customer_id, 13, return_date, 13, staff_id, 13, last_update, 14, staff_id, 14, first_name, 14, last_name, 14, address_id, 14, picture, 14, email, 14, store_id, 14, active, 14, username, 14, password, 14, last_update, 15, store_id, 15, manager_staff_id, 15, address_id, 15, last_update
Question: How many films are there under the category of "Horror"?
Evidence: "Horror" is the name of category
SQL: SELECT COUNT(T1.film_id) FROM film_category AS T1 INNER JOIN category AS T2 ON T1.category_id = T2.category_id WHERE T2.name = 'Horror'
Database: movie_3
Tables: film_text, actor, address, category, city, country, customer, film, film_actor, film_category, inventory, language, payment, rental, staff, store
Columns (table index, column name): -1, *, 0, film_id, 0, title, 0, description, 1, actor_id, 1, first_name, 1, last_name, 1, last_update, 2, address_id, 2, address, 2, address2, 2, district, 2, city_id, 2, postal_code, 2, phone, 2, last_update, 3, category_id, 3, name, 3, last_update, 4, city_id, 4, city, 4, country_id, 4, last_update, 5, country_id, 5, country, 5, last_update, 6, customer_id, 6, store_id, 6, first_name, 6, last_name, 6, email, 6, address_id, 6, active, 6, create_date, 6, last_update, 7, film_id, 7, title, 7, description, 7, release_year, 7, language_id, 7, original_language_id, 7, rental_duration, 7, rental_rate, 7, length, 7, replacement_cost, 7, rating, 7, special_features, 7, last_update, 8, actor_id, 8, film_id, 8, last_update, 9, film_id, 9, category_id, 9, last_update, 10, inventory_id, 10, film_id, 10, store_id, 10, last_update, 11, language_id, 11, name, 11, last_update, 12, payment_id, 12, customer_id, 12, staff_id, 12, rental_id, 12, amount, 12, payment_date, 12, last_update, 13, rental_id, 13, rental_date, 13, inventory_id, 13, customer_id, 13, return_date, 13, staff_id, 13, last_update, 14, staff_id, 14, first_name, 14, last_name, 14, address_id, 14, picture, 14, email, 14, store_id, 14, active, 14, username, 14, password, 14, last_update, 15, store_id, 15, manager_staff_id, 15, address_id, 15, last_update
Question: Please list the titles of all the films under the category of "Horror" and has a rental rate of $2.99.
Evidence: "Horror" is the name of category; rental rate of $2.99 refers to rental_rate = 2.99
SQL: SELECT T1.title FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T3.name = 'Horror' AND T1.rental_rate = 2.99
Database: movie_3
Tables: film_text, actor, address, category, city, country, customer, film, film_actor, film_category, inventory, language, payment, rental, staff, store
Columns (table index, column name): -1, *, 0, film_id, 0, title, 0, description, 1, actor_id, 1, first_name, 1, last_name, 1, last_update, 2, address_id, 2, address, 2, address2, 2, district, 2, city_id, 2, postal_code, 2, phone, 2, last_update, 3, category_id, 3, name, 3, last_update, 4, city_id, 4, city, 4, country_id, 4, last_update, 5, country_id, 5, country, 5, last_update, 6, customer_id, 6, store_id, 6, first_name, 6, last_name, 6, email, 6, address_id, 6, active, 6, create_date, 6, last_update, 7, film_id, 7, title, 7, description, 7, release_year, 7, language_id, 7, original_language_id, 7, rental_duration, 7, rental_rate, 7, length, 7, replacement_cost, 7, rating, 7, special_features, 7, last_update, 8, actor_id, 8, film_id, 8, last_update, 9, film_id, 9, category_id, 9, last_update, 10, inventory_id, 10, film_id, 10, store_id, 10, last_update, 11, language_id, 11, name, 11, last_update, 12, payment_id, 12, customer_id, 12, staff_id, 12, rental_id, 12, amount, 12, payment_date, 12, last_update, 13, rental_id, 13, rental_date, 13, inventory_id, 13, customer_id, 13, return_date, 13, staff_id, 13, last_update, 14, staff_id, 14, first_name, 14, last_name, 14, address_id, 14, picture, 14, email, 14, store_id, 14, active, 14, username, 14, password, 14, last_update, 15, store_id, 15, manager_staff_id, 15, address_id, 15, last_update
Question: For how many times has the customer RUTH MARTINEZ rented a film?
Evidence: times of rented refers to Count(rental_id)
SQL: SELECT COUNT(T2.rental_id) FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = 'RUTH' AND T1.last_name = 'MARTINEZ'
Database: movie_3
Tables: film_text, actor, address, category, city, country, customer, film, film_actor, film_category, inventory, language, payment, rental, staff, store
Columns (table index, column name): -1, *, 0, film_id, 0, title, 0, description, 1, actor_id, 1, first_name, 1, last_name, 1, last_update, 2, address_id, 2, address, 2, address2, 2, district, 2, city_id, 2, postal_code, 2, phone, 2, last_update, 3, category_id, 3, name, 3, last_update, 4, city_id, 4, city, 4, country_id, 4, last_update, 5, country_id, 5, country, 5, last_update, 6, customer_id, 6, store_id, 6, first_name, 6, last_name, 6, email, 6, address_id, 6, active, 6, create_date, 6, last_update, 7, film_id, 7, title, 7, description, 7, release_year, 7, language_id, 7, original_language_id, 7, rental_duration, 7, rental_rate, 7, length, 7, replacement_cost, 7, rating, 7, special_features, 7, last_update, 8, actor_id, 8, film_id, 8, last_update, 9, film_id, 9, category_id, 9, last_update, 10, inventory_id, 10, film_id, 10, store_id, 10, last_update, 11, language_id, 11, name, 11, last_update, 12, payment_id, 12, customer_id, 12, staff_id, 12, rental_id, 12, amount, 12, payment_date, 12, last_update, 13, rental_id, 13, rental_date, 13, inventory_id, 13, customer_id, 13, return_date, 13, staff_id, 13, last_update, 14, staff_id, 14, first_name, 14, last_name, 14, address_id, 14, picture, 14, email, 14, store_id, 14, active, 14, username, 14, password, 14, last_update, 15, store_id, 15, manager_staff_id, 15, address_id, 15, last_update
Question: Please list the titles of all the films that the customer RUTH MARTINEZ has rented.
SQL: SELECT T4.title FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id WHERE T1.first_name = 'RUTH' AND T1.last_name = 'MARTINEZ'
Database: movie_3
Tables: film_text, actor, address, category, city, country, customer, film, film_actor, film_category, inventory, language, payment, rental, staff, store
Columns (table index, column name): -1, *, 0, film_id, 0, title, 0, description, 1, actor_id, 1, first_name, 1, last_name, 1, last_update, 2, address_id, 2, address, 2, address2, 2, district, 2, city_id, 2, postal_code, 2, phone, 2, last_update, 3, category_id, 3, name, 3, last_update, 4, city_id, 4, city, 4, country_id, 4, last_update, 5, country_id, 5, country, 5, last_update, 6, customer_id, 6, store_id, 6, first_name, 6, last_name, 6, email, 6, address_id, 6, active, 6, create_date, 6, last_update, 7, film_id, 7, title, 7, description, 7, release_year, 7, language_id, 7, original_language_id, 7, rental_duration, 7, rental_rate, 7, length, 7, replacement_cost, 7, rating, 7, special_features, 7, last_update, 8, actor_id, 8, film_id, 8, last_update, 9, film_id, 9, category_id, 9, last_update, 10, inventory_id, 10, film_id, 10, store_id, 10, last_update, 11, language_id, 11, name, 11, last_update, 12, payment_id, 12, customer_id, 12, staff_id, 12, rental_id, 12, amount, 12, payment_date, 12, last_update, 13, rental_id, 13, rental_date, 13, inventory_id, 13, customer_id, 13, return_date, 13, staff_id, 13, last_update, 14, staff_id, 14, first_name, 14, last_name, 14, address_id, 14, picture, 14, email, 14, store_id, 14, active, 14, username, 14, password, 14, last_update, 15, store_id, 15, manager_staff_id, 15, address_id, 15, last_update
Question: Among the films that the customer RUTH MARTINEZ has rented, how many of them are released in 2006?
Evidence: release in 2006 refers to release_year = 2006
SQL: SELECT COUNT(T1.customer_id) FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id WHERE T4.release_year = 2006 AND T1.first_name = 'RUTH' AND T1.last_name = 'MARTINEZ'
Database: movie_3
Tables: film_text, actor, address, category, city, country, customer, film, film_actor, film_category, inventory, language, payment, rental, staff, store
Columns (table index, column name): -1, *, 0, film_id, 0, title, 0, description, 1, actor_id, 1, first_name, 1, last_name, 1, last_update, 2, address_id, 2, address, 2, address2, 2, district, 2, city_id, 2, postal_code, 2, phone, 2, last_update, 3, category_id, 3, name, 3, last_update, 4, city_id, 4, city, 4, country_id, 4, last_update, 5, country_id, 5, country, 5, last_update, 6, customer_id, 6, store_id, 6, first_name, 6, last_name, 6, email, 6, address_id, 6, active, 6, create_date, 6, last_update, 7, film_id, 7, title, 7, description, 7, release_year, 7, language_id, 7, original_language_id, 7, rental_duration, 7, rental_rate, 7, length, 7, replacement_cost, 7, rating, 7, special_features, 7, last_update, 8, actor_id, 8, film_id, 8, last_update, 9, film_id, 9, category_id, 9, last_update, 10, inventory_id, 10, film_id, 10, store_id, 10, last_update, 11, language_id, 11, name, 11, last_update, 12, payment_id, 12, customer_id, 12, staff_id, 12, rental_id, 12, amount, 12, payment_date, 12, last_update, 13, rental_id, 13, rental_date, 13, inventory_id, 13, customer_id, 13, return_date, 13, staff_id, 13, last_update, 14, staff_id, 14, first_name, 14, last_name, 14, address_id, 14, picture, 14, email, 14, store_id, 14, active, 14, username, 14, password, 14, last_update, 15, store_id, 15, manager_staff_id, 15, address_id, 15, last_update
Question: Among the films that the customer RUTH MARTINEZ has rented, what is the title of the one with the highest replacement cost?
Evidence: highest replacement cost refers to Max(replacement_cost)
SQL: SELECT T4.title FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id WHERE T1.first_name = 'RUTH' AND T1.last_name = 'MARTINEZ' ORDER BY T4.replacement_cost DESC LIMIT 1
Database: movie_3
Tables: film_text, actor, address, category, city, country, customer, film, film_actor, film_category, inventory, language, payment, rental, staff, store
Columns (table index, column name): -1, *, 0, film_id, 0, title, 0, description, 1, actor_id, 1, first_name, 1, last_name, 1, last_update, 2, address_id, 2, address, 2, address2, 2, district, 2, city_id, 2, postal_code, 2, phone, 2, last_update, 3, category_id, 3, name, 3, last_update, 4, city_id, 4, city, 4, country_id, 4, last_update, 5, country_id, 5, country, 5, last_update, 6, customer_id, 6, store_id, 6, first_name, 6, last_name, 6, email, 6, address_id, 6, active, 6, create_date, 6, last_update, 7, film_id, 7, title, 7, description, 7, release_year, 7, language_id, 7, original_language_id, 7, rental_duration, 7, rental_rate, 7, length, 7, replacement_cost, 7, rating, 7, special_features, 7, last_update, 8, actor_id, 8, film_id, 8, last_update, 9, film_id, 9, category_id, 9, last_update, 10, inventory_id, 10, film_id, 10, store_id, 10, last_update, 11, language_id, 11, name, 11, last_update, 12, payment_id, 12, customer_id, 12, staff_id, 12, rental_id, 12, amount, 12, payment_date, 12, last_update, 13, rental_id, 13, rental_date, 13, inventory_id, 13, customer_id, 13, return_date, 13, staff_id, 13, last_update, 14, staff_id, 14, first_name, 14, last_name, 14, address_id, 14, picture, 14, email, 14, store_id, 14, active, 14, username, 14, password, 14, last_update, 15, store_id, 15, manager_staff_id, 15, address_id, 15, last_update
Question: Please list the full names of all the customers who have rented the film with the highest replacement cost.
Evidence: full name refers to first_name, last_name; highest replacement cost refers to Max(replacement_cost)
SQL: SELECT T1.first_name, T1.last_name FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id ORDER BY T4.replacement_cost DESC LIMIT 1
Database: movie_3
Tables: film_text, actor, address, category, city, country, customer, film, film_actor, film_category, inventory, language, payment, rental, staff, store
Columns (table index, column name): -1, *, 0, film_id, 0, title, 0, description, 1, actor_id, 1, first_name, 1, last_name, 1, last_update, 2, address_id, 2, address, 2, address2, 2, district, 2, city_id, 2, postal_code, 2, phone, 2, last_update, 3, category_id, 3, name, 3, last_update, 4, city_id, 4, city, 4, country_id, 4, last_update, 5, country_id, 5, country, 5, last_update, 6, customer_id, 6, store_id, 6, first_name, 6, last_name, 6, email, 6, address_id, 6, active, 6, create_date, 6, last_update, 7, film_id, 7, title, 7, description, 7, release_year, 7, language_id, 7, original_language_id, 7, rental_duration, 7, rental_rate, 7, length, 7, replacement_cost, 7, rating, 7, special_features, 7, last_update, 8, actor_id, 8, film_id, 8, last_update, 9, film_id, 9, category_id, 9, last_update, 10, inventory_id, 10, film_id, 10, store_id, 10, last_update, 11, language_id, 11, name, 11, last_update, 12, payment_id, 12, customer_id, 12, staff_id, 12, rental_id, 12, amount, 12, payment_date, 12, last_update, 13, rental_id, 13, rental_date, 13, inventory_id, 13, customer_id, 13, return_date, 13, staff_id, 13, last_update, 14, staff_id, 14, first_name, 14, last_name, 14, address_id, 14, picture, 14, email, 14, store_id, 14, active, 14, username, 14, password, 14, last_update, 15, store_id, 15, manager_staff_id, 15, address_id, 15, last_update
Question: How many films rented to the customer RUTH MARTINEZ were returned in August, 2005?
Evidence: returned in August, 2005 refers to year(return_date) = 2005 and month (return_date) = 8
SQL: SELECT COUNT(T1.customer_id) FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = 'RUTH' AND T1.last_name = 'MARTINEZ' AND STRFTIME('%m',T2.return_date) = '8' AND STRFTIME('%Y', T2.return_date) = '2005'
Database: movie_3
Tables: film_text, actor, address, category, city, country, customer, film, film_actor, film_category, inventory, language, payment, rental, staff, store
Columns (table index, column name): -1, *, 0, film_id, 0, title, 0, description, 1, actor_id, 1, first_name, 1, last_name, 1, last_update, 2, address_id, 2, address, 2, address2, 2, district, 2, city_id, 2, postal_code, 2, phone, 2, last_update, 3, category_id, 3, name, 3, last_update, 4, city_id, 4, city, 4, country_id, 4, last_update, 5, country_id, 5, country, 5, last_update, 6, customer_id, 6, store_id, 6, first_name, 6, last_name, 6, email, 6, address_id, 6, active, 6, create_date, 6, last_update, 7, film_id, 7, title, 7, description, 7, release_year, 7, language_id, 7, original_language_id, 7, rental_duration, 7, rental_rate, 7, length, 7, replacement_cost, 7, rating, 7, special_features, 7, last_update, 8, actor_id, 8, film_id, 8, last_update, 9, film_id, 9, category_id, 9, last_update, 10, inventory_id, 10, film_id, 10, store_id, 10, last_update, 11, language_id, 11, name, 11, last_update, 12, payment_id, 12, customer_id, 12, staff_id, 12, rental_id, 12, amount, 12, payment_date, 12, last_update, 13, rental_id, 13, rental_date, 13, inventory_id, 13, customer_id, 13, return_date, 13, staff_id, 13, last_update, 14, staff_id, 14, first_name, 14, last_name, 14, address_id, 14, picture, 14, email, 14, store_id, 14, active, 14, username, 14, password, 14, last_update, 15, store_id, 15, manager_staff_id, 15, address_id, 15, last_update
Question: Please give the full name of the customer that have rented the most films.
Evidence: full name refers to first_name, last_name; customer who rented the most film refers to Max(count(rental_id))
SQL: SELECT T.first_name, T.last_name FROM ( SELECT T1.first_name, T1.last_name, COUNT(T2.rental_id) AS num FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.first_name, T1.last_name ) AS T ORDER BY T.num DESC LIMIT 1
Database: movie_3
Tables: film_text, actor, address, category, city, country, customer, film, film_actor, film_category, inventory, language, payment, rental, staff, store
Columns (table index, column name): -1, *, 0, film_id, 0, title, 0, description, 1, actor_id, 1, first_name, 1, last_name, 1, last_update, 2, address_id, 2, address, 2, address2, 2, district, 2, city_id, 2, postal_code, 2, phone, 2, last_update, 3, category_id, 3, name, 3, last_update, 4, city_id, 4, city, 4, country_id, 4, last_update, 5, country_id, 5, country, 5, last_update, 6, customer_id, 6, store_id, 6, first_name, 6, last_name, 6, email, 6, address_id, 6, active, 6, create_date, 6, last_update, 7, film_id, 7, title, 7, description, 7, release_year, 7, language_id, 7, original_language_id, 7, rental_duration, 7, rental_rate, 7, length, 7, replacement_cost, 7, rating, 7, special_features, 7, last_update, 8, actor_id, 8, film_id, 8, last_update, 9, film_id, 9, category_id, 9, last_update, 10, inventory_id, 10, film_id, 10, store_id, 10, last_update, 11, language_id, 11, name, 11, last_update, 12, payment_id, 12, customer_id, 12, staff_id, 12, rental_id, 12, amount, 12, payment_date, 12, last_update, 13, rental_id, 13, rental_date, 13, inventory_id, 13, customer_id, 13, return_date, 13, staff_id, 13, last_update, 14, staff_id, 14, first_name, 14, last_name, 14, address_id, 14, picture, 14, email, 14, store_id, 14, active, 14, username, 14, password, 14, last_update, 15, store_id, 15, manager_staff_id, 15, address_id, 15, last_update
Question: Among the customers who have rented the film ACADEMY DINOSAUR, how many of them are active?
Evidence: "ACADEMY DINOSAUR" is the title of film; customer refers to customer_id; active refers to active = 1
SQL: SELECT COUNT(T1.customer_id) FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id WHERE T1.active = 1 AND T4.title = 'ACADEMY DINOSAUR'
Database: movie_3
Tables: film_text, actor, address, category, city, country, customer, film, film_actor, film_category, inventory, language, payment, rental, staff, store
Columns (table index, column name): -1, *, 0, film_id, 0, title, 0, description, 1, actor_id, 1, first_name, 1, last_name, 1, last_update, 2, address_id, 2, address, 2, address2, 2, district, 2, city_id, 2, postal_code, 2, phone, 2, last_update, 3, category_id, 3, name, 3, last_update, 4, city_id, 4, city, 4, country_id, 4, last_update, 5, country_id, 5, country, 5, last_update, 6, customer_id, 6, store_id, 6, first_name, 6, last_name, 6, email, 6, address_id, 6, active, 6, create_date, 6, last_update, 7, film_id, 7, title, 7, description, 7, release_year, 7, language_id, 7, original_language_id, 7, rental_duration, 7, rental_rate, 7, length, 7, replacement_cost, 7, rating, 7, special_features, 7, last_update, 8, actor_id, 8, film_id, 8, last_update, 9, film_id, 9, category_id, 9, last_update, 10, inventory_id, 10, film_id, 10, store_id, 10, last_update, 11, language_id, 11, name, 11, last_update, 12, payment_id, 12, customer_id, 12, staff_id, 12, rental_id, 12, amount, 12, payment_date, 12, last_update, 13, rental_id, 13, rental_date, 13, inventory_id, 13, customer_id, 13, return_date, 13, staff_id, 13, last_update, 14, staff_id, 14, first_name, 14, last_name, 14, address_id, 14, picture, 14, email, 14, store_id, 14, active, 14, username, 14, password, 14, last_update, 15, store_id, 15, manager_staff_id, 15, address_id, 15, last_update
Question: Which film is rented for the most times by the customers? Please give its title.
Evidence: film refers to title; film rented the most times refers to title where Max(Count(rental_id))
SQL: SELECT T.title FROM ( SELECT T1.title, COUNT(T3.rental_id) AS num FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id INNER JOIN rental AS T3 ON T2.inventory_id = T3.inventory_id GROUP BY T1.title ) AS T ORDER BY T.num DESC LIMIT 1
Database: movie_3
Tables: film_text, actor, address, category, city, country, customer, film, film_actor, film_category, inventory, language, payment, rental, staff, store
Columns (table index, column name): -1, *, 0, film_id, 0, title, 0, description, 1, actor_id, 1, first_name, 1, last_name, 1, last_update, 2, address_id, 2, address, 2, address2, 2, district, 2, city_id, 2, postal_code, 2, phone, 2, last_update, 3, category_id, 3, name, 3, last_update, 4, city_id, 4, city, 4, country_id, 4, last_update, 5, country_id, 5, country, 5, last_update, 6, customer_id, 6, store_id, 6, first_name, 6, last_name, 6, email, 6, address_id, 6, active, 6, create_date, 6, last_update, 7, film_id, 7, title, 7, description, 7, release_year, 7, language_id, 7, original_language_id, 7, rental_duration, 7, rental_rate, 7, length, 7, replacement_cost, 7, rating, 7, special_features, 7, last_update, 8, actor_id, 8, film_id, 8, last_update, 9, film_id, 9, category_id, 9, last_update, 10, inventory_id, 10, film_id, 10, store_id, 10, last_update, 11, language_id, 11, name, 11, last_update, 12, payment_id, 12, customer_id, 12, staff_id, 12, rental_id, 12, amount, 12, payment_date, 12, last_update, 13, rental_id, 13, rental_date, 13, inventory_id, 13, customer_id, 13, return_date, 13, staff_id, 13, last_update, 14, staff_id, 14, first_name, 14, last_name, 14, address_id, 14, picture, 14, email, 14, store_id, 14, active, 14, username, 14, password, 14, last_update, 15, store_id, 15, manager_staff_id, 15, address_id, 15, last_update
Question: Which customer has rented more movies, RUTH MARTINEZ or LINDA WILLIAMS?
Evidence: rented more movie Max(Count(customer_id)); "RUTH MARTINEZ" and "LINDA WILLIAMS" are both full name of customer
SQL: SELECT T.first_name, T.last_name FROM ( SELECT T1.first_name, T1.last_name, COUNT(T1.customer_id) AS num FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id WHERE (T1.first_name = 'RUTH' AND T1.last_name = 'MARTINEZ') OR (T1.first_name = 'LINDA' AND T1.last_name = 'WILLIAMS') GROUP BY T1.first_name, T1.last_name ) AS T ORDER BY T.num DESC LIMIT 1