-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsamples.yaml
25 lines (22 loc) · 1.01 KB
/
samples.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
samples:
- name: "Find 10 nodes and their relationships"
command: "MATCH (n)-[r]->(m) RETURN n, r, m LIMIT 10"
- name: "Find product with highest total sales"
command: "MATCH (p:Product)<-[r:ProOrderToPro]-(po:ProductOrder)
WITH p, SUM(po.quantity) AS totalQuantity
ORDER BY totalQuantity DESC
LIMIT 1
MATCH (p)<-[r:ProOrderToPro]-(po:ProductOrder)
RETURN p, r, po"
- name: "Find top 2 selling products with inventory status"
command: "MATCH (p:Product)<-[r:ProOrderToPro]-(po:ProductOrder)
WITH p, SUM(po.quantity) AS totalQuantity
ORDER BY totalQuantity DESC
LIMIT 2
MATCH (p)-[proInventory:ProductInventory]-(inventory:Inventory)
RETURN p, proInventory, inventory"
- name: "Find products without any sales"
command: "MATCH (p:Product)
WHERE NOT (p)<-[:ProOrderToPro]-(:ProductOrder)
RETURN p
LIMIT 10"