Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Daily IP Takedown Resolution Rate

MediumSQL · PostgreSQL00:00
Practice interviewer
In session
5 left
00:00

Your question is Daily IP Takedown Resolution Rate. Start with the requirements and the two tables on the right.

Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.

You need to log in / sign up to run or submit.

Problem

Roblox Trust & Safety monitors IP takedown requests submitted through Roblox surfaces. Write a PostgreSQL query that calculates the daily resolution rate for IP takedown requests received during the first five days of March 2025.

A request is resolved when its matching outcome has resolution_status = 'resolved'. Calculate the rate by the request's received date, not the outcome date.

Requirements

  1. Include only rows where request_type = 'ip_takedown' and received_at is from March 1 through March 5, 2025.
  2. Return the request date, total requests, resolved requests, and resolution rate as a percentage rounded to two decimal places.
  3. Preserve dates with requests that have no matching outcome by using an appropriate join and avoid division by zero.
  4. Order the output chronologically.

Schema

ip_takedown_requests
ColumnTypeDescription
request_idPKINTUnique IP takedown request identifier
request_typeVARCHAR(30)Category of Trust & Safety request
received_atTIMESTAMPTimestamp when the request was received
submission_channelVARCHAR(30)Roblox surface used to submit the request
takedown_outcomes
ColumnTypeDescription
outcome_idPKINTUnique outcome identifier
request_idINTRequest identifier associated with the outcome; late-arriving records may temporarily lack a matching request
resolution_statusVARCHAR(20)Current resolution status
resolved_atTIMESTAMPTimestamp when the outcome was resolved
Tablesip_takedown_requeststakedown_outcomes
Your solutionPostgreSQL
You need to log in / sign up to run or submit.
Run a query to see results