New
The new LENGTH() function lets you calculate the length of strings directly in queries, using either "bytes" or "chars" for units.
Both will evaluate to the same thing for ascii strings, but very different values for multi-byte UTF-8 characters:
# Length of an ASCII string
LENGTH("hello", "bytes") # == 5
LENGTH("hello", "chars") # == 5
# .. and an emoji
LENGTH("🏳️🌈", "bytes") # == 14
LENGTH("🏳️🌈", "chars") # == 1