vendredi 6 mars 2015

Getting the difference of the value of two rows which have the same value in another row

I have the following table:



(table from a previous query)
count(method) top_url Tor

4 http://ift.tt/1beNwMS Tor
4 http://ift.tt/1beNwMS NoTor
5 http://thebay.ca Tor
119 http://thebay.ca NoTor
10 http://test.com Tor
5 http://test.com NoTor


I would like to get the difference between each rows from the same top_url. And if possible, I would like to get the absolute value (remove the minus sign if there is one).


The output of the previous table would be:



Diff top_url

0 http://ift.tt/1beNwMS
114 http://thebay.ca
5 http://test.com

Aucun commentaire:

Enregistrer un commentaire