SELECT avg(age) FROM Dogs WHERE dog_id IN ( SELECT dog_id FROM Treatments )
Find the average age of the dogs who went through treatments.
SELECT avg ( age ) FROM Dogs WHERE dog_id IN ( SELECT dog_id FROM Treatments )
select avg ( age ) from dogs where dog_id in ( select dog_id from treatments )
Find the average age of the dogs who went through treatments .