Hi I want to find distinct pairs of Cusip (this is the ID) by data and investor. that is find a pair of 2 firms with all their institutional investors by date. this is the code I use: proc sql; create table esg.Holdings2 as select distinct a.NCUSIP as A_cusip, a.Ins_own as A_Ins_own, b.NCUSIP as B_cusip, b.Ins_own as B_Ins_own, FROM 'esg.Holdings1a' AS A, from 'esg.Holdings1a' AS B where a.NCUSIP < b.NCUSIP group rdate, mgrno ; quit; this is the mistake: 20! B_Ins_own, 321 FROM 'esg.Holdings1a' AS A, from 'esg.Holdings1a' AS B 322 where a.NCUSIP < b.NCUSIP group rdate, mgrno ; ----- 22 76 ERROR 22-322: Syntax error, expecting one of the following: a quoted string, ',', AS, FORMAT, FROM, INFORMAT, INTO, LABEL, LEN, LENGTH, TRANSCODE. ERROR 76-322: Syntax error, statement will be ignored. I attached an example of current data and what I try to do
... View more