Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex DataLens
  • DataLens neuroanalyst
    • Overview
    • Formula syntax
    • Neuroanalyst for creating calculated fields
      • All Functions
        • Overview
        • ARRAY
        • ARR_AVG
        • ARR_DISTINCT
        • ARR_INDEX_OF
        • ARR_INTERSECT
        • ARR_MAX
        • ARR_MIN
        • ARR_PRODUCT
        • ARR_REMOVE
        • ARR_STR
        • ARR_SUM
        • CAST_ARR_FLOAT
        • CAST_ARR_INT
        • CAST_ARR_STR
        • CONTAINS
        • CONTAINS_ALL
        • CONTAINS_ANY
        • CONTAINS_SUBSEQUENCE
        • COUNT_ITEM
        • GET_ITEM
        • LEN
        • REPLACE
        • SLICE
        • STARTSWITH
        • UNNEST
      • Function Availability
    • Parameters
  • DataLens Gallery
  • Audit Trails events
  1. Calculated fields
  2. Function reference
  3. Array functions
  4. ARR_DISTINCT

ARR_DISTINCT

Written by
Yandex Cloud
Updated at December 19, 2025

SyntaxSyntax

ARR_DISTINCT( array )

DescriptionDescription

Removes duplicate elements from an array array, returning a new array with only unique elements. The order of elements in the returned array is not guaranteed to be the same as the input array.

Argument types:

  • array — Array of fractional numbers | Array of integers | Array of strings

Return type: Same type as (array)

ExamplesExamples

ARR_DISTINCT(ARRAY(1, 2, 2, 3, 3, 3, 4)) = [1, 2, 3, 4]
ARR_DISTINCT(ARRAY(1.1, 2.2, 2.2, 3.3, 3.3, 3.3, 4.4)) = [1.1, 2.2, 3.3, 4.4]
ARR_DISTINCT(ARRAY('apple', 'banana', 'apple', 'orange', 'banana')) = ['apple', 'banana', 'orange']

Data source supportData source support

ClickHouse 21.8, Files, Google Sheets, PostgreSQL 9.3, Trino, Yandex Documents.

Was the article helpful?

Previous
ARR_AVG
Next
ARR_INDEX_OF
© 2025 Direct Cursus Technology L.L.C.