Skip to content
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

Fix query lower and upper bounds #15

Merged
merged 1 commit into from
Aug 17, 2023
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 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