BINARY_REPRESENTATION
All functions > BUSINESS_ACTIVITY > BINARY_REPRESENTATION
Returns the binary representation as a string of the given activity bits
Syntax
BINARY_REPRESENTATION(activity_bits: BIGINT) → VARCHAR
sql
Arguments
Parameter | Type | Required | Description |
---|---|---|---|
activity_bits | BIGINT | Yes | Bit-packed activity representation |
Returns
VARCHAR - Binary string representation of activity bits
Notes
- Converts activity bits to binary string for visualization
- Each character is '1' (active) or '0' (inactive)
- Rightmost character = most recent day (bit 0)
- Useful for debugging and visual inspection
- Example: '1010011' = active days 0, 1, 4, 6
- Helps understand bit-packed format
- Not for performance-critical queries