I have a table like this
source | destination | frequency
-------------------------------------
a | b | 4
a | c | 2
b | c | 1
b | a | 3
and I would like to divide the frequency by the sum of frequency grouped by the source. Therefore, I am looking for a table like
source | destination | frequency
-------------------------------------
a | b | 4/6
a | c | 2/6
b | c | 1/4
b | a | 3/4
Is there any way to do this in a single sql query?