0

I need to find out the amount of people that made their first post during a selected day. I have a table that contains all the posts that everyone made. So my logic was to get all the people that did only one post, and this post is done yesterday. I tried some queries, but I still dont feel very comfortable with Postgresql, so please help.

Those are the fields that i have available:

  • user_id
  • post_id
  • post_date

1 Answer 1

4
SELECT user_id, min(post_date) 
from table
group by user_id
having min(post_date) = YourSelectedDate
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.