Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Blog
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
Yandex project
© 2023 Intertech Services AG
Yandex DataLens
  • Getting started
  • Tutorials
  • Concepts
  • Step-by-step guides
  • Access management
  • Pricing policy
  • Visualization reference
  • Function reference
    • All Functions
    • Aggregate functions
      • Overview
      • ALL_CONCAT
      • ANY
      • ARG_MAX
      • ARG_MIN
      • AVG
      • AVG_IF
      • COUNT
      • COUNTD
      • COUNTD_APPROX
      • COUNTD_IF
      • COUNT_IF
      • MAX
      • MEDIAN
      • MIN
      • QUANTILE
      • QUANTILE_APPROX
      • STDEV
      • STDEVP
      • SUM
      • SUM_IF
      • TOP_CONCAT
      • VAR
      • VARP
    • Array functions
    • Date/Time functions
    • Logical functions
    • Mathematical functions
    • Operators
    • String functions
    • Text markup functions
    • Time series functions
    • Type conversion functions
    • Window functions
    • Function Availability
  • Function tutorials
  • Courses
  • Troubleshooting
    • Questions and answers
    • DataLens errors
  1. Function reference
  2. Aggregate functions
  3. COUNT

COUNT

Written by
Yandex Cloud
,
improved by
amatol

Function COUNT is also found in the following categories: Window functions.

Syntax

Standard
Extended
COUNT(  [ value ] )
COUNT(  [ value ]
       [ FIXED ... | INCLUDE ... | EXCLUDE ... ]
       [ BEFORE FILTER BY ... ]
     )

More info:

  • FIXED, INCLUDE, EXCLUDE
  • BEFORE FILTER BY

Description

Returns the number of items in the group.

Argument types:

  • value — Any

Return type: Integer

Examples

COUNT()
COUNT([OrderID])

Data source support

ClickHouse 19.13, Microsoft SQL Server 2017 (14.0), MySQL 5.6, Oracle Database 12c (12.1), PostgreSQL 9.3, YDB.

Was the article helpful?

Language / Region
Yandex project
© 2023 Intertech Services AG