> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firebolt.io/llms.txt
> Use this file to discover all available pages before exploring further.

> Reference material for AGO function

# AGO

Subtracts the specified interval from the current timestamp, and returns it as a `TIMESTAMPTZ` value.
For more information, see [Arithmetic with intervals](/reference-sql/lexical-structure/operators#arithmetic-with-date%2Ftime-and-intervals).

## Syntax

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
AGO(<interval>)
```

## Parameters

| Parameter    | Description                                                         |
| :----------- | :------------------------------------------------------------------ |
| `<interval>` | The `interval` as a literal to subtract from the current timestamp. |

## Return Type

`TIMESTAMPTZ`

## Example

The following example assumes that the current Unix timestamp is `2023-03-03 14:42:31.123456 UTC`.

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SET time_zone = 'Europe/Berlin';
SELECT CURRENT_TIMESTAMP;  --> 2023-03-03 15:42:31.123456+01
SELECT AGO('1h');  --> 2023-03-03 14:42:31.123456+01
```
