Find the average number of followers for the users who had some tweets.
CREATE TABLE user_profiles (followers INTEGER, UID VARCHAR); CREATE TABLE tweets (followers INTEGER, UID VARCHAR)
SELECT AVG(followers) FROM user_profiles WHERE UID IN (SELECT UID FROM tweets)
<s>[INST] Write mssql query to answer the following question given the database schema. 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. [/INST] SELECT AVG(followers) FROM user_profiles WHERE UID IN (SELECT UID FROM tweets) </s>