select
user_id
,sum(timestampdiff(minute,visit_time,leave_time) div 10 )as point
from visit_tb
group by 1
order by point desc

整除:div