title: SQL How to count one column when another column is distinct
body: <p>I have a table that looks something like this:</p>
  
  <pre><code>fin_aid_status | student_number
  ---------------|---------------
  YES            | 111222
  YES            | 111222
                 | 111333
  YES            | 111444
  </code></pre>
  
  <p>I want to count the number of <code>fin_aid_status</code> but not double count rows where student_number is duplicated. So the result I would like from this table would be 2. Not 3 because <code>111222</code> is in the table twice. There are many other columns in the table as well though so just looking for unique values in the table will not work.</p>
  
  <p><strong>EDIT</strong>: This is <em>Oracle</em>. </p>
  
  <p>For example I am using code like this already:</p>
  
  <pre><code>select count(*), count(distinct student_number) from table
  </code></pre>
  
  <p>So for  third column I would want to count the number on financial aid with unique student numbers.</p>
  
  <p>So my expected output would be:</p>
  
  <pre><code>count(*) | count(distinct student_number) | count_fin_aid
  4        | 3                              | 2
  </code></pre>