Write SQL queries to extract, join, and compute rolling engagement metrics across multi-modal asset catalogs and user interaction logs.
Use the provided asset, user, and interaction tables. Calculate engagement from interaction records with valid matching assets and users, using the interaction date as the reporting date.
Output
- One row per asset, modality, and activity date
- Columns:
asset_id, modality, activity_date, daily_engagement, and rolling_3_day_engagement
- Include only matched asset and user records, order by
asset_id and activity_date ascending, and preserve NULL modalities