Skip to content

Counts the number of bits set to 1 in the bitmap by performing a logical AND operation.

func.bitmap_and_count( <bitmap> )
func.bitmap_and_count(to_bitmap('1, 3, 5'))
┌─────────────────────────────────────────────┐
│ func.bitmap_and_count(to_bitmap('1, 3, 5')) │
├─────────────────────────────────────────────┤
3
└─────────────────────────────────────────────┘
BITMAP_AND_COUNT( <bitmap> )
SELECT BITMAP_AND_COUNT(TO_BITMAP('1, 3, 5'));
┌────────────────────────────────────────┐
│ bitmap_and_count(to_bitmap('1, 3, 5')) │
├────────────────────────────────────────┤
3
└────────────────────────────────────────┘