>The query as written works just fine although I'm certain there's got to be
>a more efficient way of doing the same thing. I'm relatively new to MySQL
>so I took the brute force approach.
>
>My problem is that I want to produce totals of each of the columns and can't
>figure out how to do it. An
I've got the following query that produces a large table for me.
SELECT
router.name AS Router,
SUM(IF(speed<='64000',1,0)) AS 64K,
SUM(IF(speed='128000',1,0)) AS 128K,
SUM(IF(speed='192000',1,0)) AS 192K,
SUM(IF(speed='256000',1,0)) AS 256K,
SUM(IF(speed='384000',1,0)) AS 3