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 _________Period1_1_30_6______Period 1_7_31_12 ------------------------------------------------------------------------- Adam__________________50b$______________70b$ David_________________90b$______________1000b$ .... ---------------------------------
Could you help me?