title: Trying to get the unique values of subjects in PROC SQL
body: <pre><code>Proc SQL NOPRINT;    
          Create Table DSDD as    
          Select DISTINCT (USUBJID),PRIMARY,ARM,ARMN,APTS,DSCOMP_F,APRS,FAS    
              From DERIVED.DSDD    
                  Where UPCASE(APTS)="Y";    
  Quit   
  </code></pre>
  
  <p>I'm wanted the unique values of USUBJID. BUt when I run the above code I get <strong>512</strong> observations. When I the below code I get the count at <strong>490</strong>. I am considering the unique values of USUBJID right? What needs to be done to get the <strong>490</strong> unique observations.      </p>
  
  <pre><code>Proc SQL NOPRINT;    
          Create Table DSDD as    
          Select COUNT(DISTINCT (USUBJID)) as     COUNT,PRIMARY,ARM,ARMN,APTS,DSCOMP_F,APRS,FAS    
              From DERIVED.DSDD    
                  Where UPCASE(APTS)="Y";    
  Quit
  </code></pre>