Re: [SQL] Advice returning data as an array

2009-08-26 Thread Erik Jones
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

[SQL] Advice returning data as an array

2009-08-20 Thread George Woodring
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