cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Using subqueries

Hello guys

I'm stucked with this one. I don't get an error, but the output is not as expected. Here is my code:
``
MATCH (g:Genre)

CALL {
WITH g
MATCH (m:Movie)-[:IN_GENRE]->(g)
WHERE g.name is not null
and
m.countries IN ['France']
return count(m) as numMovies
}
RETURN g.name AS genre, numMovies
order by numMovies desc
`
The output of this query is a column 'genre' that seems ok, but column numMovies is 0 in all rows. Any advice?
 
tks,
Darcio
1 REPLY 1

Hello guys,

I was abble to understand what was wrong: 

...

'France' IN m.countries

...

tks!

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online