human
Schema:
follows (f1, f2)
tweets (id, uid, text, createdate)
user_profiles (uid, name, email, partitionid, followers)
Please answer with SQL.
assistant
Sure, I understand.
human
Can you show all user ids that have more than 1 tweet?
assistant
SELECT T1.uid FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid HAVING COUNT( * ) > 1;
human
Thanks, can you show the names associated with those user ids?
assistant
SELECT T1.name FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid HAVING COUNT( * ) > 1;
human
Can you list the names in alphabetical order from top to bottom?
assistant
SELECT T1.name FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid HAVING COUNT( * ) > 1 ORDER by T1.name ;