I have a query
SELECT GROUP, VALUE, UNIXTIME FROM TABLE1
that returns a table that looks like this:
GROUP    VALUE    UNIXTIME
A        866      1522540800
A        123      1525132800
A        100      1527811200
A        85       1530403200
A        77       1533081600
A        65       1535760000
B        376      1522540800
B        66       1525132800
B        45       1527811200
B        58       1530403200
B        42       1533081600
C        481      1522540800
C        68       1525132800
C        77       1527811200
C        50       1530403200
D        792      1522540800
D        126      1525132800
D        84       1527811200
E        1297     1522540800
E        203      1525132800
F        882      1522540800
How can I get a result that returns the same result, but where each row is divided by the first value in its own group.
So for example VALUE on
- row1 should be 866/866 = 1
- row2 should be 123/866 = 0.142
- row3 = 100/866 = 0.115
- Value on row7 (first row of group B) should be 376/376=1
- row8 should be 66/376 = 0.176 etc
 
     
     
    