Ville det ikke virke bare ved
select distinct username, tweet, date order by date desc
(Dette er MSSQL-syntaks)
Med nye data i hånden:
SELECT DISTINCT tweets.username, content, date from tweets
WHERE user_id IN (
SELECT users.id FROM users
INNER JOIN user_users ON users.id = user_users.followed_user_id
WHERE user_users.user_id = 1)
ORDER BY date desc