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
[EMAIL PROTECTED]
http://atomdatabase.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to