카테고리:

집계 함수 (Counting Distinct Values) , Window functions (Semi-structured Data Aggregation)

ARRAY_UNIQUE_AGG

지정된 열에서 모든 고유 값을 포함하는 ARRAY 를 반환합니다.

참고 항목:

배열을 사용하여 계층적 집계에 대한 고유 값 계산하기

구문

Aggregate function

ARRAY_UNIQUE_AGG( <column> )
Copy

Window function

ARRAY_UNIQUE_AGG( <column> ) OVER ( [ PARTITION BY <expr> ] )
Copy

For details about the OVER clause, see 윈도우 함수 구문 및 사용법.

인자

column

값이 포함된 열.

반환

The function returns an array containing the distinct values in the specified column. The values in the array are in no particular order, and the order is not deterministic.

The function ignores NULL values in column. If column contains only NULL values or the table containing column is empty, the function returns an empty array.

사용법 노트

  • 이 함수는 다음 유형의 함수 중 하나로 사용할 수 있습니다.

  • 이 함수가 윈도우 함수로 호출되는 경우에는 명시적 윈도우 프레임을 지원하지 않습니다.

  • 이 함수는 입력 인자로 정형 타입 을 지원하지 않습니다.

집계

배열을 사용하여 계층적 집계에 대한 고유 값 계산하기 섹션을 참조하십시오.