I need to fetch the Maximum value from a table column and parse same (i.e. this maximum value as a parameter) to the same column for subtraction in an added (new) column (called difference):
Example:
Month_number
5
6
7
8
9
5
5
6
I need to take the Maximum value "9" of the month_number field and use this(9) a parameter to subtract each record of the same column to then get a new column called "difference" like this:
Difference
4
3
2
1
0
4
4
3