Re: [GENERAL] Get sum of sums

2016-05-03 Thread John R Pierce
On 5/3/2016 12:48 PM, Steve Clark wrote: I have the following table that has netflow data. I can get the top ten receivers by the query below - but I would also like to get at the same time a grand total of the RX Bytes. I am not exactly sure how to do it. This is with version 8.4. select ip_d

Re: [GENERAL] Get sum of sums

2016-05-03 Thread David G. Johnston
On Tue, May 3, 2016 at 12:57 PM, Victor Yegorov wrote: > 2016-05-03 22:48 GMT+03:00 Steve Clark : > >> select ip_dst as "Receiver" ,sum(bytes) as "RX Bytes" from acct_v9 where >> stamp_inserted >= '2016-04-26' and stamp_inserted <= '2016-04-30' and >> tag=246 group by ip_dst order by "RX Bytes"

Re: [GENERAL] Get sum of sums

2016-05-03 Thread Victor Yegorov
2016-05-03 22:48 GMT+03:00 Steve Clark : > select ip_dst as "Receiver" ,sum(bytes) as "RX Bytes" from acct_v9 where > stamp_inserted >= '2016-04-26' and stamp_inserted <= '2016-04-30' and > tag=246 group by ip_dst order by "RX Bytes" desc limit 10; SELECT ip_dst AS "Receiver", sum(bytes) AS