Baron,
Thanks very much for that simple but very effective solution.
I altered your SQL slightly, the final SQL looks like this:
SELECT
domain,
count(*) AS 'count all',
SUM(IF(mime = 'text/html', 1, 0)) AS 'count text',
SUM(IF(mime LIKE 'image/%', 1, 0)) AS 'count image'
FROM
tableA
GROUP BY
domain
ORDER BY
domain
Thanks again,
Imran Chaudhry
--
Atom Database
A Custom Database Designed for Your Business
info@strippedhttp://atomdatabase.com

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.