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

Convert text to sql: Show the maximum amount of transaction. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | 

### Response:

select max ( amount_of_transaction ) from transactions

### Instruction:

Convert text to sql: Show all date and share count of transactions. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | 

### Response:

select date_of_transaction , share_count from transactions

### Instruction:

Convert text to sql: What is the total share of transactions? | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | 

### Response:

select sum ( share_count ) from transactions
### Instruction:

Convert text to sql: Show all transaction ids with transaction code 'PUR'. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | 

### Response:

select transaction_id from transactions where transaction_type_code = 'PUR'

### Instruction:

Convert text to sql: Show all dates of transactions whose type code is "SALE". | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | 

### Response:

select date_of_transaction from transactions where transaction_type_code = 'SALE'
### Instruction:

Convert text to sql: Show the average amount of transactions with type code "SALE". | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | 

### Response:

select avg ( amount_of_transaction ) from transactions where transaction_type_code = 'SALE'

### Instruction:

Convert text to sql: Show the description of transaction type with code "PUR". | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | 

### Response:

select transaction_type_description from ref_transaction_types where transaction_type_code = 'PUR'
### Instruction:

Convert text to sql: Show the minimum amount of transactions whose type code is "PUR" and whose share count is bigger than 50. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | 

### Response:

select min ( amount_of_transaction ) from transactions where transaction_type_code = 'PUR' and share_count > 50

### Instruction:

Convert text to sql: Show the maximum share count of transactions where the amount is smaller than 10000 | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | 

### Response:

select max ( share_count ) from transactions where amount_of_transaction < 10000
### Instruction:

Convert text to sql: Show the dates of transactions if the share count is bigger than 100 or the amount is bigger than 1000. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | 

### Response:

select date_of_transaction from transactions where share_count > 100 or amount_of_transaction > 1000

### Instruction:

Convert text to sql: Show the transaction type descriptions and dates if the share count is smaller than 10. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | 

### Response:

select ref_transaction_types.transaction_type_description , transactions.date_of_transaction from ref_transaction_types join transactions on ref_transaction_types.transaction_type_code = transactions.transaction_type_code where transactions.share_count < 10
### Instruction:

Convert text to sql: Show details of all investors if they make any transaction with share count greater than 100. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | 

### Response:

select investors.investor_details from investors join transactions on investors.investor_id = transactions.investor_id where transactions.share_count > 100

### Instruction:

Convert text to sql: How many distinct transaction types are used in the transactions? | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | 

### Response:

select count ( distinct transaction_type_code ) from transactions
### Instruction:

Convert text to sql: Return the lot details and investor ids. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | 

### Response:

select lot_details , investor_id from lots

### Instruction:

Convert text to sql: Return the lot details of lots that belong to investors with details "l"? | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | 

### Response:

select lots.lot_details from investors join lots on investors.investor_id = lots.investor_id where investors.investor_details = 'l'
### Instruction:

Convert text to sql: What are the purchase details of transactions with amount bigger than 10000? | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | 

### Response:

select purchases.purchase_details from purchases join transactions on purchases.purchase_transaction_id = transactions.transaction_id where transactions.amount_of_transaction > 10000

### Instruction:

Convert text to sql: What are the sale details and dates of transactions with amount smaller than 3000? | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | 

### Response:

select sales.sales_details , transactions.date_of_transaction from sales join transactions on sales.sales_transaction_id = transactions.transaction_id where transactions.amount_of_transaction < 3000
### Instruction:

Convert text to sql: What are the lot details of lots associated with transactions with share count smaller than 50? | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | 

### Response:

select lots.lot_details from lots join transactions_lots on lots.lot_id = transactions_lots.transaction_id join transactions on transactions_lots.transaction_id = transactions.transaction_id where transactions.share_count < 50

### Instruction:

Convert text to sql: What are the lot details of lots associated with transactions whose share count is bigger than 100 and whose type code is "PUR"? | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | 

### Response:

select lots.lot_details from lots join transactions_lots on lots.lot_id = transactions_lots.transaction_id join transactions on transactions_lots.transaction_id = transactions.transaction_id where transactions.share_count > 100 and transactions.transaction_type_code = 'PUR'
### Instruction:

Convert text to sql: Show the average transaction amount for different transaction types. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | 

### Response:

select transaction_type_code , avg ( amount_of_transaction ) from transactions group by transaction_type_code

### Instruction:

Convert text to sql: Show the maximum and minimum share count of different transaction types. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | 

### Response:

select transaction_type_code , max ( share_count ) , min ( share_count ) from transactions group by transaction_type_code