|
Archives of the TeradataForumMessage Posted: Fri, 03 Oct 2008 @ 10:26:36 GMT
Hi, Can anyone please tell me what this query is doing: ,RANK () OVER (PARTITION BY A.CODE, A.DATE, A.TRK_CD, A.CELL_CD, A.VALUE_CD, A.TREATY__CD, A.NUM_R, A.CNTRY, A.IND, A.CYCLE ORDER BY B.ACQS_DATE,B.NUM_R2) My understanding was: For the same A.CODE, A.DATE, A.TRK_CD, A.CELL_CD, A.VALUE_CD, A.TREATY__CD, A.NUM_R, A.CNTRY, A.IND, A.CYCLE The ranking will be on B.ACQS_DATE,B.NUM_R2. When any of the above changes - the ranking will start again for B.ACQS_DATE,B.NUM_R2. But I see ranks being skipped ..like after rank =1, rank= 13... Regards, Shubhangi
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||