title: SUM SUBQUERY MySql
body: <p>I have data:</p>
  <pre><code>2020/08/01  A   17
  2020/08/01  A   17
  2020/08/01  A   17
  2020/08/02  A   17
  2020/08/02  A   17
  2020/08/02  A   17
  </code></pre>
  <p>I want data:</p>
  <pre><code>2020/08/01  A   17
  2020/08/02  A   17
  </code></pre>
  <p>And sum:</p>
  <pre><code>A     34
  </code></pre>
  <p>How to sum them?
  I've tried with this query, but failed</p>
  <pre><code>SELECT
  SUM((SELECT
      TotCall
  FROM
      mob_distribution
      JOIN krd_slsman ON krd_slsman.wh_id = mob_distribution.Wh_id
      JOIN krd_item ON krd_item.item_id = mob_distribution.Item_id 
  WHERE
      krd_slsman.wh_parn = '103' 
      AND mob_distribution.Tanggal BETWEEN &quot;2020-09-01&quot; 
      AND &quot;2020-09-03&quot; 
  GROUP BY
      mob_distribution.Tanggal 
  ORDER BY
      mob_distribution.Wh_id ASC )) AS K
  FROM
      mob_distribution AS a
      JOIN krd_slsman ON krd_slsman.wh_id = a.Wh_id
      JOIN krd_item ON krd_item.item_id = a.Item_id 
  WHERE
      krd_slsman.wh_parn = '102' 
      AND a.Tanggal BETWEEN &quot;2020-09-01&quot; 
      AND &quot;2020-09-03&quot; 
  GROUP BY
      a.Wh_id 
  ORDER BY
      a.Wh_id ASC
  </code></pre>