![]() |
|
Archives of the TeradataForumMessage Posted: Wed, 06 Feb 2008 @ 23:37:48 GMT
This is how I would do it:
select rateid,
name,
rate
from rates
qualify .1653 between amount and
max(amount) over(partition by name
order by amount
rows between 0 preceding
and 1 following)
Regards, Michael Larkins
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||