Skip to content

event_logs: Reduce query expression duplication

Warren Gifford requested to merge ef/refactor-event-logs into main

Created by: efritz

Some of these expressions are hard to remember, so I'm going to define them in one place.

  • our DATE_TRUNC usage works as expected for days and months, but for weeks we need to do some clock arithmetic so that it starts on sunday, not monday
  • user id expressions are also a bit tricky and are repeated more than necessary

Merge request reports

Loading