Show all the ranks and the number of male and female faculty for each rank.
CREATE TABLE Faculty (rank VARCHAR, sex VARCHAR)
SELECT rank, sex, COUNT(*) FROM Faculty GROUP BY rank, sex
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE Faculty (rank VARCHAR, sex VARCHAR) Question: Show all the ranks and the number of male and female faculty for each rank. [/INST] SELECT rank, sex, COUNT(*) FROM Faculty GROUP BY rank, sex </s>