Weekly Poster Rate per Neighborhood Among Verified Members
Last updated: November 29, 2026
Quick Overview
Using members and posts tables, compute for one week the share of verified members in each neighborhood who published at least one non-deleted post, and return the top neighborhoods by that rate.
Nextdoor
November 29, 20260
0
0 solved
Using members and posts tables, compute for one week the share of verified members in each neighborhood who published at least one non-deleted post, and return the top neighborhoods by that rate.
Nextdoor's health depends on a neighborhood having enough members who actually contribute, not just read. A Data Scientist screen uses this to check clean joins, the right denominator, and filters that match the business definition (verified members, non-deleted posts).
What the Interviewer Expects
- Define the denominator as verified members in the neighborhood, not only those who posted
- Count distinct authors so prolific posters are counted once
- Exclude deleted posts and unverified authors
- Use a LEFT JOIN so neighborhoods with zero posters still appear
- Apply a minimum member threshold to avoid tiny-neighborhood noise
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
- How would you show the trend over the last 12 weeks in one query?
- Members can move. Should a post count toward the neighborhood of the post or the member's current neighborhood?
- Why might the rate be misleading for brand-new neighborhoods?
- How would you include comments as contributions?
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
members(member_id, neighborhood_id, verified_at, signup_channel): verified_at is NULL for unverified accounts. posts(post_id, author_id, neighborhood_id, created_at, is_deleted). Week is Monday ...
Approach
Build two aggregates: verified members per neighborhood, and distinct verified authors with a live post in the week per neighborhood. LEFT JOIN posters onto members so zero-poster neighborhoods are ke...