dataset a
Date RefNo Amount
01Jun16 ABC 1000
02Jun16 ABC 1000
03Jun16 ABC 1000
01Jan16 VCV 2100
02Jan16 VCV 2100
03Jan16 VCV 2100
.......etc
May I know how to get the following dataset using proc sql? I need the minumum date record for each RefNo.
Thanks.
proc sql; create table want as select * from have group by refno having date=min(date); quit;
You can filter your dataset based on the HAVING clause.
April 27 - 30 | GAYLORD TEXAN
Register now to lock in early bird pricing through February 25!
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.
Ready to level-up your skills? Choose your own adventure.
Browse our catalog!