Mean something like this?
SELECT '1' as rownum, count(serviceid) as id
FROM serviceslog
WHERE serviceid='1'
AND partition NOT LIKE '%test%'
AND component NOT LIKE '%test%'
AND component NOT LIKE '%do not bill%'
AND occurence BETWEEN '2009-05-01 05:00:00' AND '2009-06-01 04:59:59'
GROUP BY serviceid
UNION
SELECT '2' as rownum, count(serviceid) as id
FROM serviceslog
WHERE serviceid='3'
AND partition NOT LIKE '%test%'
AND component NOT LIKE '%test%'
AND component NOT LIKE '%do not bill%'
AND occurence BETWEEN '2009-05-01 05:00:00' AND '2009-06-01 04:59:59'
GROUP BY serviceid
Reputation Points: 550
Solved Threads: 730
Bite my shiny metal ass!
Offline 4,177 posts
since Jul 2006