Find the average and oldest age for students with different sex.
CREATE TABLE student (sex VARCHAR, age INTEGER)
SELECT AVG(age), MAX(age), sex FROM student GROUP BY sex
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE student (sex VARCHAR, age INTEGER) Question: Find the average and oldest age for students with different sex. [/INST] SELECT AVG(age), MAX(age), sex FROM student GROUP BY sex </s>