How many captains with younger than 50 are in each rank?
CREATE TABLE captain (rank VARCHAR, age INTEGER)
SELECT COUNT(*), rank FROM captain WHERE age < 50 GROUP BY rank
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE captain (rank VARCHAR, age INTEGER) Question: How many captains with younger than 50 are in each rank? [/INST] SELECT COUNT(*), rank FROM captain WHERE age < 50 GROUP BY rank </s>