title: how to do nested SQL select count
body: <p>i'm querying a system that won't allow using <strong>DISTINCT</strong>, so my alternative is to do a <strong>GROUP BY</strong> to get near to a result</p>
  
  <p>my desired query was meant to look like this,</p>
  
  <pre><code>SELECT 
  SUM(column1) AS column1,
  SUM(column2) AS column2,
  COUNT(DISTINCT(column3)) AS column3
  FROM table
  </code></pre>
  
  <p>for the alternative, i would think i'd need some type of nested query along the lines of this,</p>
  
  <pre><code>SELECT 
  SUM(column1) AS column1,
  SUM(column2) AS column2,
  COUNT(SELECT column FROM table GROUP BY column) AS column3
  FROM table
  </code></pre>
  
  <p>but it didn't work. Am i close?</p>