title: How to group by time and if there is no data count as zero in mysql?
body: <p>sql query is</p>
  <pre><code>select substring(InputTime, 1, 13) as Time, count(*) as count from DB group by hour(InputTime);
  </code></pre>
  <p>and it comes out</p>
  <pre><code>
  +---------------+-------+
  | Time          | count |
  +---------------+-------+
  | 2021-06-15 01 |    11 |
  | 2021-06-15 02 |    22 |
  | 2021-06-15 04 |    22 |
  +---------------+-------+
  </code></pre>
  <p>But I want to</p>
  <pre><code>
  +---------------+-------+
  | Time          | count |
  +---------------+-------+
  | 2021-06-15 01 |    11 |
  | 2021-06-15 02 |    22 |
  | 2021-06-15 03 |    0  |
  | 2021-06-15 04 |    22 |
  | 2021-06-15 05 |    0  |
  ...
  ...
  ...
  ...
  ...
  +---------------+-------+
  </code></pre>
  <p>So I want to fill empty count with value zero.
  How to edit my query?</p>