title: MySQL join table like concat but only pick latest row
body: <p>I have case where I need latest status. There are two tables, I simplify my table so it looks like below:</p>
  <hr />
  <pre><code>Table A
  +------------+
  |  a_id      |
  |------------|
  |  A1        |
  |  A2        |
  +------------+
  
  Table B
  +------------+-------------+------------------+------------------+
  |  b_id      |  a_id       |  status          |  created_at      |
  |------------+-------------+------------------+------------------|
  |  B01       |  A1         |  something       |  2020-03-14      |
  |  B02       |  A1         |  something else  |  2020-04-15      |
  |  B03       |  A2         |  anything        |  2020-03-22      |
  +------------+-------------+------------------+------------------+
  </code></pre>
  <hr />
  <p>I want to show table from A with join table B so it will show like this:</p>
  <hr />
  <pre><code>+------------+--------------------+-----------------+
  |  a.a_id    |  b.status          |  b.created_at   |
  |------------+--------------------+-----------------|
  |  A1        |  something else    |  2020-04-15     |
  |  A2        |  anything          |  2020-03-22     |
  +------------+--------------------+-----------------+
  </code></pre>
  <hr />
  <p>I will appreciate Mysql query or codeigniter query builder. Thank you</p>