data have;
input FirmID Year ;
cards;
1001 1995
1001 1996
1001 1997
1001 1998
1002 2011
1002 2012
1003 1992
1004 2015
1004 2016
1004 2017
;
proc sql;
create table want as
select *
from have
group by firmid
having count(year)>=3
order by firmid, year;
quit;
data have;
input FirmID Year ;
cards;
1001 1995
1001 1996
1001 1997
1001 1998
1002 2011
1002 2012
1003 1992
1004 2015
1004 2016
1004 2017
;
proc sql;
create table want as
select *
from have
group by firmid
having count(year)>=3
order by firmid, year;
quit;
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.