calculate positive difference by column common value with sql

المشرف العام

Administrator
طاقم الإدارة
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.



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...?

Thanks in advance, Maria



أكثر...
 
أعلى