Context: CREATE TABLE visit (visitor_id VARCHAR); CREATE TABLE visitor (id VARCHAR, name VARCHAR, age VARCHAR)
Question: find the id, name and age for visitors who visited some museums more than once.
Answer: SELECT t1.id, t1.name, t1.age FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id GROUP BY t1.id HAVING COUNT(*) > 1