Using aggregate functions on alias?
I want to make a query where I am computing the difference between two
columns. Something like:
SELECT a,
b,
a - b as "diff"
FROM ...
Now I would like to calculate the stddev of the "diff" column using
postgresql built-in stddev aggregate function. How can I achieve this?
Thanks.
No comments:
Post a Comment