You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had searched in the issues and found no similar issues.
Version
v1.2.680-p3
What's Wrong?
With the addition of the new INTERVAL data type we attempted to sum interval values to obtain a total duration. However, we are getting the following error:
^^^^^^^^^^^^^^^^^^^^^^^^^ sum does not support type 'Interval'
How to Reproduce?
Create a table with an interval column.
Run a SELECT query that applies a SUM to the interval column.
Are you willing to submit PR?
Yes I am willing to submit a PR!
The text was updated successfully, but these errors were encountered:
It's by design. Most databases, including DuckDB, don’t support summing interval types directly. Could you explain a bit more about why you need to sum interval
We are transitioning over from Postgres/Greenplum where we were able to sum the intervals. The intervals we have represent a time taken for a delay in process and we have been grouping/summing this by other columns to get total delay by e.g. region.
This is also useful for things like tracking different operations in manufacturing or logistics. It is very common to capture the individual durations and then need to provide a total completion duration which is the sum of the parts.
Search before asking
Version
v1.2.680-p3
What's Wrong?
With the addition of the new INTERVAL data type we attempted to sum interval values to obtain a total duration. However, we are getting the following error:
How to Reproduce?
Create a table with an interval column.
Run a SELECT query that applies a SUM to the interval column.
Are you willing to submit PR?
The text was updated successfully, but these errors were encountered: