how to pass outer query param into inner in MySQL 5.7
Using this sql solve my problem:
select 
(
    select sum(login_count)
    from (
        select avg(login_count) as login_count,user_id
        from report_user b
        -- where b.user_id = a.user_id
        group by user_id,date_format(FROM_UNIXTIME(statistic_time/1000), '%Y-%m-%d')
    ) as login_count
    where login_count.user_id = a.user_id
) as login_count
from report_user a
group by user_id