Find the name and age of the visitor who bought the most tickets at once.
CREATE TABLE visitor (name VARCHAR, age VARCHAR, id VARCHAR); CREATE TABLE visit (visitor_id VARCHAR, num_of_ticket VARCHAR)
SELECT TOP 1 t1.name, t1.age FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id ORDER BY t2.num_of_ticket DESC
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE visitor (name VARCHAR, age VARCHAR, id VARCHAR); CREATE TABLE visit (visitor_id VARCHAR, num_of_ticket VARCHAR) Question: Find the name and age of the visitor who bought the most tickets at once. [/INST] SELECT TOP 1 t1.name, t1.age FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id ORDER BY t2.num_of_ticket DESC </s>