|
|
|
|
|
|
| Author |
Message |
sim *nix forums beginner
Joined: 19 Aug 2005
Posts: 39
|
Posted: Thu Jul 20, 2006 11:36 am Post subject:
Re: analytic function
|
|
|
Billou schrieb:
| Quote: | Hi,
using a select like:
select max(date) over (partition by...)
how can I retrieve a value from the same row than the max(date) ?
For example, how can I find the price value for the max(date) over that
partition ?
thank you
|
You could select not only the max(date) but also the key of the record
with max(date) using a group by and then join it with the table.
Something like this:
select a.price
from
your_table a,
(
select key
max(date)
from your_table
) b
where a.key = b.key
Regards,
Jörg |
|
| Back to top |
|
 |
Billou *nix forums beginner
Joined: 23 Jun 2006
Posts: 1
|
Posted: Fri Jun 23, 2006 6:08 am Post subject:
analytic function
|
|
|
Hi,
using a select like:
select max(date) over (partition by...)
how can I retrieve a value from the same row than the max(date) ?
For example, how can I find the price value for the max(date) over that
partition ?
thank you |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Fri Nov 21, 2008 7:00 am | All times are GMT
|
|
Loans | Personal Loans | Samsung | MPAA | Mortgage Calculator
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|