В цвете же можно выложить!
select * from
(select toStartOfInterval(time_local, interval 3600 second) as interval, remote_addr,
count(distinct http_user_agent), count(http_user_agent)
from accesslog.default where time_local > (now() - toIntervalMinute(240))
group by interval, remote_addr order by interval, remote_addr) as t1
inner join
(select * from accesslog.default where time_local > (now() - toIntervalMinute(240))) as t2
on t1.remote_addr=t2.remote_addr
и покажите вывод запросов отдельно с именами столбцов в выводе