0

When I'm executing a query on my dataset, ti seems that there's a difference between queries MATCH (a)<--(b)-->(c) and MATCH (a)<--(b) MATCH (b)-->(c). The first one gives we 486 distinct results and the second one gives me only 334?

MPesi
  • 212
  • 8

1 Answers1

0

I would say it depends mostly on what you are returning from the query. Let's say the return clause for the first query is

RETURN DISTINCT a, b, c

and for the second one

RETURN DISTINCT b, c

While the second query returns 334 distinct results for the pattern

(b)-->(c)

the number of distinct results would be larger (or the same) if you included node

(a)

in the results. This is because you are only returning distinct results. Without

DISTINCT

if you included node

(a)

in the results, the number of results would remain the same.

MPesi
  • 212
  • 8