Skip to content

Conversation

mariusandra
Copy link
Collaborator

Changes

Support syntax like interval 1 month to be able to make queries like:

   select event,
          properties.$geoip_country_name as `Country Name`,
          count() as `Event count`
     from events
    where timestamp > now() - interval 1 month
 group by event,
          properties.$geoip_country_name
 order by count() desc
    limit 100

Currently you'd have to write toIntervalMonth(1), which is supported, but does not look that good.

How did you test this code?

Added tests. Tested in the browser.

@mariusandra mariusandra merged commit 9a6da61 into master Feb 22, 2023
@mariusandra mariusandra deleted the hogql-interval branch February 22, 2023 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants