Share of Facebook Group Posts Whose First Comment Came From an Admin
Last updated: November 29, 2026
Quick Overview
For each Facebook Group, compute the share of posts whose first comment (excluding the post author's own comments) came from a current group admin, and the median minutes from post creation to that first comment.
Meta
November 29, 20260
0
0 solved
For each Facebook Group, compute the share of posts whose first comment (excluding the post author's own comments) came from a current group admin, and the median minutes from post creation to that first comment.
Admin engagement is a known driver of healthy Groups, and Meta's Groups team tracks how often admins are first to respond. The interviewer checks ROW_NUMBER over comments per post, the exclusion of self-comments before ranking, and keeping uncommented posts in the denominator.
What the Interviewer Expects
- Excludes the post author's own comments before choosing the first comment
- Uses ROW_NUMBER per post ordered by comment time
- Joins the first commenter against the admin table on both group and user
- Keeps posts with no qualifying comment in the denominator
- Computes a median latency with PERCENTILE_CONT
Key Topics to Cover
How to Approach This
- Clarify the schema and expected output format before writing queries.
- Use CTEs (WITH clauses) to break complex queries into readable steps.
- Consider window functions (ROW_NUMBER, RANK, LAG, LEAD) for ranking and sequential analysis.
- Watch for NULLs, duplicates, and edge cases in JOINs and GROUP BY.
- For pandas, prefer vectorized operations over row-by-row iteration.
Possible Follow-up Questions
- Admins change over time. How would you use an admin history table to check admin status at comment time?
- How would you test whether admin-first responses increase later member engagement on the post?
- How would you rank groups where admins respond quickly but rarely?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice SQL ProblemsSample Answer
Clarify the Data
Tables:
group_posts(post_id, group_id, author_id, created_at)post_comments(comment_id, post_id, author_id, created_at)group_admins(group_id, user_id), current admins and moderators....
Approach
Join comments to posts, drop rows where the commenter is the post's author, rank the rest per post by time, and keep rank 1. Left join from posts so posts with no qualifying comment still count. Flag ...