Which is the email of the party that has used the services the most number of times?
CREATE TABLE parties (party_email VARCHAR, party_id VARCHAR); CREATE TABLE party_services (customer_id VARCHAR)
SELECT TOP 1 t1.party_email FROM parties AS t1 JOIN party_services AS t2 ON t1.party_id = t2.customer_id GROUP BY t1.party_email ORDER BY COUNT(*) DESC
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE parties (party_email VARCHAR, party_id VARCHAR); CREATE TABLE party_services (customer_id VARCHAR) Question: Which is the email of the party that has used the services the most number of times? [/INST] SELECT TOP 1 t1.party_email FROM parties AS t1 JOIN party_services AS t2 ON t1.party_id = t2.customer_id GROUP BY t1.party_email ORDER BY COUNT(*) DESC </s>