Last active
June 17, 2016 10:53
-
-
Save nando/3af9ddeda7164d6b0f8d2f9f8b3899cf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE | |
(el_evento:Document | |
{title: "EL EVENTO", desc: "al viento"}), | |
(el_foso:Document | |
{title: "EL FOSO", desc: "con nitroso"}), | |
(los_estorninos:Document | |
{title: "Los estorninos", desc: "en el camino"}), | |
(edo:Project {name: "Espacio de Ocio"}), | |
(primeriti:Project {name:"Primeriti"}), | |
(rda:Project {name: "Regalo de Ana"}), | |
(nando:Human {name: 'Nando'}), | |
(carlos:Human {name: 'Carlos'}), | |
(isa:Human {name: 'Isa'}), | |
(alex:Human {name: 'Alex'}), | |
(freddy:Human {name: 'Freddy'}), | |
(pau:Human {name: 'Pau'}), | |
(nando)-[:HA_PEDALEADO_EN]->(primeriti), | |
(nando)-[:HA_PEDALEADO_EN]->(rda), | |
(carlos)-[:HA_PEDALEADO_EN]->(edo), | |
(carlos)-[:HA_PEDALEADO_EN]->(rda), | |
(isa)-[:HA_PEDALEADO_EN]->(edo), | |
(isa)-[:HA_PEDALEADO_EN]->(rda), | |
(alex)-[:HA_PEDALEADO_EN]->(primeriti), | |
(alex)-[:HA_PEDALEADO_EN]->(edo), | |
(alex)-[:HA_PEDALEADO_EN]->(rda), | |
(freddy)-[:HA_PEDALEADO_EN]->(primeriti), | |
(freddy)-[:HA_PEDALEADO_EN]->(rda), | |
(pau)-[:HA_PEDALEADO_EN]->(edo), | |
(el_evento)-[:VÍA]->(nando), | |
(el_foso)-[:VÍA]->(carlos), | |
(los_estorninos)-[:VÍA]->(pau), | |
// Incorporaciones al grafo para poder subir nota (ejercicio 2) | |
(spp:Project {name: "SuperPerfumerias"}), | |
(pau)-[:HA_PEDALEADO_EN]->(spp), | |
(alsanars:Human {name: 'Álvaro'}), | |
(alsanars)-[:HA_PEDALEADO_EN]->(spp), | |
(el_microsite:Document | |
{title: "El Microsite", desc: "in the sky"}), | |
(el_microsite)-[:VÍA]->(alsanars), | |
// Incorporamos elementos para subir nota en la asignatura :) | |
(ror_conf:Event {name: "Conferencia Rails"}), | |
(ux_spain:Event {name: "Ux Spain"}), | |
(pau)-[:HA_ASISTIDO_A]->(ux_spain), | |
(alsanars)-[:HA_ASISTIDO_A]->(ror_conf), | |
(carlos)-[:HA_ASISTIDO_A]->(ror_conf), | |
(nando)-[:HA_ASISTIDO_A]->(ror_conf) | |
RETURN *; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MATCH (proyecto:Project), | |
(evento:Event), | |
(nando:Human { name:'Nando' }), | |
(chiste:Document)-[:VÍA]->(pedaler:Human) | |
WHERE NOT (chiste)-[:VÍA]->(nando) AND | |
NOT (pedaler)-[:HA_PEDALEADO_EN]->()<-[:HA_PEDALEADO_EN]-(nando) AND | |
(pedaler)-[:HA_PEDALEADO_EN]->(proyecto) AND | |
(pedaler)-[:HA_ASISTIDO_A]->(evento)<-[:HA_ASISTIDO_A]-(nando) | |
RETURN proyecto,evento,pedaler,chiste |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
"Chiste que me haya contado alguien con quien haya ido a algún evento pero con quien no haya trabajado"