On Wed, Dec 19, 2012 at 5:28 PM, Robert James srobertja...@gmail.com wrote:
And even better:
An aggregate which will return the first instance that meets a certain
predicate?
Take a look at DISTINCT ON.
--
Sergey Konoplev
Database and Software Architect
http://www.linkedin.com/in/grayhemp
Sergey - That's an interesting option, but I'm not sure how to use it
as an aggregate. Could you give an example?
On 12/20/12, Sergey Konoplev gray...@gmail.com wrote:
On Wed, Dec 19, 2012 at 5:28 PM, Robert James srobertja...@gmail.com
wrote:
And even better:
An aggregate which will return
On Thu, Dec 20, 2012 at 5:45 AM, Robert James srobertja...@gmail.comwrote:
Sergey - That's an interesting option, but I'm not sure how to use it
as an aggregate. Could you give an example?
Here is an example:
buildinghac=
SELECT itemnbr, buildingnbr
FROM Actionitems
ORDER BY
I see. What if I need to do this along with an Aggregate Query. Eg
something like:
SELECT x,y,z, MAX(a), MAX(b), DONT_CARE_AS_LONG_AS_NOT_NULL(c),
DONT_CAR_AS_LONG_AS_P_IS_TRUE(d,p)
...
GROUP BY x,y,z
On 12/20/12, Richard Broersma richard.broer...@gmail.com wrote:
On Thu, Dec 20, 2012 at
On Thu, Dec 20, 2012 at 12:00 PM, Robert James srobertja...@gmail.comwrote:
I see. What if I need to do this along with an Aggregate Query. Eg
something like:
SELECT x,y,z, MAX(a), MAX(b), DONT_CARE_AS_LONG_AS_NOT_NULL(c),
DONT_CAR_AS_LONG_AS_P_IS_TRUE(d,p)
...
GROUP BY x,y,z
ah, I get
On Thu, Dec 20, 2012 at 3:28 AM, Robert James srobertja...@gmail.com wrote:
Is there an aggregate that will return an arbitrary instance? That is,
not necessarily the max or min, just any one? (Which might perform
better than max or min)
More importantly:
Is there one which will return an
Marti Raudsepp ma...@juffo.org writes:
On Thu, Dec 20, 2012 at 3:28 AM, Robert James srobertja...@gmail.com wrote:
Is there an aggregate that will return an arbitrary instance? That is,
not necessarily the max or min, just any one? (Which might perform
better than max or min)
More