1
Ich habe eine Arbeits Abfrage alsMySQL-Abfrage, wo Bedingung Problem
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
Nun, ich brauche nur die Datensätze, bei denen entweder Verkäufen auf 0 oder Links nicht gleich ist nicht gleich 0 oder beide nicht gleich 0
Wie kann ich das erreichen?
es funktioniert, dank –