I have a working query as
SELECT p.id,
p.name AS ProductName,
count(DISTINcT s.salesid) as Sales,
Count(DISTINCT l.linkid) as Links
FROM products p
LEFT JOIN sales s ON p.id=s.productid
LEFT JOIN links l ON p.id=l.productid
GROUP BY p.id
Now, I need only those records where either sales is not equal to 0 or links is not equal to 0 or both are not equal to 0
How can I achieve this?