On Aug 20, 2009, at 5:07 AM, George Woodring wrote:
I have the following query that works the way I need:
SELECT '20090812' AS date, sum(in_oct) AS bytes, sum(in_pkt) AS
pkts, 'appl' AS name, ARRAY['appl'] AS fields, CAST((LEAST(src_port,
dst_port)) AS varchar) as fieldVal FROM flow_histor
I have the following query that works the way I need:
SELECT '20090812' AS date, sum(in_oct) AS bytes, sum(in_pkt) AS pkts, 'appl'
AS name, ARRAY['appl'] AS fields, CAST((LEAST(src_port, dst_port)) AS
varchar) as fieldVal FROM flow_history.flows_20090812 GROUP BY fieldVal
ORDER BY bytes DESC LIMIT