Select by grouped rows and order by date
select t1.*
from table t1
          join (select t2.session, max(t2.created_at) max_created_at
                from table t2
                group by t2.session
                order by max_created_at desc
                limit 10 
               ) t3
          on t1.session = t3.session
order by t3.max_created_at desc, t3.session ;