Well, of that which you showed you _need_ only this, not really different from
that which you wrote:
SELECT
COUNT(lib.Dewey) AS Have,
ddn.Dewey AS DDN,
ddn.Classification
FROM s_library_dewey ddn
LEFT OUTER JOIN s_library lib ON ddn.Dewey = FLOOR(lib.Dewey)
GROUP BY ddn.Dewey
As for "FLOOR" in an ON-clause, surely the general-builtin-function overhead
completely overwhelms the operation s cost. Maybe index on "Dewey" would help.
(Which Dewey? with computer under math, &c, or with computer under 000? Where
can one get a 1000-element list for computer?)
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql