Course Hero Logo
Question
Answered step-by-step

NEO4J. Neo4J:HW5.12. Purchase list vs Wish list Database...

Image transcription text

Neo4J:HW5.12. Purchase list vs Wish list Database Description Given a Graph Database with three kinds of nodes -- Product, Brand and Person : BOUGHT Product Person WISHLIST BELONGS_TO Brand Nodes: Product Node: each Product has a unique id (pproduct_id), name (product_name), price (price), quantity on stock (quantity) and rating (rate). Brand Node: each Brand has a unique id (brand_id), name (brand_name) and year established (year_established) Person Node: each Person has their unique id (person_id), name (person_name) and birth year (birth_year). Relationships: . The Person and Product nodes have (: Person)- [: BOUGHT ]-> (: Product) type of relationship. A Person may have purchased many products. The Person and Product nodes also have ( : Person) - [ : WISHLIST ]->( : Product) type of relationship, A Person may have many products in their wish list. The Product and Brand nodes have ( : Product ) - [: BELONGS_TO]-> (: Brand) type of relationship. A Brand may have more than one product. Question Description Write a single query to return the result of following two queries: . Person name and a list of products they have purchased from one of these brands ('Apple', 'Samsung', Sony") along with the total price of their purchase. Person name and a list of products in their wishlist along with the total price of products in their wishlist. Return the result only if they have at least three products in their wish list. Return the person name as name, the corresponding products list as outputList and the total price as price. NOTES AND HINTS: Please use UNION operator for this question. Round the total price to the nearest integer Return only unique products

... Show more

NEO4J

Answer & Explanation
Verified Solved by verified expert
<p>o. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laor</p> Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet

Unlock full access to Course Hero

Explore over 16 million step-by-step answers from our library

Subscribe to view answer

gue

ilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Do
Step-by-step explanation

Donec aliquet. Lorem

x

, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus