richardr1126/spider-natsql-context-validation huggingface dataset:
### Instruction:

Convert text to NatSQL: Which professionals have done at least two types of treatments? List the professional id and cell phone. | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select professionals.professional_id , professionals.cell_number from treatments  where  count ( treatments.* )  >= 2  group by professionals.professional_id

### Instruction:

Convert text to NatSQL: Find the id and cell phone of the professionals who operate two or more types of treatments. | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select professionals.professional_id , professionals.cell_number from treatments  where  count ( treatments.* )  >= 2  group by professionals.professional_id
### Instruction:

Convert text to NatSQL: What are the first name and last name of the professionals who have done treatment with cost below average? | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select  distinct professionals.first_name , professionals.last_name from professionals  where  @.@ < avg ( treatments.cost_of_treatment )

### Instruction:

Convert text to NatSQL: Which professionals have operated a treatment that costs less than the average? Give me theor first names and last names. | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select  distinct professionals.first_name , professionals.last_name from professionals  where  @.@ < avg ( treatments.cost_of_treatment )
### Instruction:

Convert text to NatSQL: List the date of each treatment, together with the first name of the professional who operated it. | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select treatments.date_of_treatment , professionals.first_name from treatments

### Instruction:

Convert text to NatSQL: What are the date and the operating professional's first name of each treatment? | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select treatments.date_of_treatment , professionals.first_name from treatments
### Instruction:

Convert text to NatSQL: List the cost of each treatment and the corresponding treatment type description. | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select treatments.cost_of_treatment , treatment_types.treatment_type_description from treatments

### Instruction:

Convert text to NatSQL: What are the cost and treatment type description of each treatment? | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select treatments.cost_of_treatment , treatment_types.treatment_type_description from treatments
### Instruction:

Convert text to NatSQL: List each owner's first name, last name, and the size of his for her dog. | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select owners.first_name , owners.last_name , dogs.size_code from owners

### Instruction:

Convert text to NatSQL: What are each owner's first name, last name, and the size of their dog? | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select owners.first_name , owners.last_name , dogs.size_code from owners
### Instruction:

Convert text to NatSQL: List pairs of the owner's first name and the dogs's name. | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select owners.first_name , dogs.name from owners

### Instruction:

Convert text to NatSQL: What are each owner's first name and their dogs's name? | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select owners.first_name , dogs.name from owners
### Instruction:

Convert text to NatSQL: List the names of the dogs of the rarest breed and the treatment dates of them. | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select dogs.name , treatments.date_of_treatment from dogs  where  @.@ = dogs.breed_code  order by count ( dogs.* )  asc limit 1

### Instruction:

Convert text to NatSQL: Which dogs are of the rarest breed? Show their names and treatment dates. | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select dogs.name , treatments.date_of_treatment from dogs  where  @.@ = dogs.breed_code  order by count ( dogs.* )  asc limit 1
### Instruction:

Convert text to NatSQL: Which dogs are owned by someone who lives in Virginia? List the owner's first name and the dog's name. | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select owners.first_name , dogs.name from owners  where  owners.state = "Virginia"

### Instruction:

Convert text to NatSQL: Find the first names of owners living in Virginia and the names of dogs they own. | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select owners.first_name , dogs.name from owners  where  owners.state = "Virginia"
### Instruction:

Convert text to NatSQL: What are the arriving date and the departing date of the dogs who have gone through a treatment? | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select  distinct dogs.date_arrived , dogs.date_departed from treatments  where  @.@ join treatments.*

### Instruction:

Convert text to NatSQL: Find the arriving date and the departing date of the dogs that received a treatment. | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select  distinct dogs.date_arrived , dogs.date_departed from treatments  where  @.@ join treatments.*
### Instruction:

Convert text to NatSQL: List the last name of the owner owning the youngest dog. | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select owners.last_name from owners  where  @.@ = max ( dogs.age )

### Instruction:

Convert text to NatSQL: Who owns the youngest dog? Give me his or her last name. | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select owners.last_name from owners  where  @.@ = max ( dogs.age )
### Instruction:

Convert text to NatSQL: List the emails of the professionals who live in the state of Hawaii or the state of Wisconsin. | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select professionals.email_address from professionals  where  professionals.state = "Hawaii"  or  professionals.state = "Wisconsin"

### Instruction:

Convert text to NatSQL: What are the emails of the professionals living in either the state of Hawaii or the state of Wisconsin? | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select professionals.email_address from professionals  where  professionals.state = "Hawaii"  or  professionals.state = "Wisconsin"
### Instruction:

Convert text to NatSQL: What are the arriving date and the departing date of all the dogs? | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select dogs.date_arrived , dogs.date_departed from dogs

### Instruction:

Convert text to NatSQL: List the arrival date and the departure date for all the dogs. | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select dogs.date_arrived , dogs.date_departed from dogs
### Instruction:

Convert text to NatSQL: How many dogs went through any treatments? | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select count (  distinct treatments.dog_id )  from treatments

### Instruction:

Convert text to NatSQL: Count the number of dogs that went through a treatment. | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select count (  distinct treatments.dog_id )  from treatments
### Instruction:

Convert text to NatSQL: How many professionals have performed any treatment to dogs? | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select count (  distinct treatments.professional_id )  from treatments

### Instruction:

Convert text to NatSQL: Find the number of professionals who have ever treated dogs. | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select count (  distinct treatments.professional_id )  from treatments
### Instruction:

Convert text to NatSQL: Which professionals live in a city containing the substring 'West'? List his or her role, street, city and state. | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select professionals.role_code , professionals.street , professionals.city , professionals.state from professionals  where  professionals.city like "%West%"

### Instruction:

Convert text to NatSQL: Find the role, street, city and state of the professionals living in a city that contains the substring 'West'. | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select professionals.role_code , professionals.street , professionals.city , professionals.state from professionals  where  professionals.city like "%West%"
### Instruction:

Convert text to NatSQL: Which owners live in the state whose name contains the substring 'North'? List his first name, last name and email. | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select owners.first_name , owners.last_name , owners.email_address from owners  where  owners.state like "%North%"

### Instruction:

Convert text to NatSQL: Return the first name, last name and email of the owners living in a state whose name contains the substring 'North'. | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select owners.first_name , owners.last_name , owners.email_address from owners  where  owners.state like "%North%"
### Instruction:

Convert text to NatSQL: How many dogs have an age below the average? | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select count ( dogs.* )  from dogs  where  @.@ < avg ( dogs.age )

### Instruction:

Convert text to NatSQL: Count the number of dogs of an age below the average. | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select count ( dogs.* )  from dogs  where  @.@ < avg ( dogs.age )
### Instruction:

Convert text to NatSQL: How much does the most recent treatment cost? | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select treatments.cost_of_treatment from treatments  order by treatments.date_of_treatment desc limit 1

### Instruction:

Convert text to NatSQL: Show me the cost of the most recently performed treatment. | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select treatments.cost_of_treatment from treatments  order by treatments.date_of_treatment desc limit 1
### Instruction:

Convert text to NatSQL: How many dogs have not gone through any treatment? | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select count ( dogs.* )  from dogs  where  @.@ not in treatments.*

### Instruction:

Convert text to NatSQL: Tell me the number of dogs that have not received any treatment . | breeds : breed_code , breed_name | charges : charge_id , charge_type , charge_amount | sizes : size_code , size_description | treatment_types : treatment_type_code , treatment_type_description | owners : owner_id , first_name , last_name , street , city , state , zip_code , email_address , home_phone , cell_number | dogs : dog_id , owner_id , abandoned_yn , breed_code , size_code , name , age , date_of_birth , gender , weight , date_arrived , date_adopted , date_departed | professionals : professional_id , role_code , first_name , street , city , state , zip_code , last_name , email_address , home_phone , cell_number | treatments : treatment_id , dog_id , professional_id , treatment_type_code , date_of_treatment , cost_of_treatment | dogs.owner_id = owners.owner_id | dogs.owner_id = owners.owner_id | dogs.size_code = sizes.size_code | dogs.breed_code = breeds.breed_code | treatments.dog_id = dogs.dog_id | treatments.professional_id = professionals.professional_id | treatments.treatment_type_code = treatment_types.treatment_type_code | 

### Response:

select count ( dogs.* )  from dogs  where  @.@ not in treatments.*