Hi everybody,
I'm using Enterprise Guide 5.1 here is my problem:
I have a table :
cust_id payment_day_id
----------- -----------------------
12345 201304
12345 201305
12345 201306
6789 201307
6789 201308
I want to give a rank number to each row according to payment_day by grouping cust_id
above example rank must be like this
cust_id payment_day_id rank
----------- ----------------------- -----
12345 201304 1
12345 201305 2
12345 201306 3
6789 201307 1
6789 201308 2
How can I do this with enterprise guide or in proc SQL ?
thank you very much, Rank task is very helpful to me
There should be a Rank task within EG. I believe it uses PROC RANK, and should probably suit your needs.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.