- 카테고리:
:doc:`/sql-reference/functions-aggregation`(카디널리티 추정), :doc:`윈도우 함수 </sql-reference/functions-window-syntax>`(카디널리티 추정)
HLL_ESTIMATE¶
주어진 HyperLogLog 상태에 대한 카디널리티 추정값을 반환합니다.
HLL_ACCUMULATE 및 HLL_COMBINE 에 의해 생성된 HyperLogLog 상태는 HLL_ESTIMATE 함수를 사용하여 카디널리티 추정치를 계산하는 데 사용할 수 있습니다.
따라서 HLL_ESTIMATE(HLL_ACCUMULATE(…))는 HLL(…)와 동일합니다.
- 참고 항목:
구문¶
집계 함수
윈도우 함수
OVER 절에 대한 자세한 내용은 윈도우 함수 구문 및 사용법 섹션을 참조하세요.
인자¶
stateHLL_ACCUMULATE 또는 HLL_COMBINE 호출에 의해 생성된 상태 정보를 포함하는 식입니다.
사용법 노트¶
예¶
This example shows how to use the three related functions HLL_ACCUMULATE, HLL_ESTIMATE, and HLL_COMBINE.
간단한 테이블과 데이터를 만듭니다.
Create a table that contains the “state” that represents the current
approximate cardinality information for the table named sequence_demo:
Now create a second table and add data. (In a more realistic situation, the user could have loaded more data into the first table and divided the data into non-overlapping sets based on the time that the data was loaded.)
새 데이터에 대한 “상태” 정보만 가져옵니다.
행의 두 배치에 대한 “상태” 정보를 결합합니다.
결합된 행 세트의 대략적인 카디널리티를 가져옵니다.