select rank,count(1) as rank2 from ( select time2,count(1) as rank from ( select LEFT(time_update,16) as time2 from training_set_r1 where updator=1015 and time_update>'2017-05-30' and time_update<'2017-05-31') a where time2 is not null group by time2 ) a group by rank; select title,tags,time_update from training_set_r1 where updator=1015 and time_update>'2017-05-27' and time_update<'2017-05-28'