Return email and length (the number of characters) for customers whose email is longer than 27 characters, longest first, then alphabetically by email.
Hint 1
LENGTH(email) counts characters.
Reference solution
SELECT email, LENGTH(email) AS length
FROM customers
WHERE LENGTH(email) > 27
ORDER BY length DESC, email;
Functions can be used in SELECT, WHERE and ORDER BY. You cannot use the alias length in the WHERE of the same query, because WHERE runs before the select list is evaluated, so the expression is repeated there; ORDER BY runs later and can use the alias.