Actually, you need to change the code in a few places.
Code:
drop if year < 1990
summ year, meanonly
local last = r(max)
by country isic (year), sort: keep if year[1] == 1990 & year[_N] == `last' ///
& _N == `last'-1990+1

Comment