Awesome! Sometimes we want to know, for example, how old a person was on the day of their death. We will use another syntax of the
Note that the
start_timestamp is counter-intuitively the second argument.
The query below returns an interval of time between withdrawn timestamp and launched timestamp:
SELECT AGE(withdrawn_timestamp, launched_timestamp)
WHERE id = 9;
|1 years 7 mons 18 days 17 hours 26 mins 0.00 secs
The returned result is the actual difference between the time this aircraft was launched and the time it was withdrawn. The result of the
AGE() is the interval.