**Sheet 4 contains private-to-private LBOs
*Used SDC data to flag LBO events for COMPUSTAT data
**Joined Goal is to create gvkey lookup for each dealnumb, then query for number of deals associated with each gvkey in each year**First joined sheets 1 and 2 to link gvkey to each LBO deal**Joined resulting table to composite key to flag for LBO occurrences in given year-gvkey combination
*Note: This left many LBOs unmatched. Applied name-based matching to include more deals (esp. all private-to-private)
**Copied dealnumb and company name from LBO_List_and_data.xlsx into textpad
**Manually removed extraneous symbols and words, saved result as LBO_Cleaned_data.xlsx
**Performed matching by company name with stdcompnames.txt (which included gvkeys) to get alternative gvkey-dealnumb lookup table
**Appended non-contradictory results to previous gvkey-dealnumb lookup table (SQL table gvkeyxdealnumbfinal)
**Used this table to flag LBO events in Compustat dataset for appropriate gvkeys in appropriate year(s)
==STATA analysis==