influxdb icon indicating copy to clipboard operation
influxdb copied to clipboard

Support Month in Duration Literal for Group by Operation

Open dzaunerOci opened this issue 1 year ago • 2 comments

Issue Summary: In InfluxQL, there's a lack of a built-in duration specifier for months, which makes it challenging to accurately group data into monthly intervals. Currently, users have to resort to approximations using days, which can lead to inaccuracies, especially when dealing with varying month lengths and leap years.

Proposal: I propose adding a month duration literal to InfluxQL to provide users with a more intuitive and precise way to specify monthly intervals in queries. This enhancement would streamline data analysis and reporting workflows, making it easier for users to work with temporal data at the monthly level.

Suggested Syntax: A suggested syntax for the month duration literal could be 1mo, following the conventions used in other date-time libraries and query languages.

dzaunerOci avatar May 15 '24 12:05 dzaunerOci

Is anyone working on this issue? I am looking to start contributing and can look into this with some guidance.

sarthak0906 avatar Aug 05 '24 13:08 sarthak0906

related https://github.com/influxdata/influxdb/issues/3991

shrx avatar Aug 30 '24 14:08 shrx

Just ran across this deficiency today myself. I see Flux now allows months and years. It would be nice to have this in InfluxQL as well.

BigBadaboom avatar Mar 25 '25 21:03 BigBadaboom