Show the names of students who have at least 2 likes.
CREATE TABLE Likes (student_id VARCHAR); CREATE TABLE Highschooler (name VARCHAR, id VARCHAR)
SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING COUNT(*) >= 2
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE Likes (student_id VARCHAR); CREATE TABLE Highschooler (name VARCHAR, id VARCHAR) Question: Show the names of students who have at least 2 likes. [/INST] SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING COUNT(*) >= 2 </s>