Find the average and maximum age for each type of pet.
CREATE TABLE pets (pettype VARCHAR, pet_age INTEGER)
SELECT AVG(pet_age), MAX(pet_age), pettype FROM pets GROUP BY pettype
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE pets (pettype VARCHAR, pet_age INTEGER) Question: Find the average and maximum age for each type of pet. [/INST] SELECT AVG(pet_age), MAX(pet_age), pettype FROM pets GROUP BY pettype </s>