[Solved] how to get result based on 10 minutes interval in mysql


i have found the solution by below query.

select a.time_column,group_concat(a.destination order by ct desc) from  (select case 
            when time between '00:00:00' and '00:10:00' then '00:10:00'
            when time between '00:10:01' and '00:20:00' then '00:20:00'
            when time between '00:20:01' and '00:30:00' then '00:30:00'
        else '00:00:00' end as time_column 
        , destination
        , count(destination) ct
from click
group by time_column,destination
order by time_column,count(destination) desc limit 10)a
group by a.time_column;

solved how to get result based on 10 minutes interval in mysql