select FROM_UNIXTIME(addtime,'%Y-%m-%d')as date,COUNT(*)
FROM ad_mac
GROUP BY FROM_UNIXTIME(addtime,'%Y-%m-%d');