That should be it. Since SUM is a grouping func, you need to apply all grouping rules to the selects you plan. Hence be sure the SUM set returns an unique index (for example the CATEGORY here, for which is made a subset).SELECT category, SUM(fee) FROM tblproducts WHERE category like 'Phorno +';
In reply to Simple query
by Olecram
in thread Perl/MySQL ?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |