Reported Posts Analysis

ASKED IN INTERVIEW
2pts
Meta

Problem Statement

Meta's integrity team wants to measure the accuracy of spam reports. You need to find the total number of unique posts that were reported for the reason spam and were later deleted (present in the removals table).

Rules:

  • Only consider reports where extra is 'spam'.
  • A post is considered "deleted" if its post_id exists in the removals table.
  • Output column: spam_delete_count.
Tests your understanding of
Joins, Filtering and Aggregation

Input Tables

actions
user_id(INTEGER)post_id(INTEGER)action_date(DATE)action(VARCHAR)extra(VARCHAR)
11012026-02-01reportspam
21012026-02-01reportspam
31022026-02-02reportracism
41032026-02-02reportspam
removals
post_id(INTEGER)remove_date(DATE)
1012026-02-03
1022026-02-03
post_metadata
post_id(INTEGER)author_id(INTEGER)post_type(VARCHAR)
10199ad
10388status

Expected Output

spam_delete_count(INTEGER)
1

Tags

EasyASKED IN INTERVIEWJoinsFilteringAggregation
10-15 min
72%

Hints