i'm not sure what you're asking either...
maybe it is whether you can refer to that alias in the WHERE clause? the answer is no
this is not allowed --
Code:
SELECT some_complicated_expression AS my_alias
FROM ...
WHERE my_alias = 'some value'
here, the complicated expression might involve functions, calculations, and so on, and the intention is to return only rows where the expression evaluates to some specific value
unfortunately you can't use the alias in the WHERE clause (which is why you see some people using HAVING instead, where it is allowed, but without a GROUP BY, which is an abomination if you ask me, but that's a different thread)
of course, repeating the complicated expression in the WHERE clause works, but it's rather ungainly
the easy way to get around this limitation is to push the expression down into a subquery --
Code:
SELECT my_alias
FROM ( SELECT some_complicated_expression AS my_alias
FROM ... ) AS derived_table
WHERE my_alias = 'some value'
