From: Arthur Fuller Date: December 4 2011 3:42pm Subject: Re: Query query List-Archive: http://lists.mysql.com/mysql/226439 Message-Id: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=bcaec5215665d0a61a04b3460b87 --bcaec5215665d0a61a04b3460b87 Content-Type: text/plain; charset=ISO-8859-1 You should still lose the pointless WHERE 1. Arthur On Sun, Dec 4, 2011 at 1:38 AM, Jan Steinman wrote: > DOH! Brain unfroze, and I realized I needed an aggregate: > > SELECT > COUNT(lib.Dewey) AS Have, > ddn.Dewey AS DDN, > ddn.Classification AS Classification > FROM s_library_dewey ddn > LEFT OUTER JOIN s_library lib ON ddn.Dewey = FLOOR(lib.Dewey) > WHERE 1 > GROUP BY ddn.Dewey > > --bcaec5215665d0a61a04b3460b87--