I have two tables: one contains employees information and another is transactions (sales) information including sales man (employeee ID)
Table 1: employees
code
name
...
Table 2: sales
employee_code
product
Date
Price
Amount
I would like to calculate how much each employees can generate revenue (total amount) for each of 2 periods (1 Jan to 30 Jun and 1 Jul to 31 Dec) or maybe any period of time - like this:
Name _________Period 1_1_30_6______Period 1_7_31_12
-------------------------------------------------------------------------
Adam___________50b$______________70b$
David___________90b$______________1000b$
....
---------------------------------
Could you help me?
Last edited by raulgonzalez; 10-19-2009 at 09:00 AM.