Reprise de la syntaxe de Robinson :
SELECT c.Id_Client, SUM(a.Id_Categorie IN (8,9)) AS 'Recherche', SUM(a.Id_Categorie IN (10,4)) AS 'Exclusion' FROM Commandes c INNER JOIN Produit p ON p.Id_Commande = c.Id_Commande INNER JOIN Article a ON a.Id_Article = p.Id_Article WHERE c.Id_Client = 123456 GROUP BY c.Id_Client HAVING SUM(a.Id_Categorie IN (8,9)) > 0 AND SUM(a.Id_Categorie IN (10,4)) = 0