Explain your approach to database sharding and partitioning.
For this SQL exercise, produce a distribution report that helps evaluate a sharding and partitioning design. Include active shards and their monthly event activity for the specified reporting period, including combinations with no qualifying events.
Output
- One row per active shard and reporting partition.
- Columns:
shard_id, shard_name, partition_name, event_count, total_amount, prior_event_count, and cumulative_event_count.
- Include completed events from January through March 2025, exclude cancelled or undated events, and show zeroes for missing combinations.
- Order by
shard_id, then partition month.