Skip to content

fix typo #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion documentation/query-upx.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ WITH o, c ORDER BY c.categoryName
WITH o, collect(DISTINCT c.categoryName) as categories
// only orders with more than one category
WHERE size(categories) > 1
// count how frequently the pairings occurr
// count how frequently the pairings occur
RETURN categories, count(*) as freq
// order by frequency
ORDER BY freq DESC
Expand Down
14 changes: 7 additions & 7 deletions documentation/query.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Try it out by typing in and executing the following Cypher query:

[source,cypher]
----
MATCH path=(:Product)-[:PART_OF]->(c:Category)
MATCH path=(:Product)-[:PART_OF]->(c:Category)
WHERE c.categoryName = 'Produce'
RETURN path;
----
Expand Down Expand Up @@ -99,7 +99,7 @@ Change your query to:

[source,cypher]
----
MATCH (p:Product)-[:PART_OF]->(c:Category)
MATCH (p:Product)-[:PART_OF]->(c:Category)
WHERE c.categoryName = 'Produce'
RETURN p.productName,c.categoryName;
----
Expand Down Expand Up @@ -162,10 +162,10 @@ MATCH (o:Order)-[:ORDERS]->(:Product)-[:PART_OF]->(c:Category)
// retain same ordering of categories
WITH o, c ORDER BY c.categoryName
// aggregate categories by order into a list of names
WITH o, collect(DISTINCT c.categoryName) as categories
WITH o, collect(DISTINCT c.categoryName) as categories
// only orders with more than one category
WHERE size(categories) > 1
// count how frequently the pairings occurr
// count how frequently the pairings occur
RETURN categories, count(*) as freq
// order by frequency
ORDER BY freq DESC
Expand All @@ -185,7 +185,7 @@ MATCH (c:Customer)-[:PURCHASED]->(:Order)-[:ORDERS]->(p:Product)<-[:ORDERS]-(:Or
// don't want the same customer pair twice
WHERE c < c2
// sort by the top-occuring products
WITH c, c2, p, count(*) as productOccurrence
WITH c, c2, p, count(*) as productOccurrence
ORDER BY productOccurrence DESC
// return customer pairs ranked by similarity and the top 5 products
RETURN c.companyName, c2.companyName, sum(productOccurrence) as similarity, collect(distinct p.productName)[0..5] as topProducts
Expand Down Expand Up @@ -221,8 +221,8 @@ This should give you a good starting point to see the power of graph queries.

You can learn more about Cypher here:

* https://graphacademy.neo4j.com/categories/cypher/[Cypher Online Courses^]
* https://neo4j.com/docs/cypher-manual/current/introduction/[Cypher Manual^]
* https://graphacademy.neo4j.com/categories/cypher/[Cypher Online Courses^]
* https://neo4j.com/docs/cypher-manual/current/introduction/[Cypher Manual^]
* https://neo4j.com/docs/cypher-cheat-sheet/5/auradb-enterprise/[Cypher Cheat-Sheet^].


Expand Down