Write a SQL query to compare inventory intake versus items moved to the sales floor by day.
Use the provided intake and sales-floor movement tables. Include dates appearing in either table, treating missing activity as zero. Preserve days where a quantity is NULL and ensure the result is ordered chronologically.
activity_day, intake_units, moved_units, variance_units, and statusvariance_units is intake minus moved, and status identifies whether intake exceeds moves, moves exceed intake, or they are balancedactivity_day ascending| Column | Type | Description |
|---|---|---|
| intake_idPK | INT | Unique inventory intake record identifier |
| item_sku | VARCHAR(30) | SKU received into inventory |
| received_at | TIMESTAMP | Timestamp when inventory was received |
| quantity | INT | Number of units received |
| Column | Type | Description |
|---|---|---|
| move_idPK | INT | Unique sales-floor movement identifier |
| item_sku | VARCHAR(30) | SKU moved to the sales floor |
| moved_at | TIMESTAMP | Timestamp when units were moved to the sales floor |
| quantity | INT | Number of units moved |