select round( ((select count(distinct l1.user_id) from login l1 inner join login l2 on (l1.user_id=l2.user_id and date_add(l1.date,interval 1 day)=l2.date)) /count(distinct l3.user_id ) ) ,3) as p from login l3 ; 可以先执行select count(distinct l1.user_id) from login l1 inner join...