title: Calculate total data from several tables and groups by date
body: <p>i've 3 tables</p>
  
  <ol>
  <li><b>equipment1</b> </li>
  </ol>
  
  <pre>
  +-------------+-------------+-------------+  
  | id_skt1     | status_kt1  | tgl_skt1    |
  +-------------+-------------+-------------+
  |      1      | ON          | 2019-07-23  |
  +-------------+-------------+-------------+
  |      2      | ON          | 2019-07-23  |
  +-------------+-------------+-------------+
  |      3      | ON          | 2019-07-24  |
  +-------------+-------------+-------------+
  </pre>
  
  <ol start="2">
  <li><b>equipment2</b> </li>
  </ol>
  
  <pre>
  +-------------+-------------+-------------+
  | id_skt2     | status_kt2  | tgl_skt2    |
  +-------------+-------------+-------------+
  |      1      | ON          | 2019-07-23  |
  +-------------+-------------+-------------+
  |      2      | OFF         | 2019-07-23  |
  +-------------+-------------+-------------+
  |      3      | ON          | 2019-07-25  |
  +-------------+-------------+-------------+
  </pre>
  
  <ol start="3">
  <li><b>equipment3</b></li>
  </ol>
  
  <pre> 
  +-------------+-------------+-------------+
  | id_skt3     | status_kt3  | tgl_skt3    |
  +-------------+-------------+-------------+
  |      1      | OFF         | 2019-07-25  |
  +-------------+-------------+-------------+
  |      2      | ON          | 2019-07-26  |
  +-------------+-------------+-------------+
  |      3      | ON          | 2019-07-26  |
  +-------------+-------------+-------------+
  |      4      | ON          | 2019-07-27  |
  +-------------+-------------+-------------+
  |      5      | ON          | 2019-07-27  |
  +-------------+-------------+-------------+
  |      6      | ON          | 2019-07-27  |
  +-------------+-------------+-------------+
  </pre>
  
  <p>how to count all status "ON" on these tables and group by date? </p>
  
  <p>I have searched the website SO but i haven't found a similar problem</p>
  
  <p>i've tried using this code:</p>
  
  <pre><code>SELECT (SELECT  COUNT(*) FROM status_kt1 WHERE status_kt1="ON") as T1, (SELECT  COUNT(*) FROM status_kt2 WHERE status_kt2="ON") as T2, (SELECT  COUNT(*) FROM status_kt3 WHERE status_kt3="ON") as T3
  </code></pre>
  
  <pre>I have searched the website so but did not find a similar problem
  
  
  <i>I want the results like this:</i>
  
  +-------------+-------------+  
  | tgl_all     |totalStatusOn|
  +-------------+-------------+
  | 2019-07-23  |    3        |
  +-------------+-------------+
  | 2019-07-24  |    1        |
  +-------------+-------------+
  | 2019-07-25  |    1        |
  +-------------+-------------+
  | 2019-07-26  |    2        |
  +-------------+-------------+
  | 2019-07-27  |    3        |
  +-------------+-------------+
  </pre>
  
  <p><b>regards :) </b></p>