crystalize
Vendor
I am trying to create a report that will list the date of the last order placed by a customer, by ship to address.
I have 3 columns: Customer Key, Ship To Key, and Ship Date.
Sometimes the ship to key will be blank, meaning we need to default to the Customer Key because the ship to is the same as the Customer Key.
Many times there will be multiple entries for each Customer key and for each Ship To Key. I only want to show the last ship to date.
I am thinking it should go something like this:
If there is a cust key and a ship to key use the ship to key, if there is not a ship to key use the cust key.
Somehow, I need to select only the latest date for each of these.
I have 3 columns: Customer Key, Ship To Key, and Ship Date.
Sometimes the ship to key will be blank, meaning we need to default to the Customer Key because the ship to is the same as the Customer Key.
Many times there will be multiple entries for each Customer key and for each Ship To Key. I only want to show the last ship to date.
I am thinking it should go something like this:
If there is a cust key and a ship to key use the ship to key, if there is not a ship to key use the cust key.
Somehow, I need to select only the latest date for each of these.