Question: Show the transaction types and the total amount of transactions.

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

financial_transactions : transaction_type (text) , transaction_amount (number)


Question: What are total transaction amounts for each transaction type?

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

financial_transactions : transaction_type (text) , transaction_amount (number)


Question: Show the account name, id and the number of transactions for each account.

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

accounts : account_name (text) , account_id (number) | financial_transactions : account_id (number)


Question: Return the names and ids of each account, as well as the number of transactions.

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

accounts : account_name (text) , account_id (number) | financial_transactions : account_id (number)


Question: Show the account id with most number of transactions.

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

financial_transactions : account_id (number)


Question: What is the id of the account with the most transactions?

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

financial_transactions : account_id (number)


Question: Show the account id and name with at least 4 transactions.

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

accounts : account_id (number) , account_name (text) | financial_transactions : account_id (number)


Question: What are the ids and names of accounts with 4 or more transactions?

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

accounts : account_id (number) , account_name (text) | financial_transactions : account_id (number)


Question: Show all product sizes.

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

products : product_size (text) , product_id (number)


Question: What are the different product sizes?

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

products : product_size (text) , product_id (number)


Question: Show all product colors.

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

products : product_color (text) , product_id (number)


Question: What are the different product colors?

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

products : product_color (text) , product_id (number)


Question: Show the invoice number and the number of transactions for each invoice.

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

financial_transactions : invoice_number (number)


Question: How many transactions correspond to each invoice number?

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

financial_transactions : invoice_number (number)


Question: What is the invoice number and invoice date for the invoice with most number of transactions?

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

invoices : invoice_number (number) , invoice_date (time) | financial_transactions : invoice_number (number)


Question: What is the invoice number and invoice date corresponding to the invoice with the greatest number of transactions?

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

invoices : invoice_number (number) , invoice_date (time) | financial_transactions : invoice_number (number)


Question: How many invoices do we have?

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)


Question: Count the number of invoices.

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)


Question: Show invoice dates and order id and details for all invoices.

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

invoices : invoice_date (time) , order_id (number) , invoice_number (number) | orders : order_id (number) , order_details (text)


Question: What are the invoice dates, order ids, and order details for all invoices?

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

invoices : invoice_date (time) , order_id (number) , invoice_number (number) | orders : order_id (number) , order_details (text)


Question: Show the order ids and the number of invoices for each order.

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

invoices : order_id (number) , invoice_number (number)


Question: How many invoices correspond to each order id?

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

invoices : order_id (number) , invoice_number (number)


Question: What is the order id and order details for the order more than two invoices.

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

orders : order_id (number) , order_details (text) | invoices : order_id (number) , invoice_number (number)


Question: Return the order ids and details for orderes with two or more invoices.

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

orders : order_id (number) , order_details (text) | invoices : order_id (number) , invoice_number (number)


Question: What is the customer last name, id and phone number with most number of orders?

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

customers : customer_last_name (text) , customer_id (number) , phone_number (text) | orders : customer_id (number) , order_id (number)


Question: Return the last name, id and phone number of the customer who has made the greatest number of orders.

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

customers : customer_last_name (text) , customer_id (number) , phone_number (text) | orders : customer_id (number) , order_id (number)


Question: Show all product names without an order.

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

products : product_name (text) , product_id (number) | order_items : product_id (number) , order_item_id (number)


Question: What are the names of products that have never been ordered?

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

products : product_name (text) , product_id (number) | order_items : product_id (number) , order_item_id (number)


Question: Show all product names and the total quantity ordered for each product name.

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

products : product_name (text) , product_id (number) | order_items : product_quantity (text) , product_id (number) , order_item_id (number)


Question: What are the different product names, and what is the sum of quantity ordered for each product?

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

products : product_name (text) , product_id (number) | order_items : product_quantity (text) , product_id (number) , order_item_id (number)


Question: Show the order ids and the number of items in each order.

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

order_items : order_id (number) , order_item_id (number)


Question: How many order items correspond to each order id?

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

order_items : order_id (number) , order_item_id (number)


Question: Show the product ids and the number of unique orders containing each product.

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

order_items : product_id (number) , order_id (number) , order_item_id (number)


Question: How many distinct order ids correspond to each product?

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

order_items : product_id (number) , order_id (number) , order_item_id (number)


Question: Show all product names and the number of customers having an order on each product.

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

products : product_name (text) , product_id (number) | order_items : product_id (number) , order_id (number) , order_item_id (number) | orders : order_id (number)


Question: What are teh names of the different products, as well as the number of customers who have ordered each product.

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

products : product_name (text) , product_id (number) | order_items : product_id (number) , order_id (number) , order_item_id (number) | orders : order_id (number)


Question: Show order ids and the number of products in each order.

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

order_items : order_id (number) , product_id (number) , order_item_id (number)


Question: How many different products correspond to each order id?

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

order_items : order_id (number) , product_id (number) , order_item_id (number)


Question: Show order ids and the total quantity in each order.

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

order_items : order_id (number) , product_quantity (text) , order_item_id (number)


Question: Give the order ids for all orders, as well as the total product quantity in each.

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

order_items : order_id (number) , product_quantity (text) , order_item_id (number)


Question: How many products were not included in any order?

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

products : product_id (number) | order_items : product_id (number) , order_item_id (number)


Question: Count the number of products that were never ordered.

customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | orders : order_id (number) , customer_id (number) , date_order_placed (time) , order_details (text) | invoices : invoice_number (number) , order_id (number) , invoice_date (time) | accounts : account_id (number) , customer_id (number) , date_account_opened (time) , account_name (text) , other_account_details (text) | product_categories : production_type_code (text) , product_type_description (text) , vat_rating (number) | products : product_id (number) , parent_product_id (number) , production_type_code (text) , unit_price (number) , product_name (text) , product_color (text) , product_size (text) | financial_transactions : transaction_id (number) , account_id (number) , invoice_number (number) , transaction_type (text) , transaction_date (time) , transaction_amount (number) , transaction_comment (text) , other_transaction_details (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) , product_quantity (text) , other_order_item_details (text) | invoice_line_items : order_item_id (number) , invoice_number (number) , product_id (number) , product_title (text) , product_quantity (text) , product_price (number) , derived_product_cost (number) , derived_vat_payable (number) , derived_total_cost (number)

products : product_id (number) | order_items : product_id (number) , order_item_id (number)


Question: How many churches opened before 1850 are there?

people : people_id (number) , name (text) , country (text) , is_male (text) , age (number) | church : church_id (number) , name (text) , organized_by (text) , open_date (number) , continuation_of (text) | wedding : church_id (number) , male_id (number) , female_id (number) , year (number)

church : open_date (number) , church_id (number)


Question: Show the name, open date, and organizer for all churches.

people : people_id (number) , name (text) , country (text) , is_male (text) , age (number) | church : church_id (number) , name (text) , organized_by (text) , open_date (number) , continuation_of (text) | wedding : church_id (number) , male_id (number) , female_id (number) , year (number)

church : name (text) , open_date (number) , organized_by (text) , church_id (number)


Question: List all church names in descending order of opening date.

people : people_id (number) , name (text) , country (text) , is_male (text) , age (number) | church : church_id (number) , name (text) , organized_by (text) , open_date (number) , continuation_of (text) | wedding : church_id (number) , male_id (number) , female_id (number) , year (number)

church : name (text) , open_date (number) , church_id (number)


Question: Show the opening year in whcih at least two churches opened.

people : people_id (number) , name (text) , country (text) , is_male (text) , age (number) | church : church_id (number) , name (text) , organized_by (text) , open_date (number) , continuation_of (text) | wedding : church_id (number) , male_id (number) , female_id (number) , year (number)

church : open_date (number) , church_id (number)


Question: Show the organizer and name for churches that opened between 1830 and 1840.

people : people_id (number) , name (text) , country (text) , is_male (text) , age (number) | church : church_id (number) , name (text) , organized_by (text) , open_date (number) , continuation_of (text) | wedding : church_id (number) , male_id (number) , female_id (number) , year (number)

church : organized_by (text) , name (text) , open_date (number) , church_id (number)


Question: Show all opening years and the number of churches that opened in that year.

people : people_id (number) , name (text) , country (text) , is_male (text) , age (number) | church : church_id (number) , name (text) , organized_by (text) , open_date (number) , continuation_of (text) | wedding : church_id (number) , male_id (number) , female_id (number) , year (number)

church : open_date (number) , church_id (number)


Question: Show the name and opening year for three churches that opened most recently.

people : people_id (number) , name (text) , country (text) , is_male (text) , age (number) | church : church_id (number) , name (text) , organized_by (text) , open_date (number) , continuation_of (text) | wedding : church_id (number) , male_id (number) , female_id (number) , year (number)

church : name (text) , open_date (number) , church_id (number)


Question: How many female people are older than 30 in our record?

people : people_id (number) , name (text) , country (text) , is_male (text) , age (number) | church : church_id (number) , name (text) , organized_by (text) , open_date (number) , continuation_of (text) | wedding : church_id (number) , male_id (number) , female_id (number) , year (number)

people : is_male (text) , age (number) , people_id (number)


Question: Show the country where people older than 30 and younger than 25 are from.

people : people_id (number) , name (text) , country (text) , is_male (text) , age (number) | church : church_id (number) , name (text) , organized_by (text) , open_date (number) , continuation_of (text) | wedding : church_id (number) , male_id (number) , female_id (number) , year (number)

people : country (text) , age (number) , people_id (number)


Question: Show the minimum, maximum, and average age for all people.

people : people_id (number) , name (text) , country (text) , is_male (text) , age (number) | church : church_id (number) , name (text) , organized_by (text) , open_date (number) , continuation_of (text) | wedding : church_id (number) , male_id (number) , female_id (number) , year (number)

people : age (number) , people_id (number)


Question: Show the name and country for all people whose age is smaller than the average.

people : people_id (number) , name (text) , country (text) , is_male (text) , age (number) | church : church_id (number) , name (text) , organized_by (text) , open_date (number) , continuation_of (text) | wedding : church_id (number) , male_id (number) , female_id (number) , year (number)

people : name (text) , country (text) , age (number) , people_id (number)


Question: Show the pair of male and female names in all weddings after year 2014

people : people_id (number) , name (text) , country (text) , is_male (text) , age (number) | church : church_id (number) , name (text) , organized_by (text) , open_date (number) , continuation_of (text) | wedding : church_id (number) , male_id (number) , female_id (number) , year (number)

people : name (text) , people_id (number) | wedding : male_id (number) , female_id (number) , year (number) , church_id (number)


Question: Show the name and age for all male people who don't have a wedding.

people : people_id (number) , name (text) , country (text) , is_male (text) , age (number) | church : church_id (number) , name (text) , organized_by (text) , open_date (number) , continuation_of (text) | wedding : church_id (number) , male_id (number) , female_id (number) , year (number)

people : name (text) , age (number) , is_male (text) , people_id (number) | wedding : male_id (number) , church_id (number)


Question: Show all church names except for those that had a wedding in year 2015.

people : people_id (number) , name (text) , country (text) , is_male (text) , age (number) | church : church_id (number) , name (text) , organized_by (text) , open_date (number) , continuation_of (text) | wedding : church_id (number) , male_id (number) , female_id (number) , year (number)

church : name (text) , church_id (number) | wedding : church_id (number) , year (number)


Question: Show all church names that have hosted least two weddings.

people : people_id (number) , name (text) , country (text) , is_male (text) , age (number) | church : church_id (number) , name (text) , organized_by (text) , open_date (number) , continuation_of (text) | wedding : church_id (number) , male_id (number) , female_id (number) , year (number)

church : name (text) , church_id (number) | wedding : church_id (number)


Question: Show the names for all females from Canada having a wedding in year 2016.

people : people_id (number) , name (text) , country (text) , is_male (text) , age (number) | church : church_id (number) , name (text) , organized_by (text) , open_date (number) , continuation_of (text) | wedding : church_id (number) , male_id (number) , female_id (number) , year (number)

people : name (text) , people_id (number) , is_male (text) , country (text) | wedding : female_id (number) , year (number) , church_id (number)


Question: How many weddings are there in year 2016?

people : people_id (number) , name (text) , country (text) , is_male (text) , age (number) | church : church_id (number) , name (text) , organized_by (text) , open_date (number) , continuation_of (text) | wedding : church_id (number) , male_id (number) , female_id (number) , year (number)

wedding : year (number) , church_id (number)


Question: Show the church names for the weddings of all people older than 30.

people : people_id (number) , name (text) , country (text) , is_male (text) , age (number) | church : church_id (number) , name (text) , organized_by (text) , open_date (number) , continuation_of (text) | wedding : church_id (number) , male_id (number) , female_id (number) , year (number)

people : name (text) , people_id (number) , age (number) | church : name (text) , church_id (number) | wedding : male_id (number) , female_id (number) , church_id (number)


Question: Show all countries and the number of people from each country.

people : people_id (number) , name (text) , country (text) , is_male (text) , age (number) | church : church_id (number) , name (text) , organized_by (text) , open_date (number) , continuation_of (text) | wedding : church_id (number) , male_id (number) , female_id (number) , year (number)

people : country (text) , people_id (number)


Question: How many churches have a wedding in year 2016?

people : people_id (number) , name (text) , country (text) , is_male (text) , age (number) | church : church_id (number) , name (text) , organized_by (text) , open_date (number) , continuation_of (text) | wedding : church_id (number) , male_id (number) , female_id (number) , year (number)

wedding : church_id (number) , year (number)


Question: How many artists do we have?

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)


Question: Count the number of artists.

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)


Question: Show all artist name, age, and country ordered by the yeared they joined.

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

artist : name (text) , age (number) , country (text) , year_join (number) , artist_id (number)


Question: What are the names, ages, and countries of artists, sorted by the year they joined?

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

artist : name (text) , age (number) , country (text) , year_join (number) , artist_id (number)


Question: What are all distinct country for artists?

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

artist : country (text) , artist_id (number)


Question: Return the different countries for artists.

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

artist : country (text) , artist_id (number)


Question: Show all artist names and the year joined who are not from United States.

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

artist : name (text) , year_join (number) , country (text) , artist_id (number)


Question: What are the names and year of joining for artists that do not have the country "United States"?

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

artist : name (text) , year_join (number) , country (text) , artist_id (number)


Question: How many artists are above age 46 and joined after 1990?

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

artist : age (number) , year_join (number) , artist_id (number)


Question: Count the number of artists who are older than 46 and joined after 1990.

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

artist : age (number) , year_join (number) , artist_id (number)


Question: What is the average and minimum age of all artists from United States.

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

artist : age (number) , country (text) , artist_id (number)


Question: Return the average and minimum ages across artists from the United States.

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

artist : age (number) , country (text) , artist_id (number)


Question: What is the name of the artist who joined latest?

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

artist : name (text) , year_join (number) , artist_id (number)


Question: Return the name of the artist who has the latest join year.

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

artist : name (text) , year_join (number) , artist_id (number)


Question: How many exhibition are there in year 2005 or after?

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

exhibition : year (number) , exhibition_id (number)


Question: Count the number of exhibitions that happened in or after 2005.

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

exhibition : year (number) , exhibition_id (number)


Question: Show theme and year for all exhibitions with ticket prices lower than 15.

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

exhibition : theme (text) , year (number) , ticket_price (number) , exhibition_id (number)


Question: What are the theme and year for all exhibitions that have a ticket price under 15?

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

exhibition : theme (text) , year (number) , ticket_price (number) , exhibition_id (number)


Question: Show all artist names and the number of exhibitions for each artist.

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

artist : name (text) , artist_id (number) | exhibition : artist_id (number) , exhibition_id (number)


Question: How many exhibitions has each artist had?

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

artist : name (text) , artist_id (number) | exhibition : artist_id (number) , exhibition_id (number)


Question: What is the name and country for the artist with most number of exhibitions?

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

artist : name (text) , country (text) , artist_id (number) | exhibition : artist_id (number) , exhibition_id (number)


Question: Return the name and country corresponding to the artist who has had the most exhibitions.

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

artist : name (text) , country (text) , artist_id (number) | exhibition : artist_id (number) , exhibition_id (number)


Question: Show names for artists without any exhibition.

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

artist : name (text) , artist_id (number) | exhibition : artist_id (number) , exhibition_id (number)


Question: What are the names of artists that have not had any exhibitions?

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

artist : name (text) , artist_id (number) | exhibition : artist_id (number) , exhibition_id (number)


Question: What is the theme and artist name for the exhibition with a ticket price higher than the average?

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

exhibition : theme (text) , artist_id (number) , ticket_price (number) , exhibition_id (number) | artist : name (text) , artist_id (number)


Question: Return the names of artists and the themes of their exhibitions that had a ticket price higher than average.

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

exhibition : theme (text) , artist_id (number) , ticket_price (number) , exhibition_id (number) | artist : name (text) , artist_id (number)


Question: Show the average, minimum, and maximum ticket prices for exhibitions for all years before 2009.

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

exhibition : ticket_price (number) , year (number) , exhibition_id (number)


Question: What are the average, minimum, and maximum ticket prices for exhibitions that happened prior to 2009?

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

exhibition : ticket_price (number) , year (number) , exhibition_id (number)


Question: Show theme and year for all exhibitions in an descending order of ticket price.

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

exhibition : theme (text) , year (number) , ticket_price (number) , exhibition_id (number)


Question: What are the themes and years for exhibitions, sorted by ticket price descending?

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

exhibition : theme (text) , year (number) , ticket_price (number) , exhibition_id (number)


Question: What is the theme, date, and attendance for the exhibition in year 2004?

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

exhibition : theme (text) , exhibition_id (number) , year (number) | exhibition_record : date (text) , attendance (number) , exhibition_id (number)


Question: Return the themes, dates, and attendance for exhibitions that happened in 2004.

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

exhibition : theme (text) , exhibition_id (number) , year (number) | exhibition_record : date (text) , attendance (number) , exhibition_id (number)


Question: Show all artist names who didn't have an exhibition in 2004.

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

artist : name (text) , artist_id (number) | exhibition : artist_id (number) , year (number) , exhibition_id (number)


Question: What are the names of artists who did not have an exhibition in 2004?

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

artist : name (text) , artist_id (number) | exhibition : artist_id (number) , year (number) , exhibition_id (number)


Question: Show the theme for exhibitions with both records of an attendance below 100 and above 500.

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

exhibition : theme (text) , exhibition_id (number) | exhibition_record : exhibition_id (number) , attendance (number)


Question: Which themes have had corresponding exhibitions that have had attendance both below 100 and above 500?

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

exhibition : theme (text) , exhibition_id (number) | exhibition_record : exhibition_id (number) , attendance (number)


Question: How many exhibitions have a attendance more than 100 or have a ticket price below 10?

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

exhibition : exhibition_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , attendance (number)


Question: Count the number of exhibitions that have had an attendnance of over 100 or a ticket prices under 10.

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

exhibition : exhibition_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , attendance (number)


Question: Show all artist names with an average exhibition attendance over 200.

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

artist : name (text) , artist_id (number) | exhibition : exhibition_id (number) , artist_id (number) | exhibition_record : exhibition_id (number) , attendance (number)


Question: What are the names of artist whose exhibitions draw over 200 attendees on average?

artist : artist_id (number) , name (text) , country (text) , year_join (number) , age (number) | exhibition : exhibition_id (number) , year (number) , theme (text) , artist_id (number) , ticket_price (number) | exhibition_record : exhibition_id (number) , date (text) , attendance (number)

artist : name (text) , artist_id (number) | exhibition : exhibition_id (number) , artist_id (number) | exhibition_record : exhibition_id (number) , attendance (number)


Question: Find the id of the item whose title is "orange".

item : i_id (number) , title (text) | review : a_id (number) , u_id (number) , i_id (number) , rating (number) , rank (number) | useracct : u_id (number) , name (text) | trust : source_u_id (number) , target_u_id (number) , trust (number)