Users Who Reported a Post Then Blocked Its Author Within a Week

Last updated: November 29, 2026

Quick Overview

Using Facebook content reports and block events, find the share of reporters who blocked the reported post's author within seven days after their first report of that author.

Meta
Data Manipulation (SQL/Python)
Data Scientist
Meta
November 29, 2026
Data Scientist
Onsite
Data Manipulation (SQL/Python)
Medium

0

0

0 solved


Using Facebook content reports and block events, find the share of reporters who blocked the reported post's author within seven days after their first report of that author.

Meta's integrity teams look at how reports translate into protective actions like blocking. The interviewer checks joining three tables to reach the author, deduping to the first report per reporter and author, and a forward-looking time window.

What the Interviewer Expects
  • Joins reports to posts to recover the author
  • Dedupes to first report per (reporter, author)
  • LEFT JOINs blocks with a 0 to 7 day window after the report
  • Uses EXISTS or pre-dedupe so multiple blocks do not inflate counts
  • Censors pairs with less than seven days of follow-up
Key Topics to Cover
multi-table join
first-event dedupe
time window
EXISTS
integrity
How to Approach This
  1. Clarify the schema and expected output format before writing queries.
  2. Use CTEs (WITH clauses) to break complex queries into readable steps.
  3. Consider window functions (ROW_NUMBER, RANK, LAG, LEAD) for ranking and sequential analysis.
  4. Watch for NULLs, duplicates, and edge cases in JOINs and GROUP BY.
  5. For pandas, prefer vectorized operations over row-by-row iteration.
Possible Follow-up Questions
  • How would you compare this with a baseline of blocks without a report?
  • How does the result change by report reason?
  • Would you count blocks that happened before the report?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice SQL Problems
Sample Answer
Clarify the Data

reports(report_id, reporter_id, post_id, reason, reported_at), posts(post_id, author_id), blocks(blocker_id, blocked_id, blocked_at). A user may report several posts by the same author; I want o...

Approach
  1. Join reports to posts, then take MIN(reported_at) per (reporter, author).
  2. Exclude pairs where the reporter had already blocked the author earlier.
  3. Flag pairs with a block in (first_report, ...

Submit Your Answer
Markdown supported