Is there any way in postgresql to not repeat myself when the same expression is used in select and where blocks?
select (
|/(( power((consumption_2011 - consumption_3y/3), 2)
+ power((consumption_2012 - consumption_3y/3), 2)
+ power((consumption_2013 - consumption_3y/3), 2)
) / 3)) as deviation
from consumption
where (
|/(( power((consumption_2011 - consumption_3y/3), 2)
+ power((consumption_2012 - consumption_3y/3), 2)
+ power((consumption_2013 - consumption_3y/3), 2)
) / 3) > 0.8
)