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 a single query can only return a set of rows with the same fields. your grand total of RX Bytes is a scalar value. I mean, I *suppose* you could generate it as an additional query with a union, something like this... 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 10unionselect 'Total' as "Reciever", sum(bytes) as "RX Bytes" from acct_v9 where stamp_inserted >= '2016-04-26' and stamp_inserted <= '2016-04-30' and tag=246;
-- john r pierce, recycling bits in santa cruz |