Find number of tracks in each genre?
CREATE TABLE tracks (genre_id VARCHAR); CREATE TABLE genres (name VARCHAR, id VARCHAR)
SELECT COUNT(*), T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE tracks (genre_id VARCHAR); CREATE TABLE genres (name VARCHAR, id VARCHAR) Question: Find number of tracks in each genre? [/INST] SELECT COUNT(*), T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name </s>