> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# bitmap_and

> Calculates the intersection of two input bitmaps and returns the new bitmap.

Calculates the intersection of two input bitmaps and returns the new bitmap.

## Syntax

```Haskell theme={null}
BITMAP BITMAP_AND(BITMAP lhs, BITMAP rhs)
```

## Examples

```plain text theme={null}
MySQL > select bitmap_count(bitmap_and(to_bitmap(1), to_bitmap(2))) cnt;
+------+
| cnt  |
+------+
|    0 |
+------+

MySQL > select bitmap_count(bitmap_and(to_bitmap(1), to_bitmap(1))) cnt;
+------+
| cnt  |
+------+
|    1 |
+------+
```

## keyword

BITMAP\_AND,BITMAP


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.