Sql Join question

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.

Unless I misunderstood your requirements, one of these might help you:

select c.customerid
      ,a.shoppingcartitemid
  from (select shoppingcartitemid
          from table2
         group by shoppingcartitemid
         having count(*)=1
       ) as a
       inner join table2 as b
               on b.shoppingcartitemid
       inner join table1 as c
               on c.shoppingcartid=b.shoppingcartid
;
select a.customerid
      ,b.shoppingcartitemid
  from table1 as a
       inner join table2 as b
               on b.shoppingcartid=a.shoppingcartid
       left outer join table2 as c
                    on c.shoppingcartitemid=b.shoppingcartitemid
                   and c.shoppingcartid!=b.shoppingcartid
 where c.shoppingcartid is null
;
select a.customerid
      ,b.shoppingcartitemid
  from table1 as a
       inner join table2 as b
               on b.shoppingcartid=a.shoppingcartid
 where not exists(select 1
                    from table2 as c
                   where c.shoppingcartitemid=b.shoppingcartitemid
                     and c.shoppingcartid!=b.shoppingcartid
                 )
;