SELECT 
    p1.name as product1,
    p2.name as product2,
    COUNT(*) as frequency
FROM transaction_sell_lines tsl1
JOIN transaction_sell_lines tsl2 ON tsl1.transaction_id = tsl2.transaction_id
JOIN products p1 ON tsl1.product_id = p1.id
JOIN products p2 ON tsl2.product_id = p2.id
WHERE tsl1.product_id < tsl2.product_id
GROUP BY p1.id, p2.id, p1.name, p2.name
HAVING COUNT(*) > 5
ORDER BY frequency DESC
LIMIT 10;