What is the average rating star for each reviewer?
CREATE TABLE Reviewer (name VARCHAR, rID VARCHAR); CREATE TABLE Rating (stars INTEGER, rID VARCHAR)
SELECT T2.name, AVG(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T2.name
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE Reviewer (name VARCHAR, rID VARCHAR); CREATE TABLE Rating (stars INTEGER, rID VARCHAR) Question: What is the average rating star for each reviewer? [/INST] SELECT T2.name, AVG(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T2.name </s>