[sql] How to use a calculated column to calculate another column in the same view