Filter results so it doesn't contain the product of interest
Last updated
Last updated
1. Weβll want just to show all the products that customers purchased that donβt include the product of interest. Since all the items are flat, we can use NOT IN
and filter out the result set.
Action Item: Delete all the SQL code in the editor and apply the code snippet below. We're going to be building on the previous query we wrote:
Major SQL code highlights:
We added lines 56-66.
On lines 61-66, we filter out the purchase results from line 44 to not contain products that the customer viewed or added to the cart.
The query results should look similar to this:
NOTE: You can find us on the Rockset Community if you have questions or comments about the workshop.