richardr1126/spider-skeleton-context-instruct huggingface dataset:
### Instruction:

Convert text to sql: How many customers are there of each gender? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select gender , count ( * ) from customers group by gender
### Instruction:

Convert text to sql: How many transactions do we have? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | 

### Response:

select count ( _ ) from _ | select count ( * ) from financial_transactions
### Instruction:

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

### Response:

select count ( _ ) from _ | select count ( * ) from financial_transactions
### Instruction:

Convert text to sql: How many transaction does each account have? Show the number and account id. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | 

### Response:

select count ( _ ) , _ from _ | select count ( * ) , account_id from financial_transactions
### Instruction:

Convert text to sql: Count the number of financial transactions that correspond to each account id. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | 

### Response:

select count ( _ ) , _ from _ | select count ( * ) , account_id from financial_transactions
### Instruction:

Convert text to sql: How many transaction does account with name 337 have? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from financial_transactions join accounts on financial_transactions.account_id = accounts.account_id where accounts.account_name = '337'
### Instruction:

Convert text to sql: Count the number of financial transactions that the account with the name 337 has. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from financial_transactions join accounts on financial_transactions.account_id = accounts.account_id where accounts.account_name = '337'
### Instruction:

Convert text to sql: What is the average, minimum, maximum, and total transaction amount? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | 

### Response:

select avg ( _ ) , min ( _ ) , max ( _ ) , sum ( _ ) from _ | select avg ( transaction_amount ) , min ( transaction_amount ) , max ( transaction_amount ) , sum ( transaction_amount ) from financial_transactions
### Instruction:

Convert text to sql: Return the average, minimum, maximum, and total transaction amounts. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | 

### Response:

select avg ( _ ) , min ( _ ) , max ( _ ) , sum ( _ ) from _ | select avg ( transaction_amount ) , min ( transaction_amount ) , max ( transaction_amount ) , sum ( transaction_amount ) from financial_transactions
### Instruction:

Convert text to sql: Show ids for all transactions whose amounts are greater than the average. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | 

### Response:

select _ from _ where _ > ( select avg ( _ ) from _ ) | select transaction_id from financial_transactions where transaction_amount > ( select avg ( transaction_amount ) from financial_transactions )
### Instruction:

Convert text to sql: What are the ids for transactions that have an amount greater than the average amount of a transaction? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | 

### Response:

select _ from _ where _ > ( select avg ( _ ) from _ ) | select transaction_id from financial_transactions where transaction_amount > ( select avg ( transaction_amount ) from financial_transactions )
### Instruction:

Convert text to sql: Show the transaction types and the total amount of transactions. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | 

### Response:

select _ , sum ( _ ) from _ group by _ | select transaction_type , sum ( transaction_amount ) from financial_transactions group by transaction_type