Hello Bruno,
Yes, we have used the distinct on operator in the past and that works quite
well when you have a single ordering column or multiples which don't
contradict each other. The joins would work, but I was hoping for a simpler
solution as this is sql generated from a general purpose
Hello Berend,
Thanks for the reply. Yes, subselects would work very well and in some ways
are more elegant then the hand waving we had to do to get the multi-column
aggregates to work. The reason we moved away from the subselects is that the
queries tend to be quite complex and all of the
On Thursday 09 March 2006 02:18 pm, Merlin Moncure wrote:
Chris Kratz wrote:
Well for anyone else who may be interested in doing something similar,
here is what we did. It does require typecasting going into the
functions, composite types and using the dot notation to get the value
back
I have to confess I'm not real familiar with rowwise comparisons. Would this
work when you have a large number of rows. For example, give me all
individuals and their income their favorite TV Show the first and last times
they were contacted. ie | Person | First Favorite | Last Favorite |
Chris Kratz [EMAIL PROTECTED] writes:
Thanks for the reply. Yes, subselects would work very well and in some ways
are more elegant then the hand waving we had to do to get the multi-column
aggregates to work.
BTW, there is not any fundamental reason why we can't support aggregate
functions
On Monday 13 March 2006 03:21 pm, Tom Lane wrote:
Chris Kratz [EMAIL PROTECTED] writes:
Thanks for the reply. Yes, subselects would work very well and in some
ways are more elegant then the hand waving we had to do to get the
multi-column aggregates to work.
BTW, there is not any
Tom Lane wrote:
Chris Kratz [EMAIL PROTECTED] writes:
Thanks for the reply. Yes, subselects would work very well and in some ways
are more elegant then the hand waving we had to do to get the multi-column
aggregates to work.
BTW, there is not any fundamental reason why we can't
Hello All,
Is there any way in postgres to have an aggregate that uses input from two
columns without using composite types? The example we are working on is a
first or last aggregate which requires a data value and a date column. The
result would be to find the latest date within the group
Chris Kratz [EMAIL PROTECTED] writes:
Is there any way in postgres to have an aggregate that uses input from two
columns without using composite types?
No.
regards, tom lane
---(end of broadcast)---
TIP 9: In versions
Thanks Tom,
Well for anyone else who may be interested in doing something similar, here is
what we did. It does require typecasting going into the functions, composite
types and using the dot notation to get the value back out of the composite
object returned. But it works.
This is what we
Chris Kratz wrote:
Well for anyone else who may be interested in doing something similar, here is
what we did. It does require typecasting going into the functions, composite
types and using the dot notation to get the value back out of the composite
object returned. But it works.
This is
I may not fully understand your situation but
SELECT distinct grouping,
(SELECT integer_column FROM test.test_agg_last WHERE
grouping=t1.grouping ORDER BY cur_date DESC LIMIT 1) AS last_int,
(SELECT integer_column FROM test.test_agg_last WHERE
grouping=t1.grouping ORDER BY cur_date ASC LIMIT
On Thu, Mar 09, 2006 at 12:56:21 -0500,
Chris Kratz [EMAIL PROTECTED] wrote:
Hello All,
Is there any way in postgres to have an aggregate that uses input from two
columns without using composite types? The example we are working on is a
first or last aggregate which requires a data
13 matches
Mail list logo