Thanks for your response...What I want is not first n rows but something like this:
SELECT
CustomerID, ContactDate, ROW_NUMBER()OVER (PARTITION BY CustomerID ORDER BY ContactDate) AS ContactNo
FROM CustomersContact;
It's ranking within a subgroups of rows...
I stil think it should be somehow...
Hi,
I can't find function, which is similar to ROW_NUMBER function in Oracle. This function is desribed below.
Any idea will be helpful.
Thanks.
ROW_NUMBER is an analytic function. It assigns a unique number to each row to which it is applied (either each row in the partition or each row...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.