Re: [SQL] value from max row in group by

2013-07-25 Thread Venky Kandaswamy
stts_offset desc) from table group by stts_id; Venky Kandaswamy Principal Engineer, Adchemy Inc. 925-200-7124 From: pgsql-sql-ow...@postgresql.org on behalf of Gary Stainburn Sent: Thursday, July 25, 2013 10:57 AM To

Re: [SQL] How to split an array-column?

2013-03-18 Thread Venky Kandaswamy
You can try select id, unnest(array_col) from table Venky Kandaswamy Principal Engineer, Adchemy Inc. 925-200-7124 From: pgsql-sql-ow...@postgresql.org [pgsql-sql-ow...@postgresql.org] on behalf of

Re: [SQL] Aggregate over a linked list

2013-01-17 Thread Venky Kandaswamy
Did you try: select substring(contract from 1 for 1), min(entry_date), max(entry_date), sum(profit) from contract_table group by 1; Venky Kandaswamy Principal Engineer, Adchemy Inc. 925-200-7124 From: pgsql-sql-ow

Re: [SQL] Curious problem of using BETWEEN with start and end being the same versus EQUALS '='

2013-01-15 Thread Venky Kandaswamy
(our system generates queries on the fly) to work around this problem. Venky Kandaswamy Principal Engineer, Adchemy Inc. 925-200-7124 From: Tom Lane [t...@sss.pgh.pa.us] Sent: Tuesday, January 15, 2013 2:30 PM To

[SQL] Curious problem of using BETWEEN with start and end being the same versus EQUALS '='

2013-01-15 Thread Venky Kandaswamy
a.page_group, a.page, a.int_alloc_type, b.vcset, a.componentset, a.adc_visit, b.eventvalueset, b.eventcountset, bicommon.get_value('browserfamily'::text, b.vcset), bicommon.get_value('trafficsource'::text, b.vcset), bicommon.get_value('e671_hl_p1'::text, a.componentse