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.

Problem in challenge Adding or Updating a Movie - Cypher Fundamentals

I believe the code is correct, but the system does not validate. I am stuck on this. Here is my code:
```

MERGE (m:Movie {title: 'Rocketman'})
ON MATCH SET m.matchedAt=datetime()
ON CREATE SET m.createdAt=datetime()
SET m.updatedAt=timestamp()
RETURN
m.titlem.matchedAtm.createdAtm.updatedAt

`

What is necessary to do?

Tks

 

8 REPLIES 8

The query executed in desktop. Can you send the question link? 

Did you run the query twice before validating it?  Here is the result I pulled from when I took the course:

/* First Run - only  createdAt and updatedAt will be set */
MERGE (m:Movie {title: 'Rocketman'})
/* perform the ON MATCH setting of the matchedAt property */
ON MATCH SET m.matchedAt = datetime()
/* perform the ON CREATE setting of the createdAt property */
ON CREATE SET m.createdAt = datetime()
/* set the updatedAt property */
SET m.updatedAt = timestamp()
RETURN m.title, m.createdAt, m.matchedAt, m.updatedAt;


/* Second Run - all three properties will be set */
MERGE (m:Movie {title: 'Rocketman'})
/* perform the ON MATCH setting of the matchedAt property */
ON MATCH SET m.matchedAt = datetime()
/* perform the ON CREATE setting of the createdAt property */
ON CREATE SET m.createdAt = datetime()
/* set the updatedAt property */
SET m.updatedAt = timestamp()
RETURN m.title, m.createdAt, m.matchedAt, m.updatedAt

Yeah, I run twice. Then I logged out, logged in again and try several times. I know the query is ok, I just wanted to finish 100% of the course.

I understand.  I finished the course and what I posted was from my course.  Maybe try deleting your sandbox. It will be recreated when to start the class the next time. 

Hi. I tried logout sandbox and login again with my database access and worked. Tks!

Hello @darciosavilela ,

Do you see the $neo4j prompt in the sandbox pane on the right?

I am wondering if your Course is using the sandbox instance.

Elaine

Hi, problem solved. I disconnected from my sandbox and logged in again.

tks

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online