Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select month(czl.log_date + interval 8 hour) as month,
- cc.car_name as carname,
- count(distinct czl.car_id) as ncars
- from car_zone_logs czl left join cars c on czl.car_id = c.id
- left join car_classes cc on c.car_class_id = cc.id
- where month(czl.log_date + interval 8 hour) = '7'
- and year(czl.log_date + interval 8 hour) = '2019'
- group by 1,2
Advertisement
Add Comment
Please, Sign In to add comment