title: SELECT inside a COUNT
body: <p>I would like to embed a SELECT inside a COUNT, but I can't find any examples.</p>
  
  <pre><code>#pseudosql
  SELECT a AS current_a, COUNT(*) AS b,
     COUNT( SELECT FROM t WHERE a = current_a AND c = 'const' ) as d,
     from t group by a order by b desc
  </code></pre>