Back to problems

Monthly violation-type distribution.

SQL · Airwallex · Medium

You are given two tables. The table post_violations lists post/violation pairs: each row holds a post_id, the violation_type assigned to that post, and a probability_violating score between 0 and 1. The table post_views records view events: each row holds a post_id and the view_date on which a view happened. Treat a post/violation pair as flagged when its probability_violating is strictly greater than $$0.5$$. Group the output by the calendar month taken from view_date…

Checking your access…