SQL · Meta · Medium
Given the table composer(user_id INT, event VARCHAR(10), event_date DATE), calculate a daily success metric over the seven-day reporting period ending on 2025-09-01. The period starts on 2025-08-26 and includes both endpoints. For each date, let $$p$$ be the number of rows whose event is 'post', and let $$e$$ be the number of rows whose event is 'enter'. The metric is: $$\text{post\_success\_rate} = \frac{p}{e}$$ If $$e = 0$$, report 0.00 for that date. Rules: Include every…
Checking your access…