1

I have one table with a few columns (and around 9000 rows) see below. Now I would like to calculate the positive difference from R where Xn has the same value and when Xn has the same value as Yn.

enter image description here

So the search should take place within the column xn first where there is a value the same like in this example, value 1 then the R-diff should be calculated. After that the xn-value should be compared with the yn-value, when these values are the same the R-diff should be calculated. Is this possible with sql, i tried a few things but so far could not figure it out...?

Samane
  • 989
  • 6
  • 23
maria
  • 11
  • 1

0 Answers0