data SofaData; set sashelp.prdsal3; where product="SOFA" and date between "01mar1998"d and "30apr1998"d and state in ("California" "Florida"); keep State Date Actual; run; proc sort data=SofaData out=ByAllVars noduprecs; by State Date _ALL_; run; proc print data=ByAllVars; where State="California"; title1 "Complete Duplicate is Removed"; run;