BINARY_REPRESENTATION

All functions > BUSINESS > BINARY_REPRESENTATION

Returns the binary representation as a string of the given activity bits

Signatures

Returns: Binary string representation of activity bits

BINARY_REPRESENTATION(activity_bits: BIGINT) → VARCHAR
sql
ParameterTypeRequiredDescription
activity_bitsBIGINTYesBit-packed activity representation

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
Last update at: 2026/03/03 16:47:38
Last updated: 2026-03-03 16:48:19