Table schema:
CREATE TABLE Dogs (age INTEGER, dog_id VARCHAR); CREATE TABLE Treatments (age INTEGER, dog_id VARCHAR)

Question: What is the average age of the dogs who have gone through any treatments?
SQL: SELECT AVG(age) FROM Dogs WHERE dog_id IN (SELECT dog_id FROM Treatments)