I have this query
user_name being followed,
follower_name that followes,
from users u1
join users_followers uf on uf.user_id=u1.user_id
join users u2 on u2.user_id = uf.follower_id
join user_activity ua on ua.user_id = u2.user_id
order by ua.activity_timestamp
But its not working the way i want...
Right now I get all activity from users who follows user "demo", but i want all activity for the users that demo follows.
As you can se on this fiddle: http://sqlfiddle.com/#!9/59adf/4
Steve follows demo and test. So from table user_activity i want to fetch activity for demo and test. So the fetch should be something like: "posted", "Uploaded image", "posted"
Ho do i turn this query around?
Help much appreciated!