title: MySQL query to get total item number from table 2 to owner in table 1?
body: <p>I got 2 tables: Owners and Storage as below:</p>
  <p><strong>Table: owners</strong></p>
  <pre><code>id  |   owner    |  box
  ----------------------------
  1   |   Nick     |  []
  2   |   Jack     |  []
  3   |   Jane     |  []
  </code></pre>
  <p><strong>Table: Storage</strong></p>
  <pre><code>id  |  fruit  | owner_id
  ---------------------------
  1   |  Apple  |   1
  2   |  Apple  |   3
  3   |  Banana |   2
  4   |  Banana |   1
  5   |  Banana |   1
  6   |  orange |   1
  7   |  Apple  |   3
  8   |  Orange |   2
  9   |  Apple  |   2
  </code></pre>
  <p><strong>Question: Is there a query to get how many fruit in each owner's box in result?</strong>
  Like:</p>
  <pre><code>Nick:[Apple:1,Banan:2,Orange:1]
  Jack:[Apple:1,Banan:1,Orange:1]
  Jane:[Apple:2,Banan:0,Orange:0]
  </code></pre>
  <p>I tried to join 2 tables but it return me hundreds of records that duplicated. Much appreciated if anyone could guide me out.</p>