Get a hourly based report for count the number of vehicles traveling on that particular hour(0-23 hour) in MYSQL .
If there is no vehicles traveled on that hour,supposed to be displayed 0 , otherwise it will give count the no of vehicles travelled.
MySQL Query is displayed only the vehicles entered hour only
SELECT Extract(hour from payment_date_time)Hour,Count(amount)Volume,sum(amount)Amount from carpark_db.payment where carpark_id ='AMSDE5E27D5846D0B3F3A8BA4CA4C127' and payment_date_time >= '2018-01-02 00:00:00' and payment_date_time < '2018-01-02 23:59:59' group by extract(hour from payment_date_time) order by extract(hour from payment_date_time
plz help me