![]() |
|
Archives of the TeradataForumMessage Posted: Tue, 11 Jan 2005 @ 20:42:50 GMT
RANK () OVER ([PARTITION BY column(s)] ORDER BY column(s) [ASC | DESC]) This will do exactly what you are looking for I believe. It resets the rank back to 1 any time the column(s) in the PARTITION BY portion changes.
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| | |||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||
![]() | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 30 Jun 2008 | |||||||||||||||||||||||||||||||||||||||||||||||||||