title: Selecting column from one table and count from another
body: <pre><code>t1
  
  id | name | include
  -------------------
  1  | foo  |  true
  2  | bar  |  true
  3  | bum  |  false
  
  t2
  
  id | some | table_1_id
  -------------------------
  1  | 42   |     1
  2  | 43   |     1
  3  | 42   |     2
  4  | 44   |     1
  5  | 44   |     3
  </code></pre>
  
  <p>Desired output:</p>
  
  <pre><code>name | count(some)
  ------------------
  foo  | 3
  bar  | 1
  </code></pre>
  
  <p>What I have currently from looking through other solutions here:</p>
  
  <pre><code>    SELECT      a.name, 
              COUNT(r.some)
  
  FROM        t1 a
  JOIN  t2 r on a.id=r.table_1_id
  WHERE       a.include = 'true' 
  
  GROUP BY    a.id,
              r.some;
  </code></pre>
  
  <p>but that seems to get me</p>
  
  <pre><code>name | count(r.some)
  --------------------
  foo  | 1
  foo  | 1
  bar  | 1
  foo  | 1
  </code></pre>
  
  <p>I'm no sql expert (I can do simple queries) so I'm googling around as well but finding most of the solutions I find give me this result. I'm probably missing something really easy.</p>