Hi! I'm fairly new to SAS (Proc SQL) and feel a little out of my depth here. I've seen what I'm trying to do be done in other programs, but when I try to adapt it to my script it doesn't work and I can't figure out why. I've tried searching for solutions but without luck, any help would be greatly appreciated. I'm using SAS EG 8.3. I have two tables with data, I want to count data from a column (Called "Account" ) from Table 1 (called "Renewals") and divide it by another counted data column (called "Closed_Accounts") in Table 2 (called "Closed"). Proc sql;
Create Table Summary As
Select
&Month As Month,
Count(T1.Account) As Contracts_w_Renewal,
Count(Select Distinct Closed_Accounts From work.closed) As Closed_Contracts,
Calculated Contracts_w_Renewal/Calculated Closed_Contracts format = percent10.2 AS Renewal_Rate
FROM work.Renewals As T1
;Quit; This error 22-322: Syntax error, expecting one of... you get the rest 🙂 is genereted on this part: Count(Select Distinct Closed_Accounts From work.closed) As Closed_Contracts, and I can't figure out why. All I really want to do is count the number of "Closed Accounts" from that table and have the output like this: Month No of A from T1 No of A from T2 %-rate &month. x y x/y Please let me know if I should clarify anything, any assistance is appreciated 🙂 Thanks
... View more