clean_email(email)
Converts an <email> address to lowercase and removes any sub-address (also known as plus addressing).
CREATE OR REPLACE FUNCTION `justfunctions.eu.clean_email`(`email` STRING)
RETURNS STRING AS (LOWER(justfunctions.eu.remove_email_plus_address(email)))
OPTIONS ( description = '''Converts an <email> address to lowercase and removes any sub-address (also known as plus addressing).''')
Example
SELECT `justfunctions.eu.clean_email`("HeLLo+other@gmail.com")
hello@gmail.com