Write a SQL query to analyze store performance by day at King Soopers, including sales, customer counts, and out-of-stock incidents.
Use the provided stores, sales_transactions, and out_of_stock_incidents tables. Include dates represented by either a sale or an out-of-stock incident, including dates with no sales.
Output
- One row per store and activity date.
- Return
store_id, store_name, activity_date, total_sales, customer_count, and out_of_stock_incidents.
- Use zero for missing sales or incident counts, count distinct non-null customers, and order by
store_id, then activity_date.