Comando SQL:
SELECT message, count(message) as amount
FROM `messages`
WHERE LENGTH(message) >= 4 AND amount < 30 AND message != '#ddd' AND message != 'ddd'
GROUP BY message
ORDER BY amount DESC
LIMIT 3
#1054 - Unknown column 'amount' in 'where clause'
por que ele nao identifica o amount sendo que ele foi definito logo no inicio?