What are the id and details of the customers who have at least 3 events?
CREATE TABLE Customers (customer_id VARCHAR, customer_details VARCHAR); CREATE TABLE Customer_Events (customer_id VARCHAR)
SELECT T1.customer_id, T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING COUNT(*) >= 3
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE Customers (customer_id VARCHAR, customer_details VARCHAR); CREATE TABLE Customer_Events (customer_id VARCHAR) Question: What are the id and details of the customers who have at least 3 events? [/INST] SELECT T1.customer_id, T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING COUNT(*) >= 3 </s>