Rick, If you replace MEAN with MEDIAN ,would be better.