What is the total ticket expense of the visitors whose membership level is 1?
CREATE TABLE visit (Total_spent INTEGER, visitor_id VARCHAR); CREATE TABLE visitor (id VARCHAR, Level_of_membership VARCHAR)
SELECT SUM(t2.Total_spent) FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id WHERE t1.Level_of_membership = 1
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE visit (Total_spent INTEGER, visitor_id VARCHAR); CREATE TABLE visitor (id VARCHAR, Level_of_membership VARCHAR) Question: What is the total ticket expense of the visitors whose membership level is 1? [/INST] SELECT SUM(t2.Total_spent) FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id WHERE t1.Level_of_membership = 1 </s>