Flagged Posts
Flagged Posts
A social-network moderation team investigates the breakdown of reports on one day. Each row in Actions is a user action on a post: view, like, share, report or remove. The action type lives in the ENUM column action; for action = 'report' rows the reason is stored in a separate ENUM column report_reason (values: spam, racism, violence, nudity, misinformation, other). The action moment is acted_at TIMESTAMPTZ, the IP is INET, extra metadata sits in JSONB action_payload.
For 2024-07-04 count, per reason, the number of unique reported posts.
Result columns: report_reason, report_count. Sort by report_reason.
Expected output sample
This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables. Your answer must use the same column names as this sample — alias them with AS if needed.
| report_reason | report_count |
|---|---|
| spam | 4 |
| racism | 2 |
| violence | 1 |
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign in