Repo:
Docker Hub:
Neo4j Flights Image in Docker Hub
Workshop:
| // clean up | |
| MATCH (:City)-[cw:CONNECT_WITH]-(:City) | |
| DELETE cw | |
| // external calls - total | |
| MATCH (c1:City)<-[:FROM]-(:Person)-[]->(c:Call)<-[]-(:Person)-[:FROM]->(c2:City) | |
| WHERE id(c1) > id(c2) | |
| WITH c1.name as from, c2.name as to, count(c) as calls | |
| RETURN sum(calls) as s |
| // algorithm | |
| CALL algo.degree.stream("City", "CONNECT_WITH", { direction: "both", weightProperty: "calls" }) YIELD nodeId, score | |
| RETURN algo.asNode(nodeId).name AS name, score | |
| ORDER BY score DESC | |
| // manual calculation | |
| MATCH (c:City)-[cw:CONNECT_WITH]-(:City) | |
| RETURN c.name as name, SUM(cw.calls) as score | |
| ORDER BY score DESC |
| CALL algo.scc( | |
| 'MATCH (p:Person)-[:FROM]->(:City { name: "Bangkok" }) RETURN id(p) as id', | |
| 'MATCH (p1:Person)-[:OUT]->(:Call)<-[:IN]-(p2:Person) RETURN id(p1) as source, id(p2) as target', | |
| { write: true, writeProperty: 'communityId', graph:'cypher' }) | |
| YIELD communityCount | |
| MATCH (p:Person)-[:FROM]->(:City { name: "Bangkok" }) | |
| WITH p.name as name, p.communityId as communityId | |
| RETURN communityId, count(name) as total | |
| ORDER BY total DESC |
| const [scaleValue] = useState(new Animated.Value(1)) | |
| const waterAnimation = () => { | |
| Animated.sequence([ | |
| Animated.timing(scaleValue, { // 1 | |
| toValue: 1.2, | |
| duration: 1500, | |
| easing: Easing.linear | |
| }), | |
| Animated.timing(scaleValue, { // 2 |
| MATCH (n) DETACH DELETE n; | |
| MERGE (org:Organization { name: "StarWars Company", taxid: 111222333 }) | |
| MERGE (d0:Department { name: "IT" }) | |
| MERGE (d1:Department { name: "Frontend" }) | |
| MERGE (d2:Department { name: "DevOps" }) | |
| MERGE (d3:Department { name: "Website" }) | |
| MERGE (luke:Person { name: "Luke Skywalker" }) | |
| MERGE (r2d2:Person { name: "R2D2" }) |
Repo:
Docker Hub:
Neo4j Flights Image in Docker Hub
Workshop:
| MATCH p=(a1:Airport { code: "BKK" })-[:FLIES_TO]->(a2:Airport { code: "ARN" }) | |
| RETURN p |
| MATCH (o:Organization)-[:CONTAINS]->(d:Department) | |
| RETURN * | |
| MATCH (p:Person)-[:WORK_FOR]->(o:Organization) | |
| RETURN * | |
| MATCH (o:Organization)-[:CONTAINS]->(d:Department)-[:LEAD_BY]->(p:Person) | |
| RETURN d, p | |
| MATCH (p:Project)-[:OWNED_BY]->(d:Department) |
| CALL graphql.idl("type Airline { code: String! name: String! country: String! }"); | |
| CALL graphql.schema(); |
| { | |
| Airline(first: 10){ | |
| code | |
| name | |
| flights(first: 5) { | |
| flightNumber | |
| } | |
| } | |
| } |