A plate can map to multiple tracksolid.devices rows (vehicle re-fitted with a
new tracker), so the plain LEFT JOIN fanned out and double-counted litres/spend
(3345 view rows for 1888 live records). LATERAL ... ORDER BY enabled_flag,
updated_at LIMIT 1 picks one device per fill. Applied to prod as migration 02;
01 updated so fresh installs are correct. Verified: 1888 rows, 1775 matched.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>