**Used table '''patentstartend''' (which has start and end dates of when patent was active; see subsection below) and '''assigneexgvkey''' to determine, for each gvkey-year combination, the number of active patents
**Result is SQL table '''yearsbygvkeysfilled3'''
*Final dataset is exported as tab-delimited file '''STATAstaging4.txt'''
===Patent start-end table===