title: Count child members from parent value
body: <p>I have a table like <code>conversations</code> and <code>conversation_timelines</code> </p>
  
  <p><strong>conversations</strong> table example</p>
  
  <pre><code>|  id   |   last_active   |   category_id   |
  |-------------------------------------------|
  |  1    |   1552462134    |        1        |
  |  2    |   1552461332    |        1        |
  |  3    |   1552462312    |        2        |
  |  4    |   1552461772    |        1        |
  </code></pre>
  
  <p><strong>conversation_timelines</strong> table example</p>
  
  <pre><code>|  id   |  conversation_id  |  message  |  created_time  |
  |--------------------------------------------------------|
  |  1    |        1          |  hi       |  1552462066    |
  |  2    |        1          |  hello    |  1552462172    |
  |  3    |        1          |  world    |  1552462188    |
  |  4    |        2          |  another  |  1552462141    |
  </code></pre>
  
  <p>What I want to query is <strong>Counting the number of records in</strong> <code>conversation_timelines</code> <strong>that has</strong> <code>created_time &gt; conversation's last_active</code> <strong>WHERE conversations.category_id = 1</strong></p>
  
  <p>and the result world be like</p>
  
  <pre><code>|  conversation_id  |  count  |
  |         1         |    2    |
  |         2         |    1    |
  </code></pre>