What are the names and years of the movies that has the top 3 highest rating star?
CREATE TABLE Rating (mID VARCHAR, stars VARCHAR); CREATE TABLE Movie (title VARCHAR, year VARCHAR, mID VARCHAR)
SELECT TOP 3 T2.title, T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID ORDER BY T1.stars DESC
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE Rating (mID VARCHAR, stars VARCHAR); CREATE TABLE Movie (title VARCHAR, year VARCHAR, mID VARCHAR) Question: What are the names and years of the movies that has the top 3 highest rating star? [/INST] SELECT TOP 3 T2.title, T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID ORDER BY T1.stars DESC </s>