Multiple record counts in one MySql statement

I've been creating some reports recently and been needing a lot of count information. The below statement pulls multiple counts in one SQL statement. n.b. This is for MySQL and will probably be different for other db'sSELECT(SELECT count(*) FROM tblName) AS 'Total Records',(SELECT count(*) FROM tblName WHERE col = 'a') AS 'Count'
comments powered by Disqus