SQL · Capital One · Medium
A table ad_view_logs stores ad-watch events. Each row has a unique log_id and records log_date_raw, time_slot, ad_id, and watch_seconds. The raw date column is not fully populated: the first row of each block contains an actual date string such as 'YYYY-MM-DD', while later rows in the same block contain only '-'. A dash means “reuse the most recent explicit date above this row” when rows are ordered by increasing log_id. Part 1 — SQL forward fill Write a SQL query that…
Checking your access…