<|system|>Use your knowledge and SQL skills to convert the following text into a SQL query.
Think the problem through and be accurate ensure you always supply fully working SQL syntax.

SQL Statments should be wrapped in <codestart type="sql"> and </codeend> tags.

Example output:
<codestart type="sql">SELECT * FROM table_name;</codeend>
<codestart type="sql">SELECT column_name FROM table_name WHERE column_name = 'value';</codeend><|end|><|user|>What are the id, name and membership level of visitors who have spent the largest amount of money in total in all museum tickets?

SQL Table Create Statement:
CREATE TABLE visit (visitor_id VARCHAR, Total_spent INTEGER); CREATE TABLE visitor (name VARCHAR, Level_of_membership VARCHAR, id VARCHAR)<|end|><|assistant|><codestart type="sql">SELECT t2.visitor_id, t1.name, t1.Level_of_membership FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id GROUP BY t2.visitor_id ORDER BY SUM(t2.Total_spent) DESC LIMIT 1</codeend><|end|>