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

# aggregate_unique

### aggregate\_unique

<ul>
  <li>
    aggregate\_unique(\
    &#x20;table\_name: string,\
    &#x20;column\_name: string,\
    &#x20;offset?: number,\
    &#x20;limit?: number,\
    &#x20;options?: Record\<string, string>,\
    &#x20;callback?: [GPUdbCallback](https://docs.kinetica.com/content/api/typescript/types/GPUdbCallback.md),\
    ): Promise\<[AggregateUniqueResponse](https://docs.kinetica.com/content/api/typescript/interfaces/AggregateUniqueResponse.md)>

    Returns all the unique values from a particular column (specified by `column_name`) of a particular table or view (specified by `table_name`). If `column_name` is a numeric column, the values will be in `binary_encoded_response`. Otherwise if `column_name` is a string column, the values will be in `json_encoded_response`. The results can be paged via `offset` and `limit` parameters.

    ```
    {"limit":"10","sort_order":"descending"}
    ```

    The response is returned as a dynamic schema. For details see: dynamic schemas documentation.If a result\_table name is specified in the `options`, the results are stored in a new table with that name--no results are returned in the response. Both the table name and resulting column name must adhere to standard naming conventions; any column expression will need to be aliased. If the source table's shard key is used as the `column_name`, the result table will be sharded, in all other cases it will be replicated. Sorting will properly function only if the result table is replicated or if there is only one processing node and should not be relied upon in other cases. Not available if the value of `column_name` is an unrestricted-length string.

    #### Parameters

    <ul>
      <li>
        table\_name: string

        Name of an existing table or view on which the operation will be performed, in \[schema\_name.]table\_name format, using standard name resolution rules.
      </li>

      <li>
        column\_name: string

        Name of the column or an expression containing one or more column names on which the unique function would be applied.
      </li>

      <li>
        `Optional`offset: number

        A positive integer indicating the number of initial results to skip (this can be useful for paging through the results).
      </li>

      <li>
        `Optional`limit: number

        A positive integer indicating the maximum number of results to be returned, or END\_OF\_SET (-9999) to indicate that the maximum number of results allowed by the server should be returned. The number of records returned will never exceed the server's own limit, defined by the max\_get\_records\_size parameter in the server configuration. Use `has_more_records` to see if more records exist in the result to be fetched, and `offset` and `limit` to request subsequent pages of results.
      </li>

      <li>
        `Optional`options: Record\<string, string>

        Optional parameters.
      </li>

      <li>
        `Optional`callback: [GPUdbCallback](https://docs.kinetica.com/content/api/typescript/types/GPUdbCallback.md)

        Optional callback function
      </li>
    </ul>

    #### Returns Promise\<[AggregateUniqueResponse](https://docs.kinetica.com/content/api/typescript/interfaces/AggregateUniqueResponse.md)>

    Promise\<Types.AggregateUniqueResponse> - Promise resolving to the response

    <ul>
      <li>Defined in [src/GPUdb.ts:3891](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/GPUdb.ts#L3891)</li>
    </ul>
  </li>
</ul>

### aggregate\_unique\_request

<ul>
  <li>
    aggregate\_unique\_request(\
    &#x20;request: [AggregateUniqueRequest](https://docs.kinetica.com/content/api/typescript/interfaces/AggregateUniqueRequest.md),\
    &#x20;callback?: [GPUdbCallback](https://docs.kinetica.com/content/api/typescript/types/GPUdbCallback.md),\
    ): Promise\<[AggregateUniqueResponse](https://docs.kinetica.com/content/api/typescript/interfaces/AggregateUniqueResponse.md)>

    Returns all the unique values from a particular column (specified by `column_name`) of a particular table or view (specified by `table_name`). If `column_name` is a numeric column, the values will be in `binary_encoded_response`. Otherwise if `column_name` is a string column, the values will be in `json_encoded_response`. The results can be paged via `offset` and `limit` parameters.

    ```
    {"limit":"10","sort_order":"descending"}
    ```

    The response is returned as a dynamic schema. For details see: dynamic schemas documentation.If a result\_table name is specified in the `options`, the results are stored in a new table with that name--no results are returned in the response. Both the table name and resulting column name must adhere to standard naming conventions; any column expression will need to be aliased. If the source table's shard key is used as the `column_name`, the result table will be sharded, in all other cases it will be replicated. Sorting will properly function only if the result table is replicated or if there is only one processing node and should not be relied upon in other cases. Not available if the value of `column_name` is an unrestricted-length string.

    #### Parameters

    <ul>
      <li>
        request: [AggregateUniqueRequest](https://docs.kinetica.com/content/api/typescript/interfaces/AggregateUniqueRequest.md)

        Request object containing the parameters for the operation
      </li>

      <li>
        `Optional`callback: [GPUdbCallback](https://docs.kinetica.com/content/api/typescript/types/GPUdbCallback.md)

        Optional callback function
      </li>
    </ul>

    #### Returns Promise\<[AggregateUniqueResponse](https://docs.kinetica.com/content/api/typescript/interfaces/AggregateUniqueResponse.md)>

    Promise\<Types.AggregateUniqueResponse> - Promise resolving to the response

    <ul>
      <li>Defined in [src/GPUdb.ts:3829](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/GPUdb.ts#L3829)</li>
    </ul>
  </li>
</ul>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.