假设你按日分表 select count(distinct login_uid) from table; 如果所有日子的数据都在表上的话, select DATE_FORMAT(login_time,'%Y-%m-%d'), count(distinct login_uid) from table group by DATE_FORMAT(login_time,'%Y-%m-%d')
假设你按日分表
如果所有日子的数据都在表上的话,