summing data within a table
| From: | Mark McCray | Date: | Tue, 03 Oct 2000 00:10:29 +0000 |
| Subject: | summing data within a table | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-3238@lists.php.net to get a copy of this message | ||
Hey all,
I'm not sure how to go about this, but here goes:
I have one table, it's sort of like an invoice items table.
It's made up of employees, dates, and amounts.
How do I summarize all the different items belonging to each employee and
sum their amounts.
so if I have:
1-1-2000 Mark 2000.00
1-1-2000 Debbie 3000.00
1-4-2000 Lenny 3050.89
2-8-2000 Mark 1500.00
2-24-2000 debbie 2000.00
3-3-2000 Lenny 8000.00
How do I make a summary where it shows:
Mark totals 4500.00
Debbie totals 5000.00
and
Lenny totals 11050.89
I think this might be db 101, but I'm a little fuzzy on it.
Marky