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

Convert text to sql: What is the incident type description for the incident type with code "VIOLENCE"? | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | 

### Response:

select incident_type_description from ref_incident_type where incident_type_code = 'VIOLENCE'
### Instruction:

Convert text to sql: Find the maximum and minimum monthly rental for all student addresses. | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | 

### Response:

select max ( monthly_rental ) , min ( monthly_rental ) from student_addresses
### Instruction:

Convert text to sql: Find the first names of teachers whose email address contains the word "man". | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | 

### Response:

select first_name from teachers where email_address like '%man%'
### Instruction:

Convert text to sql: List all information about the assessment notes sorted by date in ascending order. | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | 

### Response:

select * from assessment_notes order by date_of_notes asc
### Instruction:

Convert text to sql: List all cities of addresses in alphabetical order. | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | 

### Response:

select city from addresses order by city asc
### Instruction:

Convert text to sql: Find the first names and last names of teachers in alphabetical order of last name. | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | 

### Response:

select first_name , last_name from teachers order by last_name asc
### Instruction:

Convert text to sql: Find all information about student addresses, and sort by monthly rental in descending order. | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | 

### Response:

select * from student_addresses order by monthly_rental desc
### Instruction:

Convert text to sql: Find the id and first name of the student that has the most number of assessment notes? | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | 

### Response:

select assessment_notes.student_id , students.first_name from assessment_notes join students on assessment_notes.student_id = students.student_id group by assessment_notes.student_id order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Find the ids and first names of the 3 teachers that have the most number of assessment notes? | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | 

### Response:

select assessment_notes.teacher_id , teachers.first_name from assessment_notes join teachers on assessment_notes.teacher_id = teachers.teacher_id group by assessment_notes.teacher_id order by count ( * ) desc limit 3
### Instruction:

Convert text to sql: Find the id and last name of the student that has the most behavior incidents? | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | 

### Response:

select behavior_incident.student_id , students.last_name from behavior_incident join students on behavior_incident.student_id = students.student_id group by behavior_incident.student_id order by count ( * ) desc limit 1