title: Why am I getting syntax error 22-322 and error 76-322
body: <p>My code is the below.  I am not advanced in SAS or SQL my statement is below from SAS Enterprise Guide 8.2 using Proc sql.
  What I want to do is by unique PrescriberID to have the RX_PMPM, DrugCost_PMPM,PDL Rate GDR Rate  right next to each PresriberID</p>
  
  <p>I am getting syntax error
  ERROR 22-322
  ERROR 76-322</p>
  
  <pre><code>proc sql;
  create table work.ABC_2020_out as
  select  Distinct PrescriberId, 
  from work.VitMDKPI_Report
          sum(PaidAmt)/count(distinct CardholderId) as RX_PMPM,
          sum(DrugCost)/count(distinct PrescriptionNumber) as DrugCost_PMPM,
              Count (PDL) as Total_NONANDPDL,
          Count (BrandGenericCode) as Total_BrandGeneric,
          Case when PDL=Y then 'PREFPDL'
          Case when BrandGenericCode=G then 'Generic'
          End
          PDL/Total_NONANDPDL as PDL Rate
          Generic/Total_BrandGeneric as GDR Rate
          Group by PrescriberId;
  
  
  quit;
  </code></pre>