Hi, I have written the following query so as to select the rank of each customer and show it with other information in the output.
use northwind
go
select
Employees.EmployeeID as ID,
FirstName+' '+LastName as Name,
DENSE_RANK() over (order by SUM(Orders.OrderID)) as [Rank]
from
employees
inner join
orders
on
Employees.EmployeeID = Orders.EmployeeID
group by
Employees.EmployeeID,
FirstName+' '+LastName
But I want to know how can I do the ranking job without using DENSE_RANK()
function. Is it possible?