Hi ,
I need to create a view with the following requirement.
There are 2 tables.
Table 1: CustomerInfo
CustomerId ShoppingCartId LastCngDTime
10 100 03/21/2019 12:14:000
10 200 03/22/2019 16:27:000
20 300 03/21/2019 11:30:000
20 400 03/22/2019 13:01:000
Table 2: ShoppingInfo
ShoppingCartId ShoppingCartItemsId
100 1000
100 1001
100 1002
100 1003
200 1002
200 1003
300 1005
300 1006
300 1007
400 1005
400 1006
400 1007
400 1008
I need to select the CustomerId and ShoppingCartItemsId every time a ShoppingCartItemsId was added or deleted from the one previous ShoppingCartId. In the above example, I need to send the following:
CustomerId ShoppingCartItemsId
10 1000
10 1001
20 1008
Can some one please provide me suggestions on the joins etc to achieve this?
Thank You.