From: hsv Date: September 19 2012 8:55pm Subject: Re: getting certain rows from a group by List-Archive: http://lists.mysql.com/mysql/228205 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" >>>> 2012/09/19 14:36 -0400, Larry Martell >>>> MIN(ABS(Avg(bottom) - bottom)) Is not valid. It gives: ERROR 1111 (HY000): Invalid use of group function <<<<<<<< Yes, I had my doubts of that, for all that I suggested it.