Link to home
Start Free TrialLog in
Avatar of TickTech
TickTech

asked on

simple SQL 12 code error

--Learning to code SQL, have error, don't understand why is the error. Please ----explain.Thanks
----------------------------------------------------------
USE [AdventureWorks2012]
select BusinessEntityID, Rate, NtileRanking, rank() Over(partition by NtileRanking order by Rate desc)as RankingWithinNtile
from (select BusinessEntityID, Rate,
    Ntile(4) Over (Order by Rate Desc) as NtileRanking
from HumanResources.EmployeePayHistory)



--Msg 102, Level 15, State 1, Line 5
--Incorrect syntax near ')'.
ASKER CERTIFIED SOLUTION
Avatar of DcpKing
DcpKing
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TickTech
TickTech

ASKER

Thank you for your help.
My pleasure!