Add scope for by_hour