Forum Moderators: open
Can this be done with a single query on MySQL 4.1, or do I need to run multiple queries and process server side:
Table looks something like this:
[tbl_sales]
- lead_id
- dated
- salesperson
- sold_amount
I want to get the following back:
APR06 - Fred - £500
MAR06 - Mary - £1200
FEB06 - Jon - £700
..i.e. for each month, show me which salesperson sold the most and how much that was.
Thanks in advance for your time..