Tweeter Feed
We still haven't implemented the most important page on our social media site, "Tweeter". Users can follow one another. We need a feed on our home page that shows a list of recent tweets from users you follow.
Following is a many-to-many relationship, so we'll store that in a junction table called follows
which references tweeters
.
tweeters
column_name | type |
---|---|
id | INTEGER |
username | VARCHAR |
email | VARCHAR |
registered_at | TIMESTAMPTZ |
follows
column_name | type | reference |
---|---|---|
follower_id | INTEGER | tweeters.id |
followed_id | INTEGER | tweeters.id |
created_at | TIMESTAMPTZ | NULL |
The junction table stores who (follower_id
) is following whom (followed_id
).
Remember that the tweets are in tweets
.
tweets
column_name | type | reference |
---|---|---|
id | INTEGER | NULL |
body | TEXT | NULL |
user_id | INTEGER | tweeters.id |
created_at | TIMESTAMPTZ | NULL |
For this challenge, get all the tweets from tweeters that user enrico.durgan1
follows,
as well as the usernames for who authored those tweets and when those tweets were created.