Question: How many kinds of different ratings are listed?

actor : actor_id (number) , first_name (text) , last_name (text) , last_update (time) | address : address_id (number) , address (text) , address2 (text) , district (text) , city_id (number) , postal_code (text) , phone (text) , last_update (time) | category : category_id (number) , name (text) , last_update (time) | city : city_id (number) , city (text) , country_id (number) , last_update (time) | country : country_id (number) , country (text) , last_update (time) | customer : customer_id (number) , store_id (number) , first_name (text) , last_name (text) , email (text) , address_id (number) , active (boolean) , create_date (time) , last_update (time) | film : film_id (number) , title (text) , description (text) , release_year (time) , language_id (number) , original_language_id (number) , rental_duration (number) , rental_rate (number) , length (number) , replacement_cost (number) , rating (text) , special_features (text) , last_update (time) | film_actor : actor_id (number) , film_id (number) , last_update (time) | film_category : film_id (number) , category_id (number) , last_update (time) | film_text : film_id (number) , title (text) , description (text) | inventory : inventory_id (number) , film_id (number) , store_id (number) , last_update (time) | language : language_id (number) , name (text) , last_update (time) | payment : payment_id (number) , customer_id (number) , staff_id (number) , rental_id (number) , amount (number) , payment_date (time) , last_update (time) | rental : rental_id (number) , rental_date (time) , inventory_id (number) , customer_id (number) , return_date (time) , staff_id (number) , last_update (time) | staff : staff_id (number) , first_name (text) , last_name (text) , address_id (number) , picture (others) , email (text) , store_id (number) , active (boolean) , username (text) , password (text) , last_update (time) | store : store_id (number) , manager_staff_id (number) , address_id (number) , last_update (time)


Question: Count the number of different film ratings.

actor : actor_id (number) , first_name (text) , last_name (text) , last_update (time) | address : address_id (number) , address (text) , address2 (text) , district (text) , city_id (number) , postal_code (text) , phone (text) , last_update (time) | category : category_id (number) , name (text) , last_update (time) | city : city_id (number) , city (text) , country_id (number) , last_update (time) | country : country_id (number) , country (text) , last_update (time) | customer : customer_id (number) , store_id (number) , first_name (text) , last_name (text) , email (text) , address_id (number) , active (boolean) , create_date (time) , last_update (time) | film : film_id (number) , title (text) , description (text) , release_year (time) , language_id (number) , original_language_id (number) , rental_duration (number) , rental_rate (number) , length (number) , replacement_cost (number) , rating (text) , special_features (text) , last_update (time) | film_actor : actor_id (number) , film_id (number) , last_update (time) | film_category : film_id (number) , category_id (number) , last_update (time) | film_text : film_id (number) , title (text) , description (text) | inventory : inventory_id (number) , film_id (number) , store_id (number) , last_update (time) | language : language_id (number) , name (text) , last_update (time) | payment : payment_id (number) , customer_id (number) , staff_id (number) , rental_id (number) , amount (number) , payment_date (time) , last_update (time) | rental : rental_id (number) , rental_date (time) , inventory_id (number) , customer_id (number) , return_date (time) , staff_id (number) , last_update (time) | staff : staff_id (number) , first_name (text) , last_name (text) , address_id (number) , picture (others) , email (text) , store_id (number) , active (boolean) , username (text) , password (text) , last_update (time) | store : store_id (number) , manager_staff_id (number) , address_id (number) , last_update (time)


Question: Which movies have 'Deleted Scenes' as a substring in the special feature?

actor : actor_id (number) , first_name (text) , last_name (text) , last_update (time) | address : address_id (number) , address (text) , address2 (text) , district (text) , city_id (number) , postal_code (text) , phone (text) , last_update (time) | category : category_id (number) , name (text) , last_update (time) | city : city_id (number) , city (text) , country_id (number) , last_update (time) | country : country_id (number) , country (text) , last_update (time) | customer : customer_id (number) , store_id (number) , first_name (text) , last_name (text) , email (text) , address_id (number) , active (boolean) , create_date (time) , last_update (time) | film : film_id (number) , title (text) , description (text) , release_year (time) , language_id (number) , original_language_id (number) , rental_duration (number) , rental_rate (number) , length (number) , replacement_cost (number) , rating (text) , special_features (text) , last_update (time) | film_actor : actor_id (number) , film_id (number) , last_update (time) | film_category : film_id (number) , category_id (number) , last_update (time) | film_text : film_id (number) , title (text) , description (text) | inventory : inventory_id (number) , film_id (number) , store_id (number) , last_update (time) | language : language_id (number) , name (text) , last_update (time) | payment : payment_id (number) , customer_id (number) , staff_id (number) , rental_id (number) , amount (number) , payment_date (time) , last_update (time) | rental : rental_id (number) , rental_date (time) , inventory_id (number) , customer_id (number) , return_date (time) , staff_id (number) , last_update (time) | staff : staff_id (number) , first_name (text) , last_name (text) , address_id (number) , picture (others) , email (text) , store_id (number) , active (boolean) , username (text) , password (text) , last_update (time) | store : store_id (number) , manager_staff_id (number) , address_id (number) , last_update (time)

film : title (text) , special_features (text)


Question: Return the titles of films that include 'Deleted Scenes' in their special feature section.

actor : actor_id (number) , first_name (text) , last_name (text) , last_update (time) | address : address_id (number) , address (text) , address2 (text) , district (text) , city_id (number) , postal_code (text) , phone (text) , last_update (time) | category : category_id (number) , name (text) , last_update (time) | city : city_id (number) , city (text) , country_id (number) , last_update (time) | country : country_id (number) , country (text) , last_update (time) | customer : customer_id (number) , store_id (number) , first_name (text) , last_name (text) , email (text) , address_id (number) , active (boolean) , create_date (time) , last_update (time) | film : film_id (number) , title (text) , description (text) , release_year (time) , language_id (number) , original_language_id (number) , rental_duration (number) , rental_rate (number) , length (number) , replacement_cost (number) , rating (text) , special_features (text) , last_update (time) | film_actor : actor_id (number) , film_id (number) , last_update (time) | film_category : film_id (number) , category_id (number) , last_update (time) | film_text : film_id (number) , title (text) , description (text) | inventory : inventory_id (number) , film_id (number) , store_id (number) , last_update (time) | language : language_id (number) , name (text) , last_update (time) | payment : payment_id (number) , customer_id (number) , staff_id (number) , rental_id (number) , amount (number) , payment_date (time) , last_update (time) | rental : rental_id (number) , rental_date (time) , inventory_id (number) , customer_id (number) , return_date (time) , staff_id (number) , last_update (time) | staff : staff_id (number) , first_name (text) , last_name (text) , address_id (number) , picture (others) , email (text) , store_id (number) , active (boolean) , username (text) , password (text) , last_update (time) | store : store_id (number) , manager_staff_id (number) , address_id (number) , last_update (time)

film : title (text) , special_features (text)


Question: How many items in inventory does store 1 have?

actor : actor_id (number) , first_name (text) , last_name (text) , last_update (time) | address : address_id (number) , address (text) , address2 (text) , district (text) , city_id (number) , postal_code (text) , phone (text) , last_update (time) | category : category_id (number) , name (text) , last_update (time) | city : city_id (number) , city (text) , country_id (number) , last_update (time) | country : country_id (number) , country (text) , last_update (time) | customer : customer_id (number) , store_id (number) , first_name (text) , last_name (text) , email (text) , address_id (number) , active (boolean) , create_date (time) , last_update (time) | film : film_id (number) , title (text) , description (text) , release_year (time) , language_id (number) , original_language_id (number) , rental_duration (number) , rental_rate (number) , length (number) , replacement_cost (number) , rating (text) , special_features (text) , last_update (time) | film_actor : actor_id (number) , film_id (number) , last_update (time) | film_category : film_id (number) , category_id (number) , last_update (time) | film_text : film_id (number) , title (text) , description (text) | inventory : inventory_id (number) , film_id (number) , store_id (number) , last_update (time) | language : language_id (number) , name (text) , last_update (time) | payment : payment_id (number) , customer_id (number) , staff_id (number) , rental_id (number) , amount (number) , payment_date (time) , last_update (time) | rental : rental_id (number) , rental_date (time) , inventory_id (number) , customer_id (number) , return_date (time) , staff_id (number) , last_update (time) | staff : staff_id (number) , first_name (text) , last_name (text) , address_id (number) , picture (others) , email (text) , store_id (number) , active (boolean) , username (text) , password (text) , last_update (time) | store : store_id (number) , manager_staff_id (number) , address_id (number) , last_update (time)

inventory : store_id (number) , inventory_id (number)


Question: Count the number of items store 1 has in stock.

actor : actor_id (number) , first_name (text) , last_name (text) , last_update (time) | address : address_id (number) , address (text) , address2 (text) , district (text) , city_id (number) , postal_code (text) , phone (text) , last_update (time) | category : category_id (number) , name (text) , last_update (time) | city : city_id (number) , city (text) , country_id (number) , last_update (time) | country : country_id (number) , country (text) , last_update (time) | customer : customer_id (number) , store_id (number) , first_name (text) , last_name (text) , email (text) , address_id (number) , active (boolean) , create_date (time) , last_update (time) | film : film_id (number) , title (text) , description (text) , release_year (time) , language_id (number) , original_language_id (number) , rental_duration (number) , rental_rate (number) , length (number) , replacement_cost (number) , rating (text) , special_features (text) , last_update (time) | film_actor : actor_id (number) , film_id (number) , last_update (time) | film_category : film_id (number) , category_id (number) , last_update (time) | film_text : film_id (number) , title (text) , description (text) | inventory : inventory_id (number) , film_id (number) , store_id (number) , last_update (time) | language : language_id (number) , name (text) , last_update (time) | payment : payment_id (number) , customer_id (number) , staff_id (number) , rental_id (number) , amount (number) , payment_date (time) , last_update (time) | rental : rental_id (number) , rental_date (time) , inventory_id (number) , customer_id (number) , return_date (time) , staff_id (number) , last_update (time) | staff : staff_id (number) , first_name (text) , last_name (text) , address_id (number) , picture (others) , email (text) , store_id (number) , active (boolean) , username (text) , password (text) , last_update (time) | store : store_id (number) , manager_staff_id (number) , address_id (number) , last_update (time)

inventory : store_id (number) , inventory_id (number)


Question: When did the first payment happen?

actor : actor_id (number) , first_name (text) , last_name (text) , last_update (time) | address : address_id (number) , address (text) , address2 (text) , district (text) , city_id (number) , postal_code (text) , phone (text) , last_update (time) | category : category_id (number) , name (text) , last_update (time) | city : city_id (number) , city (text) , country_id (number) , last_update (time) | country : country_id (number) , country (text) , last_update (time) | customer : customer_id (number) , store_id (number) , first_name (text) , last_name (text) , email (text) , address_id (number) , active (boolean) , create_date (time) , last_update (time) | film : film_id (number) , title (text) , description (text) , release_year (time) , language_id (number) , original_language_id (number) , rental_duration (number) , rental_rate (number) , length (number) , replacement_cost (number) , rating (text) , special_features (text) , last_update (time) | film_actor : actor_id (number) , film_id (number) , last_update (time) | film_category : film_id (number) , category_id (number) , last_update (time) | film_text : film_id (number) , title (text) , description (text) | inventory : inventory_id (number) , film_id (number) , store_id (number) , last_update (time) | language : language_id (number) , name (text) , last_update (time) | payment : payment_id (number) , customer_id (number) , staff_id (number) , rental_id (number) , amount (number) , payment_date (time) , last_update (time) | rental : rental_id (number) , rental_date (time) , inventory_id (number) , customer_id (number) , return_date (time) , staff_id (number) , last_update (time) | staff : staff_id (number) , first_name (text) , last_name (text) , address_id (number) , picture (others) , email (text) , store_id (number) , active (boolean) , username (text) , password (text) , last_update (time) | store : store_id (number) , manager_staff_id (number) , address_id (number) , last_update (time)


Question: What was the date of the earliest payment?

actor : actor_id (number) , first_name (text) , last_name (text) , last_update (time) | address : address_id (number) , address (text) , address2 (text) , district (text) , city_id (number) , postal_code (text) , phone (text) , last_update (time) | category : category_id (number) , name (text) , last_update (time) | city : city_id (number) , city (text) , country_id (number) , last_update (time) | country : country_id (number) , country (text) , last_update (time) | customer : customer_id (number) , store_id (number) , first_name (text) , last_name (text) , email (text) , address_id (number) , active (boolean) , create_date (time) , last_update (time) | film : film_id (number) , title (text) , description (text) , release_year (time) , language_id (number) , original_language_id (number) , rental_duration (number) , rental_rate (number) , length (number) , replacement_cost (number) , rating (text) , special_features (text) , last_update (time) | film_actor : actor_id (number) , film_id (number) , last_update (time) | film_category : film_id (number) , category_id (number) , last_update (time) | film_text : film_id (number) , title (text) , description (text) | inventory : inventory_id (number) , film_id (number) , store_id (number) , last_update (time) | language : language_id (number) , name (text) , last_update (time) | payment : payment_id (number) , customer_id (number) , staff_id (number) , rental_id (number) , amount (number) , payment_date (time) , last_update (time) | rental : rental_id (number) , rental_date (time) , inventory_id (number) , customer_id (number) , return_date (time) , staff_id (number) , last_update (time) | staff : staff_id (number) , first_name (text) , last_name (text) , address_id (number) , picture (others) , email (text) , store_id (number) , active (boolean) , username (text) , password (text) , last_update (time) | store : store_id (number) , manager_staff_id (number) , address_id (number) , last_update (time)


Question: Where does the customer with the first name Linda live? And what is her email?

actor : actor_id (number) , first_name (text) , last_name (text) , last_update (time) | address : address_id (number) , address (text) , address2 (text) , district (text) , city_id (number) , postal_code (text) , phone (text) , last_update (time) | category : category_id (number) , name (text) , last_update (time) | city : city_id (number) , city (text) , country_id (number) , last_update (time) | country : country_id (number) , country (text) , last_update (time) | customer : customer_id (number) , store_id (number) , first_name (text) , last_name (text) , email (text) , address_id (number) , active (boolean) , create_date (time) , last_update (time) | film : film_id (number) , title (text) , description (text) , release_year (time) , language_id (number) , original_language_id (number) , rental_duration (number) , rental_rate (number) , length (number) , replacement_cost (number) , rating (text) , special_features (text) , last_update (time) | film_actor : actor_id (number) , film_id (number) , last_update (time) | film_category : film_id (number) , category_id (number) , last_update (time) | film_text : film_id (number) , title (text) , description (text) | inventory : inventory_id (number) , film_id (number) , store_id (number) , last_update (time) | language : language_id (number) , name (text) , last_update (time) | payment : payment_id (number) , customer_id (number) , staff_id (number) , rental_id (number) , amount (number) , payment_date (time) , last_update (time) | rental : rental_id (number) , rental_date (time) , inventory_id (number) , customer_id (number) , return_date (time) , staff_id (number) , last_update (time) | staff : staff_id (number) , first_name (text) , last_name (text) , address_id (number) , picture (others) , email (text) , store_id (number) , active (boolean) , username (text) , password (text) , last_update (time) | store : store_id (number) , manager_staff_id (number) , address_id (number) , last_update (time)

address : address (text) , address_id (number) | customer : email (text) , address_id (number) , first_name (text)


Question: Return the address and email of the customer with the first name Linda.

actor : actor_id (number) , first_name (text) , last_name (text) , last_update (time) | address : address_id (number) , address (text) , address2 (text) , district (text) , city_id (number) , postal_code (text) , phone (text) , last_update (time) | category : category_id (number) , name (text) , last_update (time) | city : city_id (number) , city (text) , country_id (number) , last_update (time) | country : country_id (number) , country (text) , last_update (time) | customer : customer_id (number) , store_id (number) , first_name (text) , last_name (text) , email (text) , address_id (number) , active (boolean) , create_date (time) , last_update (time) | film : film_id (number) , title (text) , description (text) , release_year (time) , language_id (number) , original_language_id (number) , rental_duration (number) , rental_rate (number) , length (number) , replacement_cost (number) , rating (text) , special_features (text) , last_update (time) | film_actor : actor_id (number) , film_id (number) , last_update (time) | film_category : film_id (number) , category_id (number) , last_update (time) | film_text : film_id (number) , title (text) , description (text) | inventory : inventory_id (number) , film_id (number) , store_id (number) , last_update (time) | language : language_id (number) , name (text) , last_update (time) | payment : payment_id (number) , customer_id (number) , staff_id (number) , rental_id (number) , amount (number) , payment_date (time) , last_update (time) | rental : rental_id (number) , rental_date (time) , inventory_id (number) , customer_id (number) , return_date (time) , staff_id (number) , last_update (time) | staff : staff_id (number) , first_name (text) , last_name (text) , address_id (number) , picture (others) , email (text) , store_id (number) , active (boolean) , username (text) , password (text) , last_update (time) | store : store_id (number) , manager_staff_id (number) , address_id (number) , last_update (time)

address : address (text) , address_id (number) | customer : email (text) , address_id (number) , first_name (text)


Question: Find all the films longer than 100 minutes, or rated PG, except those who cost more than 200 for replacement. List the titles.

actor : actor_id (number) , first_name (text) , last_name (text) , last_update (time) | address : address_id (number) , address (text) , address2 (text) , district (text) , city_id (number) , postal_code (text) , phone (text) , last_update (time) | category : category_id (number) , name (text) , last_update (time) | city : city_id (number) , city (text) , country_id (number) , last_update (time) | country : country_id (number) , country (text) , last_update (time) | customer : customer_id (number) , store_id (number) , first_name (text) , last_name (text) , email (text) , address_id (number) , active (boolean) , create_date (time) , last_update (time) | film : film_id (number) , title (text) , description (text) , release_year (time) , language_id (number) , original_language_id (number) , rental_duration (number) , rental_rate (number) , length (number) , replacement_cost (number) , rating (text) , special_features (text) , last_update (time) | film_actor : actor_id (number) , film_id (number) , last_update (time) | film_category : film_id (number) , category_id (number) , last_update (time) | film_text : film_id (number) , title (text) , description (text) | inventory : inventory_id (number) , film_id (number) , store_id (number) , last_update (time) | language : language_id (number) , name (text) , last_update (time) | payment : payment_id (number) , customer_id (number) , staff_id (number) , rental_id (number) , amount (number) , payment_date (time) , last_update (time) | rental : rental_id (number) , rental_date (time) , inventory_id (number) , customer_id (number) , return_date (time) , staff_id (number) , last_update (time) | staff : staff_id (number) , first_name (text) , last_name (text) , address_id (number) , picture (others) , email (text) , store_id (number) , active (boolean) , username (text) , password (text) , last_update (time) | store : store_id (number) , manager_staff_id (number) , address_id (number) , last_update (time)

film : title (text) , length (number) , rating (text) , replacement_cost (number)


Question: 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?

actor : actor_id (number) , first_name (text) , last_name (text) , last_update (time) | address : address_id (number) , address (text) , address2 (text) , district (text) , city_id (number) , postal_code (text) , phone (text) , last_update (time) | category : category_id (number) , name (text) , last_update (time) | city : city_id (number) , city (text) , country_id (number) , last_update (time) | country : country_id (number) , country (text) , last_update (time) | customer : customer_id (number) , store_id (number) , first_name (text) , last_name (text) , email (text) , address_id (number) , active (boolean) , create_date (time) , last_update (time) | film : film_id (number) , title (text) , description (text) , release_year (time) , language_id (number) , original_language_id (number) , rental_duration (number) , rental_rate (number) , length (number) , replacement_cost (number) , rating (text) , special_features (text) , last_update (time) | film_actor : actor_id (number) , film_id (number) , last_update (time) | film_category : film_id (number) , category_id (number) , last_update (time) | film_text : film_id (number) , title (text) , description (text) | inventory : inventory_id (number) , film_id (number) , store_id (number) , last_update (time) | language : language_id (number) , name (text) , last_update (time) | payment : payment_id (number) , customer_id (number) , staff_id (number) , rental_id (number) , amount (number) , payment_date (time) , last_update (time) | rental : rental_id (number) , rental_date (time) , inventory_id (number) , customer_id (number) , return_date (time) , staff_id (number) , last_update (time) | staff : staff_id (number) , first_name (text) , last_name (text) , address_id (number) , picture (others) , email (text) , store_id (number) , active (boolean) , username (text) , password (text) , last_update (time) | store : store_id (number) , manager_staff_id (number) , address_id (number) , last_update (time)

film : title (text) , length (number) , rating (text) , replacement_cost (number)


Question: What is the first name and the last name of the customer who made the earliest rental?

actor : actor_id (number) , first_name (text) , last_name (text) , last_update (time) | address : address_id (number) , address (text) , address2 (text) , district (text) , city_id (number) , postal_code (text) , phone (text) , last_update (time) | category : category_id (number) , name (text) , last_update (time) | city : city_id (number) , city (text) , country_id (number) , last_update (time) | country : country_id (number) , country (text) , last_update (time) | customer : customer_id (number) , store_id (number) , first_name (text) , last_name (text) , email (text) , address_id (number) , active (boolean) , create_date (time) , last_update (time) | film : film_id (number) , title (text) , description (text) , release_year (time) , language_id (number) , original_language_id (number) , rental_duration (number) , rental_rate (number) , length (number) , replacement_cost (number) , rating (text) , special_features (text) , last_update (time) | film_actor : actor_id (number) , film_id (number) , last_update (time) | film_category : film_id (number) , category_id (number) , last_update (time) | film_text : film_id (number) , title (text) , description (text) | inventory : inventory_id (number) , film_id (number) , store_id (number) , last_update (time) | language : language_id (number) , name (text) , last_update (time) | payment : payment_id (number) , customer_id (number) , staff_id (number) , rental_id (number) , amount (number) , payment_date (time) , last_update (time) | rental : rental_id (number) , rental_date (time) , inventory_id (number) , customer_id (number) , return_date (time) , staff_id (number) , last_update (time) | staff : staff_id (number) , first_name (text) , last_name (text) , address_id (number) , picture (others) , email (text) , store_id (number) , active (boolean) , username (text) , password (text) , last_update (time) | store : store_id (number) , manager_staff_id (number) , address_id (number) , last_update (time)

customer : first_name (text) , last_name (text) , customer_id (number) | rental : customer_id (number) , rental_date (time)


Question: Return the full name of the customer who made the first rental.

actor : actor_id (number) , first_name (text) , last_name (text) , last_update (time) | address : address_id (number) , address (text) , address2 (text) , district (text) , city_id (number) , postal_code (text) , phone (text) , last_update (time) | category : category_id (number) , name (text) , last_update (time) | city : city_id (number) , city (text) , country_id (number) , last_update (time) | country : country_id (number) , country (text) , last_update (time) | customer : customer_id (number) , store_id (number) , first_name (text) , last_name (text) , email (text) , address_id (number) , active (boolean) , create_date (time) , last_update (time) | film : film_id (number) , title (text) , description (text) , release_year (time) , language_id (number) , original_language_id (number) , rental_duration (number) , rental_rate (number) , length (number) , replacement_cost (number) , rating (text) , special_features (text) , last_update (time) | film_actor : actor_id (number) , film_id (number) , last_update (time) | film_category : film_id (number) , category_id (number) , last_update (time) | film_text : film_id (number) , title (text) , description (text) | inventory : inventory_id (number) , film_id (number) , store_id (number) , last_update (time) | language : language_id (number) , name (text) , last_update (time) | payment : payment_id (number) , customer_id (number) , staff_id (number) , rental_id (number) , amount (number) , payment_date (time) , last_update (time) | rental : rental_id (number) , rental_date (time) , inventory_id (number) , customer_id (number) , return_date (time) , staff_id (number) , last_update (time) | staff : staff_id (number) , first_name (text) , last_name (text) , address_id (number) , picture (others) , email (text) , store_id (number) , active (boolean) , username (text) , password (text) , last_update (time) | store : store_id (number) , manager_staff_id (number) , address_id (number) , last_update (time)

customer : first_name (text) , last_name (text) , customer_id (number) | rental : customer_id (number) , rental_date (time)


Question: 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?

actor : actor_id (number) , first_name (text) , last_name (text) , last_update (time) | address : address_id (number) , address (text) , address2 (text) , district (text) , city_id (number) , postal_code (text) , phone (text) , last_update (time) | category : category_id (number) , name (text) , last_update (time) | city : city_id (number) , city (text) , country_id (number) , last_update (time) | country : country_id (number) , country (text) , last_update (time) | customer : customer_id (number) , store_id (number) , first_name (text) , last_name (text) , email (text) , address_id (number) , active (boolean) , create_date (time) , last_update (time) | film : film_id (number) , title (text) , description (text) , release_year (time) , language_id (number) , original_language_id (number) , rental_duration (number) , rental_rate (number) , length (number) , replacement_cost (number) , rating (text) , special_features (text) , last_update (time) | film_actor : actor_id (number) , film_id (number) , last_update (time) | film_category : film_id (number) , category_id (number) , last_update (time) | film_text : film_id (number) , title (text) , description (text) | inventory : inventory_id (number) , film_id (number) , store_id (number) , last_update (time) | language : language_id (number) , name (text) , last_update (time) | payment : payment_id (number) , customer_id (number) , staff_id (number) , rental_id (number) , amount (number) , payment_date (time) , last_update (time) | rental : rental_id (number) , rental_date (time) , inventory_id (number) , customer_id (number) , return_date (time) , staff_id (number) , last_update (time) | staff : staff_id (number) , first_name (text) , last_name (text) , address_id (number) , picture (others) , email (text) , store_id (number) , active (boolean) , username (text) , password (text) , last_update (time) | store : store_id (number) , manager_staff_id (number) , address_id (number) , last_update (time)

customer : first_name (text) , last_name (text) , customer_id (number) | staff : first_name (text) , last_name (text) , staff_id (number) | rental : staff_id (number) , customer_id (number)


Question: 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.

actor : actor_id (number) , first_name (text) , last_name (text) , last_update (time) | address : address_id (number) , address (text) , address2 (text) , district (text) , city_id (number) , postal_code (text) , phone (text) , last_update (time) | category : category_id (number) , name (text) , last_update (time) | city : city_id (number) , city (text) , country_id (number) , last_update (time) | country : country_id (number) , country (text) , last_update (time) | customer : customer_id (number) , store_id (number) , first_name (text) , last_name (text) , email (text) , address_id (number) , active (boolean) , create_date (time) , last_update (time) | film : film_id (number) , title (text) , description (text) , release_year (time) , language_id (number) , original_language_id (number) , rental_duration (number) , rental_rate (number) , length (number) , replacement_cost (number) , rating (text) , special_features (text) , last_update (time) | film_actor : actor_id (number) , film_id (number) , last_update (time) | film_category : film_id (number) , category_id (number) , last_update (time) | film_text : film_id (number) , title (text) , description (text) | inventory : inventory_id (number) , film_id (number) , store_id (number) , last_update (time) | language : language_id (number) , name (text) , last_update (time) | payment : payment_id (number) , customer_id (number) , staff_id (number) , rental_id (number) , amount (number) , payment_date (time) , last_update (time) | rental : rental_id (number) , rental_date (time) , inventory_id (number) , customer_id (number) , return_date (time) , staff_id (number) , last_update (time) | staff : staff_id (number) , first_name (text) , last_name (text) , address_id (number) , picture (others) , email (text) , store_id (number) , active (boolean) , username (text) , password (text) , last_update (time) | store : store_id (number) , manager_staff_id (number) , address_id (number) , last_update (time)

customer : first_name (text) , last_name (text) , customer_id (number) | staff : first_name (text) , last_name (text) , staff_id (number) | rental : staff_id (number) , customer_id (number)


Question: Which store has most the customers?

actor : actor_id (number) , first_name (text) , last_name (text) , last_update (time) | address : address_id (number) , address (text) , address2 (text) , district (text) , city_id (number) , postal_code (text) , phone (text) , last_update (time) | category : category_id (number) , name (text) , last_update (time) | city : city_id (number) , city (text) , country_id (number) , last_update (time) | country : country_id (number) , country (text) , last_update (time) | customer : customer_id (number) , store_id (number) , first_name (text) , last_name (text) , email (text) , address_id (number) , active (boolean) , create_date (time) , last_update (time) | film : film_id (number) , title (text) , description (text) , release_year (time) , language_id (number) , original_language_id (number) , rental_duration (number) , rental_rate (number) , length (number) , replacement_cost (number) , rating (text) , special_features (text) , last_update (time) | film_actor : actor_id (number) , film_id (number) , last_update (time) | film_category : film_id (number) , category_id (number) , last_update (time) | film_text : film_id (number) , title (text) , description (text) | inventory : inventory_id (number) , film_id (number) , store_id (number) , last_update (time) | language : language_id (number) , name (text) , last_update (time) | payment : payment_id (number) , customer_id (number) , staff_id (number) , rental_id (number) , amount (number) , payment_date (time) , last_update (time) | rental : rental_id (number) , rental_date (time) , inventory_id (number) , customer_id (number) , return_date (time) , staff_id (number) , last_update (time) | staff : staff_id (number) , first_name (text) , last_name (text) , address_id (number) , picture (others) , email (text) , store_id (number) , active (boolean) , username (text) , password (text) , last_update (time) | store : store_id (number) , manager_staff_id (number) , address_id (number) , last_update (time)

customer : store_id (number) , customer_id (number)


Question: Return the id of the store with the most customers.

actor : actor_id (number) , first_name (text) , last_name (text) , last_update (time) | address : address_id (number) , address (text) , address2 (text) , district (text) , city_id (number) , postal_code (text) , phone (text) , last_update (time) | category : category_id (number) , name (text) , last_update (time) | city : city_id (number) , city (text) , country_id (number) , last_update (time) | country : country_id (number) , country (text) , last_update (time) | customer : customer_id (number) , store_id (number) , first_name (text) , last_name (text) , email (text) , address_id (number) , active (boolean) , create_date (time) , last_update (time) | film : film_id (number) , title (text) , description (text) , release_year (time) , language_id (number) , original_language_id (number) , rental_duration (number) , rental_rate (number) , length (number) , replacement_cost (number) , rating (text) , special_features (text) , last_update (time) | film_actor : actor_id (number) , film_id (number) , last_update (time) | film_category : film_id (number) , category_id (number) , last_update (time) | film_text : film_id (number) , title (text) , description (text) | inventory : inventory_id (number) , film_id (number) , store_id (number) , last_update (time) | language : language_id (number) , name (text) , last_update (time) | payment : payment_id (number) , customer_id (number) , staff_id (number) , rental_id (number) , amount (number) , payment_date (time) , last_update (time) | rental : rental_id (number) , rental_date (time) , inventory_id (number) , customer_id (number) , return_date (time) , staff_id (number) , last_update (time) | staff : staff_id (number) , first_name (text) , last_name (text) , address_id (number) , picture (others) , email (text) , store_id (number) , active (boolean) , username (text) , password (text) , last_update (time) | store : store_id (number) , manager_staff_id (number) , address_id (number) , last_update (time)

customer : store_id (number) , customer_id (number)


Question: What is the largest payment amount?

actor : actor_id (number) , first_name (text) , last_name (text) , last_update (time) | address : address_id (number) , address (text) , address2 (text) , district (text) , city_id (number) , postal_code (text) , phone (text) , last_update (time) | category : category_id (number) , name (text) , last_update (time) | city : city_id (number) , city (text) , country_id (number) , last_update (time) | country : country_id (number) , country (text) , last_update (time) | customer : customer_id (number) , store_id (number) , first_name (text) , last_name (text) , email (text) , address_id (number) , active (boolean) , create_date (time) , last_update (time) | film : film_id (number) , title (text) , description (text) , release_year (time) , language_id (number) , original_language_id (number) , rental_duration (number) , rental_rate (number) , length (number) , replacement_cost (number) , rating (text) , special_features (text) , last_update (time) | film_actor : actor_id (number) , film_id (number) , last_update (time) | film_category : film_id (number) , category_id (number) , last_update (time) | film_text : film_id (number) , title (text) , description (text) | inventory : inventory_id (number) , film_id (number) , store_id (number) , last_update (time) | language : language_id (number) , name (text) , last_update (time) | payment : payment_id (number) , customer_id (number) , staff_id (number) , rental_id (number) , amount (number) , payment_date (time) , last_update (time) | rental : rental_id (number) , rental_date (time) , inventory_id (number) , customer_id (number) , return_date (time) , staff_id (number) , last_update (time) | staff : staff_id (number) , first_name (text) , last_name (text) , address_id (number) , picture (others) , email (text) , store_id (number) , active (boolean) , username (text) , password (text) , last_update (time) | store : store_id (number) , manager_staff_id (number) , address_id (number) , last_update (time)


Question: Return the amount of the largest payment.

actor : actor_id (number) , first_name (text) , last_name (text) , last_update (time) | address : address_id (number) , address (text) , address2 (text) , district (text) , city_id (number) , postal_code (text) , phone (text) , last_update (time) | category : category_id (number) , name (text) , last_update (time) | city : city_id (number) , city (text) , country_id (number) , last_update (time) | country : country_id (number) , country (text) , last_update (time) | customer : customer_id (number) , store_id (number) , first_name (text) , last_name (text) , email (text) , address_id (number) , active (boolean) , create_date (time) , last_update (time) | film : film_id (number) , title (text) , description (text) , release_year (time) , language_id (number) , original_language_id (number) , rental_duration (number) , rental_rate (number) , length (number) , replacement_cost (number) , rating (text) , special_features (text) , last_update (time) | film_actor : actor_id (number) , film_id (number) , last_update (time) | film_category : film_id (number) , category_id (number) , last_update (time) | film_text : film_id (number) , title (text) , description (text) | inventory : inventory_id (number) , film_id (number) , store_id (number) , last_update (time) | language : language_id (number) , name (text) , last_update (time) | payment : payment_id (number) , customer_id (number) , staff_id (number) , rental_id (number) , amount (number) , payment_date (time) , last_update (time) | rental : rental_id (number) , rental_date (time) , inventory_id (number) , customer_id (number) , return_date (time) , staff_id (number) , last_update (time) | staff : staff_id (number) , first_name (text) , last_name (text) , address_id (number) , picture (others) , email (text) , store_id (number) , active (boolean) , username (text) , password (text) , last_update (time) | store : store_id (number) , manager_staff_id (number) , address_id (number) , last_update (time)


Question: Where does the staff member with the first name Elsa live?

actor : actor_id (number) , first_name (text) , last_name (text) , last_update (time) | address : address_id (number) , address (text) , address2 (text) , district (text) , city_id (number) , postal_code (text) , phone (text) , last_update (time) | category : category_id (number) , name (text) , last_update (time) | city : city_id (number) , city (text) , country_id (number) , last_update (time) | country : country_id (number) , country (text) , last_update (time) | customer : customer_id (number) , store_id (number) , first_name (text) , last_name (text) , email (text) , address_id (number) , active (boolean) , create_date (time) , last_update (time) | film : film_id (number) , title (text) , description (text) , release_year (time) , language_id (number) , original_language_id (number) , rental_duration (number) , rental_rate (number) , length (number) , replacement_cost (number) , rating (text) , special_features (text) , last_update (time) | film_actor : actor_id (number) , film_id (number) , last_update (time) | film_category : film_id (number) , category_id (number) , last_update (time) | film_text : film_id (number) , title (text) , description (text) | inventory : inventory_id (number) , film_id (number) , store_id (number) , last_update (time) | language : language_id (number) , name (text) , last_update (time) | payment : payment_id (number) , customer_id (number) , staff_id (number) , rental_id (number) , amount (number) , payment_date (time) , last_update (time) | rental : rental_id (number) , rental_date (time) , inventory_id (number) , customer_id (number) , return_date (time) , staff_id (number) , last_update (time) | staff : staff_id (number) , first_name (text) , last_name (text) , address_id (number) , picture (others) , email (text) , store_id (number) , active (boolean) , username (text) , password (text) , last_update (time) | store : store_id (number) , manager_staff_id (number) , address_id (number) , last_update (time)

address : address (text) , address_id (number) | staff : address_id (number) , first_name (text)


Question: Give the address of the staff member who has the first name Elsa.

actor : actor_id (number) , first_name (text) , last_name (text) , last_update (time) | address : address_id (number) , address (text) , address2 (text) , district (text) , city_id (number) , postal_code (text) , phone (text) , last_update (time) | category : category_id (number) , name (text) , last_update (time) | city : city_id (number) , city (text) , country_id (number) , last_update (time) | country : country_id (number) , country (text) , last_update (time) | customer : customer_id (number) , store_id (number) , first_name (text) , last_name (text) , email (text) , address_id (number) , active (boolean) , create_date (time) , last_update (time) | film : film_id (number) , title (text) , description (text) , release_year (time) , language_id (number) , original_language_id (number) , rental_duration (number) , rental_rate (number) , length (number) , replacement_cost (number) , rating (text) , special_features (text) , last_update (time) | film_actor : actor_id (number) , film_id (number) , last_update (time) | film_category : film_id (number) , category_id (number) , last_update (time) | film_text : film_id (number) , title (text) , description (text) | inventory : inventory_id (number) , film_id (number) , store_id (number) , last_update (time) | language : language_id (number) , name (text) , last_update (time) | payment : payment_id (number) , customer_id (number) , staff_id (number) , rental_id (number) , amount (number) , payment_date (time) , last_update (time) | rental : rental_id (number) , rental_date (time) , inventory_id (number) , customer_id (number) , return_date (time) , staff_id (number) , last_update (time) | staff : staff_id (number) , first_name (text) , last_name (text) , address_id (number) , picture (others) , email (text) , store_id (number) , active (boolean) , username (text) , password (text) , last_update (time) | store : store_id (number) , manager_staff_id (number) , address_id (number) , last_update (time)

address : address (text) , address_id (number) | staff : address_id (number) , first_name (text)


Question: What are the first names of customers who have not rented any films after '2005-08-23 02:06:01'?

actor : actor_id (number) , first_name (text) , last_name (text) , last_update (time) | address : address_id (number) , address (text) , address2 (text) , district (text) , city_id (number) , postal_code (text) , phone (text) , last_update (time) | category : category_id (number) , name (text) , last_update (time) | city : city_id (number) , city (text) , country_id (number) , last_update (time) | country : country_id (number) , country (text) , last_update (time) | customer : customer_id (number) , store_id (number) , first_name (text) , last_name (text) , email (text) , address_id (number) , active (boolean) , create_date (time) , last_update (time) | film : film_id (number) , title (text) , description (text) , release_year (time) , language_id (number) , original_language_id (number) , rental_duration (number) , rental_rate (number) , length (number) , replacement_cost (number) , rating (text) , special_features (text) , last_update (time) | film_actor : actor_id (number) , film_id (number) , last_update (time) | film_category : film_id (number) , category_id (number) , last_update (time) | film_text : film_id (number) , title (text) , description (text) | inventory : inventory_id (number) , film_id (number) , store_id (number) , last_update (time) | language : language_id (number) , name (text) , last_update (time) | payment : payment_id (number) , customer_id (number) , staff_id (number) , rental_id (number) , amount (number) , payment_date (time) , last_update (time) | rental : rental_id (number) , rental_date (time) , inventory_id (number) , customer_id (number) , return_date (time) , staff_id (number) , last_update (time) | staff : staff_id (number) , first_name (text) , last_name (text) , address_id (number) , picture (others) , email (text) , store_id (number) , active (boolean) , username (text) , password (text) , last_update (time) | store : store_id (number) , manager_staff_id (number) , address_id (number) , last_update (time)

customer : first_name (text) , customer_id (number) | rental : customer_id (number) , rental_date (time)


Question: Return the first names of customers who did not rented a film after the date '2005-08-23 02:06:01'.

actor : actor_id (number) , first_name (text) , last_name (text) , last_update (time) | address : address_id (number) , address (text) , address2 (text) , district (text) , city_id (number) , postal_code (text) , phone (text) , last_update (time) | category : category_id (number) , name (text) , last_update (time) | city : city_id (number) , city (text) , country_id (number) , last_update (time) | country : country_id (number) , country (text) , last_update (time) | customer : customer_id (number) , store_id (number) , first_name (text) , last_name (text) , email (text) , address_id (number) , active (boolean) , create_date (time) , last_update (time) | film : film_id (number) , title (text) , description (text) , release_year (time) , language_id (number) , original_language_id (number) , rental_duration (number) , rental_rate (number) , length (number) , replacement_cost (number) , rating (text) , special_features (text) , last_update (time) | film_actor : actor_id (number) , film_id (number) , last_update (time) | film_category : film_id (number) , category_id (number) , last_update (time) | film_text : film_id (number) , title (text) , description (text) | inventory : inventory_id (number) , film_id (number) , store_id (number) , last_update (time) | language : language_id (number) , name (text) , last_update (time) | payment : payment_id (number) , customer_id (number) , staff_id (number) , rental_id (number) , amount (number) , payment_date (time) , last_update (time) | rental : rental_id (number) , rental_date (time) , inventory_id (number) , customer_id (number) , return_date (time) , staff_id (number) , last_update (time) | staff : staff_id (number) , first_name (text) , last_name (text) , address_id (number) , picture (others) , email (text) , store_id (number) , active (boolean) , username (text) , password (text) , last_update (time) | store : store_id (number) , manager_staff_id (number) , address_id (number) , last_update (time)

customer : first_name (text) , customer_id (number) | rental : customer_id (number) , rental_date (time)


Question: How many bank branches are there?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)


Question: Count the number of bank branches.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)


Question: How many customers are there?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)


Question: What is the total number of customers across banks?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)


Question: Find the number of customers in the banks at New York City.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

bank : no_of_customers (number) , city (text)


Question: What is the total number of customers who use banks in New York City?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

bank : no_of_customers (number) , city (text)


Question: Find the average number of customers in all banks of Utah state.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

bank : no_of_customers (number) , state (text)


Question: What is the average number of customers across banks in the state of Utah?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

bank : no_of_customers (number) , state (text)


Question: Find the average number of customers cross all banks.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)


Question: What is the average number of bank customers?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)


Question: Find the city and state of the bank branch named morningside.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

bank : city (text) , state (text) , bname (text)


Question: What city and state is the bank with the name morningside in?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

bank : city (text) , state (text) , bname (text)


Question: Find the branch names of banks in the New York state.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)


Question: What are the names of banks in the state of New York?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)


Question: List the name of all customers sorted by their account balance in ascending order.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : cust_name (text) , acc_bal (number)


Question: What are the names of all customers, ordered by account balance?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : cust_name (text) , acc_bal (number)


Question: List the name of all different customers who have some loan sorted by their total loan amount.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : cust_name (text) , cust_id (text) | loan : cust_id (text) , amount (number)


Question: What are the names of the different customers who have taken out a loan, ordered by the total amount that they have taken?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : cust_name (text) , cust_id (text) | loan : cust_id (text) , amount (number)


Question: Find the state, account type, and credit score of the customer whose number of loan is 0.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : state (text) , acc_type (text) , credit_score (number) , no_of_loans (number)


Question: What are the states, account types, and credit scores for customers who have 0 loans?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : state (text) , acc_type (text) , credit_score (number) , no_of_loans (number)


Question: Find the number of different cities which banks are located at.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)


Question: In how many different cities are banks located?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)


Question: Find the number of different states which banks are located at.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)


Question: In how many different states are banks located?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)


Question: How many distinct types of accounts are there?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)


Question: Count the number of different account types.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)


Question: Find the name and account balance of the customer whose name includes the letter ‘a’.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : cust_name (text) , acc_bal (number)


Question: What are the names and account balances of customers with the letter a in their names?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : cust_name (text) , acc_bal (number)


Question: Find the total account balance of each customer from Utah or Texas.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : acc_bal (number) , state (text)


Question: What are the total account balances for each customer from Utah or Texas?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : acc_bal (number) , state (text)


Question: Find the name of customers who have both saving and checking account types.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : cust_name (text) , acc_type (text)


Question: What are the names of customers who have both savings and checking accounts?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : cust_name (text) , acc_type (text)


Question: Find the name of customers who do not have an saving account.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : cust_name (text) , acc_type (text)


Question: What are the names of customers who do not have saving accounts?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : cust_name (text) , acc_type (text)


Question: Find the name of customers who do not have a loan with a type of Mortgages.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : cust_name (text) , cust_id (text) | loan : cust_id (text) , loan_type (text)


Question: What are the names of customers who have not taken a Mortage loan?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : cust_name (text) , cust_id (text) | loan : cust_id (text) , loan_type (text)


Question: Find the name of customers who have loans of both Mortgages and Auto.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : cust_name (text) , cust_id (text) | loan : cust_id (text) , loan_type (text)


Question: What are the names of customers who have taken both Mortgage and Auto loans?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : cust_name (text) , cust_id (text) | loan : cust_id (text) , loan_type (text)


Question: Find the name of customers whose credit score is below the average credit scores of all customers.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : cust_name (text) , credit_score (number)


Question: What are the names of customers with credit score less than the average credit score across customers?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : cust_name (text) , credit_score (number)


Question: Find the branch name of the bank that has the most number of customers.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

bank : bname (text) , no_of_customers (number)


Question: What is the name of the bank branch with the greatest number of customers?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

bank : bname (text) , no_of_customers (number)


Question: Find the name of customer who has the lowest credit score.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : cust_name (text) , credit_score (number)


Question: What is the name of the customer with the worst credit score?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : cust_name (text) , credit_score (number)


Question: Find the name, account type, and account balance of the customer who has the highest credit score.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : cust_name (text) , acc_type (text) , acc_bal (number) , credit_score (number)


Question: What is the name, account type, and account balance corresponding to the customer with the highest credit score?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : cust_name (text) , acc_type (text) , acc_bal (number) , credit_score (number)


Question: Find the name of customer who has the highest amount of loans.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : cust_name (text) , cust_id (text) | loan : cust_id (text) , amount (number)


Question: What is the name of the customer who has greatest total loan amount?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : cust_name (text) , cust_id (text) | loan : cust_id (text) , amount (number)


Question: Find the state which has the most number of customers.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

bank : state (text) , no_of_customers (number)


Question: Which state has the greatest total number of bank customers?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

bank : state (text) , no_of_customers (number)


Question: For each account type, find the average account balance of customers with credit score lower than 50.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : acc_bal (number) , acc_type (text) , credit_score (number)


Question: What is the average account balance of customers with credit score below 50 for the different account types?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : acc_bal (number) , acc_type (text) , credit_score (number)


Question: For each state, find the total account balance of customers whose credit score is above 100.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : acc_bal (number) , state (text) , credit_score (number)


Question: What is the total account balance for customers with a credit score of above 100 for the different states?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : acc_bal (number) , state (text) , credit_score (number)


Question: Find the total amount of loans offered by each bank branch.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

loan : amount (number) , branch_id (text) | bank : bname (text) , branch_id (number)


Question: What are the names of the different bank branches, and what are their total loan amounts?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

loan : amount (number) , branch_id (text) | bank : bname (text) , branch_id (number)


Question: Find the name of customers who have more than one loan.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : cust_name (text) , cust_id (text) | loan : cust_id (text) , loan_id (text)


Question: What are the names of customers who have taken out more than one loan?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : cust_name (text) , cust_id (text) | loan : cust_id (text) , loan_id (text)


Question: Find the name and account balance of the customers who have loans with a total amount of more than 5000.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : cust_name (text) , acc_type (text) , cust_id (text) | loan : cust_id (text) , amount (number)


Question: What are the names and account balances for customers who have taken a total amount of more than 5000 in loans?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : cust_name (text) , acc_type (text) , cust_id (text) | loan : cust_id (text) , amount (number)


Question: Find the name of bank branch that provided the greatest total amount of loans.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

bank : bname (text) , branch_id (number) | loan : branch_id (text) , amount (number)


Question: What is the name of the bank branch that has lent the greatest amount?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

bank : bname (text) , branch_id (number) | loan : branch_id (text) , amount (number)


Question: Find the name of bank branch that provided the greatest total amount of loans to customers with credit score is less than 100.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

bank : bname (text) , branch_id (number) | customer : branch_id (number) , cust_id (text) , credit_score (number) | loan : branch_id (text) , cust_id (text) , amount (number)


Question: What is the name of the bank branch that has lended the largest total amount in loans, specifically to customers with credit scores below 100?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

bank : bname (text) , branch_id (number) | customer : branch_id (number) , cust_id (text) , credit_score (number) | loan : branch_id (text) , cust_id (text) , amount (number)


Question: Find the name of bank branches that provided some loans.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

bank : bname (text) , branch_id (number) | loan : branch_id (text)


Question: What are the names of the different banks that have provided loans?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

bank : bname (text) , branch_id (number) | loan : branch_id (text)


Question: Find the name and credit score of the customers who have some loans.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : cust_name (text) , credit_score (number) , cust_id (text) | loan : cust_id (text)


Question: What are the different names and credit scores of customers who have taken a loan?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : cust_name (text) , credit_score (number) , cust_id (text) | loan : cust_id (text)


Question: Find the the name of the customers who have a loan with amount more than 3000.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : cust_name (text) , cust_id (text) | loan : cust_id (text) , amount (number)


Question: What are the names of customers who have a loan of more than 3000 in amount?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : cust_name (text) , cust_id (text) | loan : cust_id (text) , amount (number)


Question: Find the city and name of bank branches that provide business loans.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

bank : bname (text) , city (text) , branch_id (number) | loan : branch_id (text) , loan_type (text)


Question: What are the names and cities of bank branches that offer loans for business?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

bank : bname (text) , city (text) , branch_id (number) | loan : branch_id (text) , loan_type (text)


Question: Find the names of bank branches that have provided a loan to any customer whose credit score is below 100.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

bank : bname (text) , branch_id (number) | customer : branch_id (number) , cust_id (text) , credit_score (number) | loan : branch_id (text) , cust_id (text)


Question: What are the names of banks that have loaned money to customers with credit scores below 100?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

bank : bname (text) , branch_id (number) | customer : branch_id (number) , cust_id (text) , credit_score (number) | loan : branch_id (text) , cust_id (text)


Question: Find the total amount of loans provided by bank branches in the state of New York.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

loan : amount (number) , branch_id (text) | bank : branch_id (number) , state (text)


Question: What is the total amount of money loaned by banks in New York state?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

loan : amount (number) , branch_id (text) | bank : branch_id (number) , state (text)


Question: Find the average credit score of the customers who have some loan.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : credit_score (number) , cust_id (text) | loan : cust_id (text)


Question: What is the average credit score for customers who have taken a loan?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : credit_score (number) , cust_id (text) | loan : cust_id (text)


Question: Find the average credit score of the customers who do not have any loan.

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : credit_score (number) , cust_id (text) | loan : cust_id (text)


Question: What is the average credit score for customers who have never taken a loan?

bank : branch_id (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_id (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_id (number) , state (text) | loan : loan_id (text) , loan_type (text) , cust_id (text) , branch_id (text) , amount (number)

customer : credit_score (number) , cust_id (text) | loan : cust_id (text)


Question: What are the dates of the assessment notes?

ref_address_types : address_type_code (text) , address_type_description (text) | ref_detention_type : detention_type_code (text) , detention_type_description (text) | ref_incident_type : incident_type_code (text) , incident_type_description (text) | addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | students : student_id (number) , address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , date_first_rental (time) , date_left_university (time) , other_student_details (text) | teachers : teacher_id (number) , address_id (number) , first_name (text) , middle_name (text) , last_name (text) , gender (text) , cell_mobile_number (text) , email_address (text) , other_details (text) | assessment_notes : notes_id (number) , student_id (number) , teacher_id (number) , date_of_notes (time) , text_of_notes (text) , other_details (text) | behavior_incident : incident_id (number) , incident_type_code (text) , student_id (number) , date_incident_start (time) , date_incident_end (time) , incident_summary (text) , recommendations (text) , other_details (text) | detention : detention_id (number) , detention_type_code (text) , teacher_id (number) , datetime_detention_start (time) , datetime_detention_end (time) , detention_summary (text) , other_details (text) | student_addresses : student_id (number) , address_id (number) , date_address_from (time) , date_address_to (time) , monthly_rental (number) , other_details (text) | students_in_detention : student_id (number) , detention_id (number) , incident_id (number)


Question: How many addresses have zip code 197?

ref_address_types : address_type_code (text) , address_type_description (text) | ref_detention_type : detention_type_code (text) , detention_type_description (text) | ref_incident_type : incident_type_code (text) , incident_type_description (text) | addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | students : student_id (number) , address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , date_first_rental (time) , date_left_university (time) , other_student_details (text) | teachers : teacher_id (number) , address_id (number) , first_name (text) , middle_name (text) , last_name (text) , gender (text) , cell_mobile_number (text) , email_address (text) , other_details (text) | assessment_notes : notes_id (number) , student_id (number) , teacher_id (number) , date_of_notes (time) , text_of_notes (text) , other_details (text) | behavior_incident : incident_id (number) , incident_type_code (text) , student_id (number) , date_incident_start (time) , date_incident_end (time) , incident_summary (text) , recommendations (text) , other_details (text) | detention : detention_id (number) , detention_type_code (text) , teacher_id (number) , datetime_detention_start (time) , datetime_detention_end (time) , detention_summary (text) , other_details (text) | student_addresses : student_id (number) , address_id (number) , date_address_from (time) , date_address_to (time) , monthly_rental (number) , other_details (text) | students_in_detention : student_id (number) , detention_id (number) , incident_id (number)

addresses : zip_postcode (text) , address_id (number)


Question: How many distinct incident type codes are there?

ref_address_types : address_type_code (text) , address_type_description (text) | ref_detention_type : detention_type_code (text) , detention_type_description (text) | ref_incident_type : incident_type_code (text) , incident_type_description (text) | addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | students : student_id (number) , address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , date_first_rental (time) , date_left_university (time) , other_student_details (text) | teachers : teacher_id (number) , address_id (number) , first_name (text) , middle_name (text) , last_name (text) , gender (text) , cell_mobile_number (text) , email_address (text) , other_details (text) | assessment_notes : notes_id (number) , student_id (number) , teacher_id (number) , date_of_notes (time) , text_of_notes (text) , other_details (text) | behavior_incident : incident_id (number) , incident_type_code (text) , student_id (number) , date_incident_start (time) , date_incident_end (time) , incident_summary (text) , recommendations (text) , other_details (text) | detention : detention_id (number) , detention_type_code (text) , teacher_id (number) , datetime_detention_start (time) , datetime_detention_end (time) , detention_summary (text) , other_details (text) | student_addresses : student_id (number) , address_id (number) , date_address_from (time) , date_address_to (time) , monthly_rental (number) , other_details (text) | students_in_detention : student_id (number) , detention_id (number) , incident_id (number)

behavior_incident : incident_type_code (text)


Question: Return all distinct detention type codes.

ref_address_types : address_type_code (text) , address_type_description (text) | ref_detention_type : detention_type_code (text) , detention_type_description (text) | ref_incident_type : incident_type_code (text) , incident_type_description (text) | addresses : address_id (number) , line_1 (text) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | students : student_id (number) , address_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , date_first_rental (time) , date_left_university (time) , other_student_details (text) | teachers : teacher_id (number) , address_id (number) , first_name (text) , middle_name (text) , last_name (text) , gender (text) , cell_mobile_number (text) , email_address (text) , other_details (text) | assessment_notes : notes_id (number) , student_id (number) , teacher_id (number) , date_of_notes (time) , text_of_notes (text) , other_details (text) | behavior_incident : incident_id (number) , incident_type_code (text) , student_id (number) , date_incident_start (time) , date_incident_end (time) , incident_summary (text) , recommendations (text) , other_details (text) | detention : detention_id (number) , detention_type_code (text) , teacher_id (number) , datetime_detention_start (time) , datetime_detention_end (time) , detention_summary (text) , other_details (text) | student_addresses : student_id (number) , address_id (number) , date_address_from (time) , date_address_to (time) , monthly_rental (number) , other_details (text) | students_in_detention : student_id (number) , detention_id (number) , incident_id (number)