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;
SAS Innovate 2025: Save the Date
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!