Twitch analytics needs to identify channels whose daily active viewers have dropped sharply compared with their recent historical performance. Write a PostgreSQL query that compares each channel's latest viewer count with the average from earlier dates having the same weekday.
daily_channel_metrics.| Column | Type | Description |
|---|---|---|
| channel_idPK | INTEGER | Unique Twitch channel identifier |
| channel_name | VARCHAR(100) | Twitch channel name |
| Column | Type | Description |
|---|---|---|
| channel_idPK | INTEGER | Twitch channel identifier |
| metric_datePK | DATE | Date of the daily metric |
| daily_active_viewers | INTEGER | Distinct viewers active on the channel that day |