Skip to content

Commit

Permalink
Merge pull request #15 from prrao87/new-queries
Browse files Browse the repository at this point in the history
Fix query lower and upper bounds
  • Loading branch information
prrao87 authored Aug 17, 2023
2 parents 3f98f9c + e06a425 commit 352d15a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion kuzudb/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def run_query4(conn: Connection, params: list[tuple[str, Any]]) -> None:
"How many persons between a certain age range are in each country?"
query = """
MATCH (p:Person)-[:LivesIn]->(ci:City)-[*1..2]->(country:Country)
WHERE p.age > $age_lower AND p.age < $age_upper
WHERE p.age >= $age_lower AND p.age <= $age_upper
RETURN country.country AS countries, count(country) AS personCounts
ORDER BY personCounts DESC LIMIT 3;
"""
Expand Down
2 changes: 1 addition & 1 deletion neo4j/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def run_query3(session: Session, country: str) -> None:
def run_query4(session: Session, age_lower: int, age_upper: int) -> None:
query = """
MATCH (p:Person)-[:LIVES_IN]->(ci:City)-[*1..2]->(country:Country)
WHERE p.age > $age_lower AND p.age < $age_upper
WHERE p.age => $age_lower AND p.age <= $age_upper
RETURN country.country AS countries, count(country) AS personCounts
ORDER BY personCounts DESC LIMIT 3
"""
Expand Down

0 comments on commit 352d15a

Please sign in to comment.