How to calculate revenue by sales team if sales agents change teams?
0
votes
2
answers
77
views
Agents
ID | Agent
1 | A
2 | B
Teams
ID | Team
1 | AA
2 | BB
Memberships
ID | AgentID | TeamID | Start Date | End Date
1 | 1 | 1 | 2023-01-01 | 2023-12-31
2 | 1 | 2 | 2024-01-01 | 2099-12-31
Clients
ID | AgentID
1 | 1
Orders
Date | ClientID | Rev
2023-02-02 | 1 | 10
2024-02-01 | 1 | 20
How to get the following table based on the above?
Team | Rev
AA | 10
BB | 20
Asked by simpatico
(99 rep)
May 15, 2024, 08:26 AM
Last activity: May 16, 2024, 01:16 PM
Last activity: May 16, 2024, 01:16 PM