So I want to combine two tables using a union with orders superseding carts. The query for the union looks like this:
SELECT o1.EMAILADDRESS, o1.EVENTNAME
FROM ZZ001Email1RegionOrdersFinal o1
WHERE o1.EMAILADDRESS = 'andy.devoto@vividseats.com'
UNION
SELECT c1.EMAILADDRESS, c1.EVENTNAME
FROM ZZ001Email1RegionCartsFinal c1
WHERE c1.EMAILADDRESS = 'andy.devoto@vividseats.com'
Attached are the results that the order query alone has and the results the union has (which is the users cart). I am wondering why the order isn't overwriting the cart as it should.
The left image is what results from just running the top (Orders) query and the right image is what results from running the union query with results the cart when it should result the order.