About this question
I have a table where
date | interval
juin 1, 2022, 12:00 AM | 0 years 0 mons 0 days 0 hours 1 mins 58.963179 secs
juin 2, 2022, 12:00 AM | 0 years 0 mons 0 days 0 hours 2 mins 34.083955 secs
juin 3, 2022, 12:00 AM | 0 years 0 mons 0 days 0 hours 2 mins 51.152488 secs
etc...
I want to cast the interval to have a timestamp. I am in postresql
SELECT
DATE_TRUNC('day', "order_date") as date_authorised,
avg("difference") AS "avg_time"
FROM "test"
where date_trunc('day',order_date)GROUP BY DATE_TRUNC('day', "order_date")
that's my code