Dear all,

I want to merge data from two different datasets. The first has only one observation per firm(CUSIP) for a given year, as shown.

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input str12 CUSIP double year
"00036020" 2009
"00036020" 2010
"00036020" 2011
"00036020" 2012
"00036020" 2013
"00036020" 2014
"00036020" 2015
"00036020" 2016
"00036020" 2017
"00036020" 2018
"00036110" 2007
"00036110" 2008
"00036110" 2009
"00036110" 2010
"00036110" 2011
"00036110" 2012
"00036110" 2013
"00036110" 2014
"00036110" 2015
"00036110" 2016
"00036110" 2017
"00036110" 2018
"00088630" 2007
"00088630" 2008
"00088630" 2009
"00095710" 2007
"00095710" 2008
"00095710" 2009
"00095710" 2010
"00095710" 2011
"00095710" 2012
"00095710" 2013
"00095710" 2014
"00095710" 2015
"00095710" 2016
"00095710" 2017
"00095710" 2018
"00101J10" 2013
"00101J10" 2014
"00101J10" 2015
"00105510" 2007
"00105510" 2008
"00105510" 2009
"00105510" 2010
"00105510" 2011
"00105510" 2012
"00105510" 2013
"00105510" 2014
"00105510" 2015
"00105510" 2016
"00105510" 2017
"00105510" 2018
"00108410" 2007
"00108410" 2008
"00108410" 2009
"00108410" 2010
"00108410" 2011
"00108410" 2012
"00108410" 2013
"00108410" 2014
"00108410" 2015
"00108410" 2016
"00108410" 2017
"00108410" 2018
"00130H10" 2007
"00130H10" 2008
"00130H10" 2009
"00130H10" 2010
"00130H10" 2011
"00130H10" 2012
"00130H10" 2013
"00130H10" 2014
"00130H10" 2015
"00130H10" 2016
"00130H10" 2017
"00130H10" 2018
"00130H10" 2019
"00154710" 2008
"00154710" 2009
"00154710" 2010
"00154710" 2011
"00154710" 2012
"00154710" 2013
"00154710" 2014
"00154710" 2015
"00154710" 2016
"00154710" 2017
"00154710" 2018
"00163T10" 2007
"00163T10" 2008
"00163T10" 2009
"00163T10" 2010
"00163U10" 2016
"00163U10" 2017
"00163U10" 2018
"00163U10" 2019
"00164V10" 2012
"00164V10" 2013
"00164V10" 2014
"00164V10" 2015
end
The second data set has multiple observations per firm(CUSIP) per year, as it contains information on the individual directors of the firms in the first dataset.

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input str12 CUSIP double year
"00846U101" 2007
"00846U101" 2007
"00846U101" 2007
"00846U101" 2007
"00846U101" 2007
"00846U101" 2007
"00846U101" 2007
"00846U101" 2007
"00846U101" 2008
"00846U101" 2008
"00846U101" 2008
"00846U101" 2008
"00846U101" 2008
"00846U101" 2008
"00846U101" 2008
"00846U101" 2008
"00846U101" 2008
"00846U101" 2009
"00846U101" 2009
"00846U101" 2009
"00846U101" 2009
"00846U101" 2009
"00846U101" 2009
"00846U101" 2009
"00846U101" 2009
"00846U101" 2009
"00846U101" 2010
"00846U101" 2010
"00846U101" 2010
"00846U101" 2010
"00846U101" 2010
"00846U101" 2010
"00846U101" 2010
"00846U101" 2010
"00846U101" 2011
"00846U101" 2011
"00846U101" 2011
"00846U101" 2011
"00846U101" 2011
"00846U101" 2011
"00846U101" 2011
"00846U101" 2011
"00846U101" 2011
"00846U101" 2012
"00846U101" 2012
"00846U101" 2012
"00846U101" 2012
"00846U101" 2012
"00846U101" 2012
"00846U101" 2012
"00846U101" 2012
"00846U101" 2012
"00846U101" 2013
"00846U101" 2013
"00846U101" 2013
"00846U101" 2013
"00846U101" 2013
"00846U101" 2013
"00846U101" 2013
"00846U101" 2013
"00846U101" 2013
"00846U101" 2014
"00846U101" 2014
"00846U101" 2014
"00846U101" 2014
"00846U101" 2014
"00846U101" 2014
"00846U101" 2014
"00846U101" 2014
"00846U101" 2015
"00846U101" 2015
"00846U101" 2015
"00846U101" 2015
"00846U101" 2015
"00846U101" 2015
"00846U101" 2015
"00846U101" 2015
"00846U101" 2015
"00846U101" 2016
"00846U101" 2016
"00846U101" 2016
"00846U101" 2016
"00846U101" 2016
"00846U101" 2016
"00846U101" 2016
"00846U101" 2016
"00846U101" 2016
"00846U101" 2016
"00846U101" 2017
"00846U101" 2017
"00846U101" 2017
"00846U101" 2017
"00846U101" 2017
"00846U101" 2017
"00846U101" 2017
"00846U101" 2017
"00846U101" 2017
"00846U101" 2017
"00846U101" 2018
"00846U101" 2018
end
I tried merging 1:m, but after running -tabstat it showed the first dataset had increased significantly in observations. How would I go about merging while I keep the observations in the first dataset at its original level, as only need one observation per year per firm for those variables. The basic idea would be that within one dataset I have observations for all different directors, but for some variables only for a company as a whole.