Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
I have below query and need to convert to QV.
SELECT
row_number() over(partition by contract_ref order by contract_ref) AS "Row #",contract_ref
from Table;
Data would come like this
contract_ref - Row #
1 - 1
1 - 2
2 - 1
3 - 1
3 - 2
3 - 3
4 - 1
I have to create dimension for "Row #", pls can someone share ideas.
_priya
Data:
Load *,RecNo() as Recno inline
[
A
1
1
2
3
3
3
4];
LEFT JOIN ([Data])
LOAD
Recno
,if(A=previous(A),peek("Row Number")+1,1) as "Row Number"
RESIDENT [Data]
ORDER BY A DESC
;
DROP FIELD Recno
;??
Data:
Load *,RecNo() as Recno inline
[
A
1
1
2
3
3
3
4];
LEFT JOIN ([Data])
LOAD
Recno
,if(A=previous(A),peek("Row Number")+1,1) as "Row Number"
RESIDENT [Data]
ORDER BY A DESC
;
DROP FIELD Recno
;??