Context: CREATE TABLE user_profiles (followers INTEGER, UID VARCHAR); CREATE TABLE tweets (followers INTEGER, UID VARCHAR)
Question: Find the average number of followers for the users who had some tweets.
Answer: SELECT AVG(followers) FROM user_profiles WHERE UID IN (SELECT UID FROM tweets)