Hello guys
Please help me
I have 2 tables, one containing services and another costs
I want to multiply column quantity with Price if the company codes are equal and the year of date = year of Price date.
Thank you
TABLE SERVICES |
|
COSTS |
Company |
Service name |
Date |
Quantity |
|
Company |
Price date |
Price |
ADM |
Service1 |
10/10/21 |
100 |
|
ADM |
1/1/2021 |
50 |
ADB |
Service2 |
10/11/21 |
150 |
|
ADB |
1/1/2021 |
60 |
ADD |
Service3 |
10/12/21 |
256 |
|
ADD |
1/1/2021 |
70 |
ADM |
Service4 |
10/13/21 |
456 |
|
ADM |
1/1/2022 |
80 |
ADB |
Service5 |
10/14/21 |
789 |
|
ADB |
1/1/2022 |
90 |
ADD |
Service1 |
10/10/22 |
200 |
|
ADD |
1/1/2022 |
100 |
ADM |
Service2 |
10/10/22 |
250 |
|
|
|
|
ADB |
Service3 |
10/10/22 |
356 |
|
|
|
|
ADD |
Service4 |
10/10/22 |
556 |
|
|
|
|
ADB |
Service5 |
10/10/22 |
678 |
|
|
|
|
------------------------------
Mihai Stanca
Acasa
------------------------------