You can't reuse an alias defined in the SELECT
clause in the FROM
clause of the scope. You need to either repeat the expression, or use a subquery or CTE.
select dayofweek_iso(timestamp(mycol)) as mynewcol
from mytable
where dayofweek_iso(timestamp(mycol)) = 1
Or:
select *
from (
select dayofweek_iso(timestamp(mycol)) as mynewcol
from mytable
) t
where mynewcol = 1