Welcome to our intermediate SQL coding challenge. In this exercise, you'll create a relational database and then extract some data from it.
You're on a popular social media app where users can create posts and comment on posts, and you're browsing an user's profile page where you can see all the posts this user has created along with the latest comments that are attached to each post.
- Create SQL tables
Users
,Posts
andComments
. - Populate some dummy data into these tables.
- Write a query that retrieves the last 3 comments of each post on this user's profile page.
You may use any SQL-based database for this exercise, including SQLite, and you may use subqueries and joins to produce the result set, but you may not use more than 1 query to get the results.
- Fork or clone this repo.
- Implement your code.
- Send us a link to your repo for review.
Happy coding!
Hudello Engineering