Write a SQL query to calculate weekly conversion rate by acquisition channel from a table of user sessions and conversions.
Assume a session is converted when it has at least one matching conversion record. Include channels and weeks with sessions but no conversions, and treat missing acquisition channels as Unknown.
week_start, acquisition_channel, session_count, converted_sessions, conversion_rate.week_start, then acquisition_channel.| Column | Type | Description |
|---|---|---|
| session_idPK | INT | Unique session identifier |
| user_id | INT | Identifier of the user who started the session |
| started_at | TIMESTAMP | Timestamp when the session started |
| acquisition_channel | VARCHAR(50) | Marketing channel attributed to the session |
| Column | Type | Description |
|---|---|---|
| conversion_idPK | INT | Unique conversion event identifier |
| session_id | INT | Session associated with the conversion |
| converted_at | TIMESTAMP | Timestamp when the conversion occurred |
| conversion_type | VARCHAR(50) | Type of conversion event |