# AGGREGATOR\_ID

Returns the unique ID (`node_id`) for the current aggregator.

When you do not know the specific aggregator you are connecting to, either because you are connecting via the DML endpoint in SingleStore Helios or in situations where a load balancer is used, the ID returned by `AGGREGATOR_ID()` can be combined with `CONNECTION_ID()` to provide a cluster-wide unique identifier for the active session.

## Syntax

```sql
AGGREGATOR_ID()
```

## Return Type

Integer.

## Example

```sql
SELECT AGGREGATOR_ID();

```

```output

+-----------------+
| AGGREGATOR_ID() |
+-----------------+
|               8 |
+-----------------+
```

***

Modified at: November 8, 2023

Source: [/db/v9.1/reference/sql-reference/information-functions/aggregator-id/](https://docs.singlestore.com/db/v9.1/reference/sql-reference/information-functions/aggregator-id/)

(An index of the documentation is available at /llms.txt)
