use of age() function postgres I am trying to calculate the time since an event took place. The event timestamp will itself be the result of a MIN aggregate function. Is there a way to do this.
I have run a query to get the earliest date in my table which
SELECT MIN(date_column) FROM table 

I also know that
AGE(timestamp '2015-10-5')

will give me the time elapsed since 5th Oct 2015. Is there a way to pass the result of the MIN query to the age function to find the length of time since that event?
You can do a AGEfrom you MIN date


CREATE tABLE &quot;table1&quot; (date_column timestamp)




INSERT INTO &quot;table1&quot; VALUES ( NOW())




SELECT AGE(MIN(date_column)) FROM &quot;table1&quot; 




| age              |
| :--------------- |
| -12:07:06.199423 |


db&lt;&gt;fiddle here