(word:WORD) WHERE movie.name = ‘titanic’ RETURN movie, word ❖ MATCH (movie) - [:CONTAINS] -> (word) WHERE movie:MOVIE AND word:WORD AND movie.name = ‘titanic’ RETURN movie, word ❖ MATCH (movie:MOVIE) - [:CONTAINS] -> (word:WORD) WHERE movie.name = ‘titanic’ AND EXISTS(movie.date) RETURN movie, word
(word:WORD) WHERE movie.name STARTS WITH ‘tita’ RETURN movie, word ❖ MATCH (movie:MOVIE) - [:CONTAINS] -> (word:WORD) WHERE toLower(movie.name) ENDS WITH ‘nic’ RETURN movie, word ❖ MATCH (movie:MOVIE) - [:CONTAINS] -> (word:WORD) WHERE movie.name = ‘titanic’ AND EXISTS((movie) - [:CONTAINS] -> (word)) RETURN movie, word ❖ MATCH (movie:MOVIE) - [:CONTAINS] -> (word:WORD) WHERE movie.name IN [‘scarface’, ‘titanic’] RETURN movie, word
(w:WORD) RETURN w ❖ MATCH (:MOVIE{name:"titanic"}) - [*2] -> (w:WORD) RETURN w ❖ MATCH p = shortestPath((user:USER) - [*] - (sb:SUB_CATEGORY)) WHERE user.name = 'Juan' RETURN p
-> (word:WORD) RETURN movie, word.text ❖ MATCH (w:WORD) RETURN count(w) ❖ MATCH (m:MOVIE{name:'GOT'}) - [:CONTAINS] -> (w:WORD) RETURN m, count(w.text) as count_word ❖ MATCH (m:MOVIE{name:'GOT'}) - [:CONTAINS] -> (w:WORD) RETURN m, collect(w.text) ❖ MATCH (m:MOVIE) - [:CONTAINS] -> (w:WORD) WITH m, count(w) as count_words WHERE count_words >= 2 RETURN m
BY m.name desc ❖ MATCH (m:MOVIE) RETURN m as movie ORDER BY m.name desc LIMIT 2 ❖ WITH [1, 2, 3] AS list UNWIND list AS row RETURN row ❖ WITH ["titanic", "GOT", "Toy Story"] AS movies UNWIND movies AS movie MATCH (m:MOVIE{name:movie}) RETURN m ❖ CREATE CONSTRAINT ON (p:Person) ASSERT (p.name, p.born) IS NODE KEY
cuantos numeros de trofeos en total tiene un usuario. ❖ Obtener todas las palabras por película pero en una lista. ❖ Cuantas palabras está viendo en total el usuario. ❖ Obtenga los usuarios que tienen solo una medalla Ejercicios