title: Proc Freq and unique id values
body: <p>I have a table with two columns, ID and Gender as below</p>
  
  <p><img src="https://i.stack.imgur.com/Wga0K.png" alt="enter image description here"></p>
  
  <p>I am trying to count the number of males and females. I wrote a code like this</p>
  
  <p>Proc Freq data=Work.Test1;
  tables gender;
  run;</p>
  
  <p>The output i got was 5males and 2 females, I know this is wrong because Id repeats many times , there are only 2 males and 1 female. My question is how do i change Proc Freq so that I get the count for gender (males and Females) for unique Id values ?</p>