Schema: 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.
SQL: SELECT AVG(followers) FROM user_profiles WHERE UID IN (SELECT UID FROM tweets)