개수

count(expression)

설명

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

매개변수 데이터 유형

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)