Bucket Local Time In Code Not In SQL

Group events by local hour or local day in application code from one raw scan, not in SQL — the engine's local-time modifier answers from the process time zone rather than the user's, and four local-time aggregates mean four scans that can disagree with each other. Covers where the line sits between an aggregate that belongs in SQL and one that does not, and what the single scan has to return to stay correct. Use when an hour-of-day or weekday chart differs between platforms or between a device and a desktop build, when adding a fourth "group by day" query, or before writing a date function into a query string.

maxrave-dev 5c47254 6.7 KB Updated

File contents

maxrave-dev/kotlin-footguns/tree/main/skills/bucket-local-time-in-code-not-in-sql commit 5c472547a1

Frequently asked questions

npx skillmds@latest add maxrave-dev/bucket-local-time-in-code-not-in-sql