finally working three hour roll with database query  for past day diff