Help for this page

Select Code to Download


  1. or download this
    SELECT a.product as product_a, a.customer, b.product as product_b 
    FROM Sales a INNER JOIN Sales b ON a.Customer = b.Customer
    WHERE a.product < b.product
    
  2. or download this
    SELECT a.product as product_a, b.product as product_b, count(*) as pop
    +ularity 
    FROM Sales a INNER JOIN Sales b ON a.Customer = b.Customer WHERE a.pro
    +duct < b.product
    GROUP BY a.product, b.product