Can I get an hourly count including hours with no data?
<p>I need a way of producing a report that shows the number of transactions (or taps) per hour. So far I have managed to get a table as below, but it skips out the hours with no data.</p>

<p>Is there a way I can have the hour shown even if the count is 0? </p>

<pre><code>SELECT HOUR(`time`), Count(*)
FROM `taps`
WHERE DATE(`time`) = '2016-01-17' AND `readerid` IN 
            (SELECT `readerid` 
             FROM `readers` 
             WHERE `type` = 'A')
GROUP BY HOUR(`time`)
ORDER BY HOUR(`time`)
</code></pre>

<p>This produces the table below:<br>
<a href="https://i.stack.imgur.com/oykyV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oykyV.png" alt="enter image description here"></a></p>