select count(*) as visit
            ,count(distinct(ip)) as ip
            ,DATE_FORMAT(create_time, '%Y-%m-%d') as tian
             ,DATE_FORMAT(create_time, '%m-%d') as type
            from sys_log 
         where log_type = 1 and create_time <= sysdate() and create_time >= (select date_sub(curdate(),interval 7 day))
         group by tian,type
         order by tian desc