Originally posted by siva sankar:
Hi Paul,
Here pallete_id is not a considerable thing.when the sum of costs of palletes are <=15000(the value should be close to 15000 in most cases),then the no.of palletes when added should be equal to 12.
Regards,
Siva
SELECT pallete.category AS category,
SUM(pallete.pallete_cost) AS pallete_cost
FROM pallete
GROUP BY pallete.category
HAVING COUNT(pallete.category) = 12
AND SUM(pallete.pallete_cost) <= 15000
I may need to tweak this... I'm not 100% sure I'm understanding your requirements.
[ October 31, 2007: Message edited by: Paul Campbell ]