count

count 함수는 그룹 내 행 수를 반환합니다. 데이터에서 특정 그룹의 개수를 가져오기 위해 match와 함께 자주 사용됩니다.

구문 매개변수 데이터 유형 반환 유형
count(expression) STRING NUMBER

코드 샘플

  • 시간 경과에 따른 성공적인 사용자 로그인 수를 반환합니다.

    metadata.event_type = "USER_LOGIN"
    $security_result = security_result.action
    $security_result = "ALLOW"
    $date = timestamp.get_date(metadata.event_timestamp.seconds, "America/Los_Angeles")
    match:
        $security_result, $date
    outcome:
        $event_count = count(metadata.id)