0
0

More than 3 years have passed since last update.

neo4jでsandbox その10

Posted at

概要

neo4jでsandboxやってみた。
movielens、やってみた。
レコメンドしてみた。

とりあえず、評価の良い映画をお勧め。

MATCH (u:User {id:21})
MATCH (u)-[r:RATING]->(m:Movie)
WITH u,
    avg(r.rating) AS average
MATCH (u)-[r:RATING]->(m:Movie)
WHERE r.rating > average
RETURN m.title, 
    r.rating
limit 5

python実行結果

title        rating
Short Circuit (1986)   4.0
Rush Hour (1998)   3.5
Da Vinci Code, The (2006)   3.5
Never Say Never Again (1983)   5.0
Thunderball (1965)   4.5

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0