Business need:
Join customer address info to order header info to retrieve max(billtodate) and max(shiptodate).
1. Join 1 customer address table Alias1 joined to order header table on BillTo customer number.
2. Join 2 customer address table Alias2 joined to order header table on ShipTo customer number.
Alias 1 create new variable: Max(BillTo Date)
Alias 2 create new variable Max(Ship Date)
I then created a context with these two joins.
When I create a report with these two variables, I'm getting a 'double' SQL - Select 1 with Max(Bill Date) and Select 2 with Max(Ship Date). I believe it's due to the Max function (group by). How do I eliminate the 'double' SQL?