blob: d92d2a9385c83f15736766ac775e03630b00fa40 [file] [view]
---
{
"title": "BITMAP_COUNT",
"language": "en",
"description": "Count the number of elements in the input BITMAP"
}
---
## Description
Count the number of elements in the input BITMAP
## Syntax
```sql
BITMAP_COUNT(<bitmap>)
```
## Parameters
| Parameter | Description |
|------------|-------------|
| `<bitmap>` | a BITMAP |
## Return Value
Returns an integer
## Examples
```sql
select bitmap_count(to_bitmap(1)) cnt;
```
```text
+------+
| cnt |
+------+
| 1 |
+------+
```
```sql
select bitmap_count(bitmap_empty()) cnt;
```
```text
+------+
| cnt |
+------+
| 0 |
+------+
```