Show all artist names and the number of exhibitions for each artist.
CREATE TABLE artist (name VARCHAR, artist_id VARCHAR); CREATE TABLE exhibition (artist_id VARCHAR)
SELECT T2.name, COUNT(*) FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE artist (name VARCHAR, artist_id VARCHAR); CREATE TABLE exhibition (artist_id VARCHAR) Question: Show all artist names and the number of exhibitions for each artist. [/INST] SELECT T2.name, COUNT(*) FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id </s>