I am new to SAS and struggling to convert the below piece of code to SQL.
proc rank data = input (where = (limit_assort = 1)) out = assort_rank groups=3;
var assort;
ranks assort_rank;
run;
I tried in sql by using the below one but not matching with the SAS output.
Percentile_Cont(0.3) Within Group (Order by assortment) As assortment_rank
In SAS output, i can see a column "Rank for variable assort"with 0,1&2 based on the groups=3 option. But not sure how to handle it in SQl.
Thanks in advance!