Sample Header Ad - 728x90

Join two tables with similar columns

0 votes
1 answer
46 views
I hva two tables as is: * Table *univers*: | client |commercial| | -------- | -------------- | | Axel| Tony | | Mike| Jhon| | Chris| Jhon| * Table transactions | frclient | toclient |commission| | -------- | -------- |----------| | Axel | NA |10 | | Mike | NA |8 | | NA | Mike |15 | | Axel | NA |4 | | NA| Chris|5 | | Chris| NA |5 | Now, I would like to be able to have the total commissions generated by Jhon and Tony's clients, a bit like: | commercials| commissions | | -------- | -------------- | | Jhon| 33| | Tony| 14 | The only element that links the *univers* table and the *transactions* table are the customer IDs, namely their names, nothing else. How can I proceed please? THANKS.
Asked by COPEGUEST (33 rep)
Jun 14, 2023, 04:25 PM
Last activity: Jun 14, 2023, 06:24 PM