Interview Guides
You are given daily system error logs and asked to calculate a rolling 7-day average of errors for each day in the series. Use PostgreSQL-compatible SQL to return one row per calendar day with the daily error count and the 7-day trailing average, including days with zero errors. Do not use MySQL-only syntax.