Shopify Marketing analysts monitor the performance of the Shopify Email channel across consecutive days. The team needs a rolling conversion rate that remains accurate when a day has traffic but no conversions, or no traffic at all.
Write a PostgreSQL query for the period from March 1 through March 10, 2025, using only the Shopify Email channel.
session_date, daily_sessions, daily_conversions, rolling_sessions, rolling_conversions, rolling_conversion_rate_pct.session_date in ascending order.0, and return NULL for rolling_conversion_rate_pct when rolling_sessions is 0.| Column | Type | Description |
|---|---|---|
| session_idPK | INT | Unique marketing session identifier |
| session_date | DATE | Date on which the session occurred |
| channel | VARCHAR(100) | Shopify Marketing attribution channel |
| campaign_name | VARCHAR(150) | Shopify Email campaign name |
| Column | Type | Description |
|---|---|---|
| order_idPK | INT | Unique order identifier |
| session_id | INT | Marketing session attributed to the order |
| order_date | DATE | Date on which the order was placed |
| status | VARCHAR(30) | Order lifecycle status |