I need to use the computed values (after 'as' keyword) of two functions in sql in the next statement. I want to use it because the time of computations decreases x2 in this case.
I have the following statement:
SELECT f1() as f_1, f2() as f_2, f_1 - f_2 as f1_minus_f2 FROM mytable
where f1(), f2() - some functions