// Drug similarity based on shared targets MATCH (c1:Compound)-[:BINDS]->(g:Gene)<-[:BINDS]-(c2:Compound) WHERE c1 <> c2 RETURN c1.name AS Drug1, c2.name AS Drug2, count(g) AS SharedGenes ORDER BY SharedGenes DESC LIMIT 20;