Posted by Raj, June 2, 2024, 11 p.m.
Question 188: Top 1 popular question by department(Using Postgres)
For this question, don't you have to set the two created_at columns equal to each other. The question states the following condition:
- Rank order the question's popularity by the number of comments on the same day the post was created.
Doesn't this mean the day the question was posted and the day the comment was posted should be the same.
For example, if the question was posted on 2021-09-01, then we want to find users that posted comments on 2021-09-01 to this question. The date the comment was posted was the same day as the day the question was posted
The following is the code I used for this question:
For this question, I used Postgres