ROW_NUMBER generates the allocates a sequence number to the data set.
In your case, for each unique combination of A.TID, D.PIN, Tyr (columns in the PARTITION BY clause) will have a unique sequence number and the allocation of that sequence number will be done according the sorting order defined by D.PIN, Tyr, D.Amt (columns in the ORDER BY clause).
Seq_no is the allias of the columns returned by ROW_NUMBER function.
↧