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;
2025 SAS Hackathon: There is still time!
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!