=== Report 1: Trend of stock-count discrepancies within 2025: steady climb or step change? (written by Omar) === Engineer's note: Covers all tenants (no tenant_id filter) since the question is platform-wide about discrepancy trend and warehouse rollout; events_per_active_location is NULL for any period with zero active locations to avoid divide-by-zero. REPORT: Trend of stock-count discrepancies within 2025: steady climb or step change? QUESTION: Did the 24% year-over-year rise in routine stock-count discrepancies climb steadily, or did it step up at a specific point in the year (and is that step explained by more warehouses coming online, or a genuine per-location worsening)? period_label | events | abs_units_variance | net_units_variance | distinct_locations_active | events_per_active_location | new_warehouses_opened_this_period ----------------+--------+--------------------+--------------------+---------------------------+----------------------------+---------------------------------- 2025-01 (1-15) | 363 | 363 | -101 | 67 | 5.42 | 0 2025-01 (16-31) | 401 | 401 | -155 | 77 | 5.21 | 0 2025-02 (1-15) | 425 | 425 | -147 | 82 | 5.18 | 0 2025-02 (16-28) | 335 | 335 | -123 | 67 | 5.0 | 0 2025-03 (1-15) | 371 | 371 | -159 | 77 | 4.82 | 1 2025-03 (16-31) | 451 | 451 | -177 | 76 | 5.93 | 1 2025-04 (1-15) | 385 | 385 | -131 | 79 | 4.87 | 1 2025-04 (16-30) | 398 | 398 | -128 | 78 | 5.1 | 1 2025-05 (1-15) | 413 | 413 | -177 | 77 | 5.36 | 2 2025-05 (16-31) | 441 | 441 | -181 | 84 | 5.25 | 5 2025-06 (1-15) | 398 | 398 | -138 | 73 | 5.45 | 0 2025-06 (16-30) | 420 | 420 | -128 | 90 | 4.67 | 1 2025-07 (1-15) | 401 | 401 | -133 | 83 | 4.83 | 0 2025-07 (16-31) | 448 | 448 | -178 | 89 | 5.03 | 2 2025-08 (1-15) | 405 | 405 | -127 | 80 | 5.06 | 0 2025-08 (16-31) | 460 | 460 | -184 | 91 | 5.05 | 3 2025-09 (1-15) | 454 | 454 | -166 | 89 | 5.1 | 2 2025-09 (16-30) | 421 | 421 | -175 | 91 | 4.63 | 2 2025-10 (1-15) | 480 | 480 | -210 | 89 | 5.39 | 0 2025-10 (16-31) | 461 | 461 | -183 | 94 | 4.9 | 0 2025-11 (1-15) | 460 | 460 | -202 | 82 | 5.61 | 0 2025-11 (16-30) | 457 | 457 | -181 | 94 | 4.86 | 2 2025-12 (1-15) | 464 | 464 | -206 | 89 | 5.21 | 0 2025-12 (16-31) | 482 | 482 | -190 | 91 | 5.3 | 0 (24 rows) === Report 2: Who logs 'Missing - suspected theft' stock adjustments: concentrated among specific staff? (written by Ines) === Engineer's note: Report shows top 50 staff by theft-tagged count; the total_staff_with_adjustments_2025 column (a window count over the full grouped result, computed before the LIMIT) tells you how many distinct staff logged >=1 adjustment in 2025 in case it exceeds 50. Not scoped to a single tenant/merchant since the question is about staff behavior generally, not a particular merchant; user ids are globally unique so grouping/joining works correctly across tenants. REPORT: Who logs 'Missing - suspected theft' stock adjustments: concentrated among specific staff? QUESTION: Is the 'Missing - suspected theft' reason spread roughly proportionally across everyone who logs stock adjustments, or does it concentrate in a handful of specific staff members — and do their theft entries cluster at a particular time of day (suggesting end-of-shift batch logging rather than individually investigated incidents)? staff_name | total_adjustments_logged | theft_tagged_count | pct_theft_of_own_adjustments | damage_tagged_count | expired_tagged_count | cycle_count_variance_count | avg_hour_of_day_for_theft_entries | total_staff_with_adjustments_2025 -------------------+--------------------------+--------------------+------------------------------+---------------------+----------------------+----------------------------+-----------------------------------+---------------------------------- Unknown/unassigned | 3570 | 640 | 17.9 | 609 | 605 | 1716 | 11.4 | 35 Christopher Evans | 1506 | 262 | 17.4 | 264 | 256 | 724 | 11.5 | 35 Omar Taylor | 1058 | 186 | 17.6 | 187 | 178 | 507 | 11.2 | 35 Noor de Jong | 622 | 115 | 18.5 | 102 | 100 | 305 | 11.5 | 35 Harry Pappas | 253 | 57 | 22.5 | 41 | 39 | 116 | 12.0 | 35 Olivia Larsson | 304 | 53 | 17.4 | 59 | 51 | 141 | 11.5 | 35 Antoine Blanc | 286 | 52 | 18.2 | 51 | 45 | 138 | 11.8 | 35 Niklas Mayer | 244 | 42 | 17.2 | 45 | 31 | 126 | 11.7 | 35 Emma Hall | 173 | 40 | 23.1 | 22 | 25 | 86 | 11.3 | 35 Mikkel Sørensen | 216 | 39 | 18.1 | 40 | 38 | 99 | 11.5 | 35 Sarah Peters | 219 | 37 | 16.9 | 36 | 46 | 100 | 12.0 | 35 Manon Dubois | 209 | 35 | 16.7 | 28 | 37 | 109 | 11.8 | 35 Taylor Young | 262 | 33 | 12.6 | 48 | 48 | 133 | 10.4 | 35 Michael Weiß | 145 | 23 | 15.9 | 27 | 21 | 74 | 12.1 | 35 Mikkel Olsen | 135 | 23 | 17.0 | 28 | 27 | 57 | 10.7 | 35 Stefan Vos | 134 | 20 | 14.9 | 22 | 20 | 72 | 11.1 | 35 Paula Gruber | 71 | 15 | 21.1 | 11 | 15 | 30 | 12.0 | 35 Milan de Vries | 76 | 13 | 17.1 | 12 | 11 | 40 | 10.9 | 35 Mia Mayer | 76 | 12 | 15.8 | 12 | 9 | 43 | 10.7 | 35 Ava Davis | 57 | 10 | 17.5 | 10 | 12 | 25 | 10.5 | 35 Johanna Kaiser | 54 | 9 | 16.7 | 6 | 8 | 31 | 11.9 | 35 Ethan Lewis | 48 | 8 | 16.7 | 8 | 5 | 27 | 11.8 | 35 William Jensen | 45 | 8 | 17.8 | 6 | 8 | 23 | 12.5 | 35 Youssef Kok | 39 | 8 | 20.5 | 10 | 5 | 16 | 10.1 | 35 Knut Jensen | 48 | 7 | 14.6 | 9 | 10 | 22 | 11.7 | 35 Jack King | 78 | 6 | 7.7 | 14 | 16 | 42 | 12.7 | 35 Laura Lopez | 80 | 5 | 6.3 | 17 | 15 | 43 | 12.6 | 35 Mason Johnson | 23 | 5 | 21.7 | 2 | 2 | 14 | 10.4 | 35 Jonas Weiß | 28 | 4 | 14.3 | 2 | 6 | 16 | 14.0 | 35 Greta Weiß | 27 | 4 | 14.8 | 7 | 7 | 9 | 12.0 | 35 Grace Jackson | 31 | 3 | 9.7 | 9 | 7 | 12 | 14.3 | 35 Maja Muller | 23 | 3 | 13.0 | 6 | 4 | 10 | 11.7 | 35 Aoife Ryan | 29 | 2 | 6.9 | 4 | 4 | 19 | 12.5 | 35 George Fernandes | 24 | 2 | 8.3 | 1 | 6 | 15 | 12.5 | 35 Jack Morgan | 1 | 0 | 0.0 | 0 | 0 | 0 | NULL | 35 (35 rows) === Report 3: Where 'Missing - suspected theft' tags concentrate: by warehouse (written by Ines) === Engineer's note: Report is capped at 50 warehouses as requested; I added a repeated column total_warehouses_with_adjustments_2025 (a window count computed before the LIMIT) so the analyst can see the full distinct-warehouse count even though only up to 50 rows print. REPORT: Where 'Missing - suspected theft' tags concentrate: by warehouse QUESTION: Does the 'Missing - suspected theft' reason concentrate in a handful of specific warehouses/sites, or is it spread evenly across all sites that log stock adjustments? warehouse_name | tenant_name | total_adjustments_at_site | theft_tagged_count | pct_theft_of_site_adjustments | distinct_staff_logging_theft_here | total_warehouses_with_adjustments_2025 ---------------------------------------+-------------------------------+---------------------------+--------------------+-------------------------------+-----------------------------------+--------------------------------------- Atlanta Fulfilment Centre | Cragsley Outfitters | 1506 | 262 | 17.4 | 1 | 120 Reading Fulfilment Centre | Marrowby & Vane | 1058 | 186 | 17.6 | 1 | 120 Den Haag Fulfilment Centre | Studio Vrij | 622 | 115 | 18.5 | 1 | 120 Cambridge Fulfilment Centre | Thistlecombe | 253 | 57 | 22.5 | 1 | 120 Uppsala Fulfilment Centre | Velvet Ash | 304 | 53 | 17.4 | 1 | 120 Paris Fulfilment Centre | Rue Lafayette Studio | 286 | 52 | 18.2 | 1 | 120 München Fulfilment Centre | Ostwind Mode | 244 | 42 | 17.2 | 1 | 120 Exeter Fulfilment Centre | Kayak Corner | 173 | 40 | 23.1 | 1 | 120 København Fulfilment Centre | Oakhurst Tailoring | 216 | 39 | 18.1 | 1 | 120 Dortmund Fulfilment Centre | Gratlinie Outdoor | 219 | 37 | 16.9 | 1 | 120 Arnhem Fulfilment Centre | Noordzee Surfwear | 199 | 35 | 17.6 | 0 | 120 Boulogne-Billancourt Fulfilment Centre | Atelier Nouveau | 209 | 35 | 16.7 | 1 | 120 San Francisco Fulfilment Centre | Cinder Peak Sports Co. | 262 | 33 | 12.6 | 1 | 120 Delft Fulfilment Centre | Lumen Collective | 153 | 30 | 19.6 | 0 | 120 Nice Fulfilment Centre | Maison Clair | 157 | 30 | 19.1 | 0 | 120 Trondheim Fulfilment Centre | Fjordline Wear | 209 | 30 | 14.4 | 0 | 120 Oslo Fulfilment Centre | Brick & Bobbin | 151 | 27 | 17.9 | 0 | 120 Seattle Fulfilment Centre | Meadow Row | 138 | 24 | 17.4 | 0 | 120 Manchester Fulfilment Centre | Little Larch Kids | 113 | 23 | 20.4 | 0 | 120 Odense Fulfilment Centre | Fell & Fjell | 135 | 23 | 17.0 | 1 | 120 Hamburg Fulfilment Centre | Ampfeld Elektronik | 145 | 23 | 15.9 | 1 | 120 Berlin Fulfilment Centre | Strandgut | 95 | 22 | 23.2 | 0 | 120 København Fulfilment Centre | Paddock & Pine | 102 | 21 | 20.6 | 0 | 120 Groningen Fulfilment Centre | Velo Noord | 134 | 20 | 14.9 | 1 | 120 Wiesbaden Fulfilment Centre | Kiezkind | 87 | 19 | 21.8 | 0 | 120 Buffalo Fulfilment Centre | Greyfriars Supply | 123 | 19 | 15.4 | 0 | 120 Utrecht Fulfilment Centre | Saltmarsh Knitwear | 125 | 18 | 14.4 | 0 | 120 Stockholm Fulfilment Centre | Halden Boots | 85 | 16 | 18.8 | 0 | 120 Hamburg Fulfilment Centre | Seilschaft | 86 | 16 | 18.6 | 0 | 120 Berlin Fulfilment Centre | Wiesgrund Wohnen | 71 | 15 | 21.1 | 1 | 120 Amsterdam Fulfilment Centre | Linden & Loom | 76 | 13 | 17.1 | 1 | 120 Rotterdam Fulfilment Centre | Ridgeback Gear | 87 | 13 | 14.9 | 0 | 120 Trondheim Fulfilment Centre | Courtside Collective | 58 | 12 | 20.7 | 0 | 120 Dublin Fulfilment Centre | Basecamp Nord | 59 | 12 | 20.3 | 0 | 120 Philadelphia Fulfilment Centre | Silverthread | 59 | 12 | 20.3 | 0 | 120 Köln Fulfilment Centre | Brennquell Kaffee | 76 | 12 | 15.8 | 1 | 120 Leiden Fulfilment Centre | Northstar Watches | 46 | 11 | 23.9 | 0 | 120 Galway Fulfilment Centre | Ballycorran Industrial Supply | 57 | 10 | 17.5 | 1 | 120 Amsterdam Fulfilment Centre | Trailmark | 65 | 10 | 15.4 | 0 | 120 Birmingham Fulfilment Centre | Folio & Fern | 42 | 9 | 21.4 | 0 | 120 Rotterdam Fulfilment Centre | Pedal & Pine | 43 | 9 | 20.9 | 0 | 120 Nürnberg Fulfilment Centre | Wohnglück | 54 | 9 | 16.7 | 1 | 120 Liège Fulfilment Centre | Spice Route Box | 39 | 8 | 20.5 | 1 | 120 Odense Fulfilment Centre | Nordic Bloom Cosmetics | 45 | 8 | 17.8 | 1 | 120 Bromley Fulfilment Centre | Kibblewick | 48 | 8 | 16.7 | 1 | 120 Cork Fulfilment Centre | Kestrel Denim | 27 | 7 | 25.9 | 0 | 120 Houston Fulfilment Centre | Feather & Fin | 38 | 7 | 18.4 | 0 | 120 Augsburg Fulfilment Centre | Hautnah | 42 | 7 | 16.7 | 0 | 120 Paris Fulfilment Centre | Bijoux Lune | 45 | 7 | 15.6 | 0 | 120 Göteborg Fulfilment Centre | Coastline Interiors | 46 | 7 | 15.2 | 0 | 120 (50 rows)