<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://nosqlzoo.net/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ChrisHouston</id>
	<title>NoSQLZoo - User contributions [en-gb]</title>
	<link rel="self" type="application/atom+xml" href="https://nosqlzoo.net/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ChrisHouston"/>
	<link rel="alternate" type="text/html" href="https://nosqlzoo.net/wiki/Special:Contributions/ChrisHouston"/>
	<updated>2026-04-17T02:03:38Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/Cypher_Cheat_Sheet&amp;diff=1417</id>
		<title>Space Race/Cypher Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/Cypher_Cheat_Sheet&amp;diff=1417"/>
		<updated>2020-02-19T08:54:46Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Cypher Cheat Sheet=&lt;br /&gt;
==Match==&lt;br /&gt;
&amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/Cypher_Cheat_Sheet&amp;diff=1416</id>
		<title>Space Race/Cypher Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/Cypher_Cheat_Sheet&amp;diff=1416"/>
		<updated>2020-02-19T08:53:07Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: /* Cypher Cheat Sheet */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Cypher Cheat Sheet=&lt;br /&gt;
==Match==&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/Schema&amp;diff=1415</id>
		<title>Space Race/Schema</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/Schema&amp;diff=1415"/>
		<updated>2019-12-09T09:20:33Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Space Race Schema==&lt;br /&gt;
&amp;lt;p&amp;gt;Node labels and related properties:&lt;br /&gt;
* &amp;lt;code&amp;gt;:Person:Astronaut{first_name, middle_names, surname, nickname, dob, unique_achievement, wiki_link}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:Component{name, translation, notes, launched, wiki_link}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:Country{name, abbrev, wiki_link}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:Institution{name, abbrev, formed, wiki_link}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:LaunchVehicle{name, notes, first_flight, last_flight, wiki_link, launches, failures, successes, reusable, is_rocket}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:Mission{name, start_date_time, end_date_time, type, wiki_link, notes}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:Program{name, goal, translation, wiki_link}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:SpaceStation{name, wiki_link, launched, reentry, is_modular}&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt; Relationships and properties&lt;br /&gt;
*&amp;lt;code&amp;gt;:CREWED&amp;lt;/code&amp;gt; Astronauts &#039;&#039;Crew&#039;&#039; Missions&lt;br /&gt;
*&amp;lt;code&amp;gt;:BORN_IN&amp;lt;/code&amp;gt;Persons are &#039;&#039;Born in&#039;&#039; Countries&lt;br /&gt;
*&amp;lt;code&amp;gt;:RUN_BY&amp;lt;/code&amp;gt;Institutions are &#039;&#039;Run by&#039;&#039; Countries, Programs are &#039;Run by&#039; Institutions&lt;br /&gt;
*&amp;lt;code&amp;gt;:LAUNCHED_ON&amp;lt;/code&amp;gt; Missions are &#039;&#039;Launched on&#039;&#039; Launch Vehicles, non modular Space Stations can be &#039;&#039;Launched on&#039;&#039; Launch Vehicles, Components can be &#039;&#039;Launched on&#039;&#039; Launch Vehicles&lt;br /&gt;
*&amp;lt;code&amp;gt;:PART_OF&amp;lt;/code&amp;gt; Missions are &#039;&#039;Part of&#039;&#039; Programs&lt;br /&gt;
*&amp;lt;code&amp;gt;:EMPLOYED_BY&amp;lt;/code&amp;gt;Astronauts are &#039;&#039;Employed by&#039;&#039; Institutions&lt;br /&gt;
*&amp;lt;code&amp;gt;:RENDEZVOUSED_WITH{distance_in_metres}&amp;lt;/code&amp;gt;Missions can &#039;&#039;Rendezvous with&#039;&#039; other Missions&lt;br /&gt;
*&amp;lt;code&amp;gt;:DOCKED_WITH{date_time}&amp;lt;/code&amp;gt;Missions can &#039;&#039;Dock with&#039;&#039; other Missions&lt;br /&gt;
*&amp;lt;code&amp;gt;:RENDEZVOUSED_AND_DOCK_WITH{successful_dock, start_dock, end_dock}&amp;lt;/code&amp;gt;Missions can &#039;&#039;Rendezvous and dock&#039;&#039; with Space Stations&lt;br /&gt;
*&amp;lt;code&amp;gt;:FORMERLY&amp;lt;/code&amp;gt;Institutions can be &#039;&#039;Formerly&#039;&#039; other Institutions, Countries can be &#039;&#039;Formerly&#039;&#039; other Countries &lt;br /&gt;
*&amp;lt;code&amp;gt;:IS_COMPONENT_OF&amp;lt;/code&amp;gt;Each Component &#039;&#039;Is component of&#039;&#039; a Space Station&lt;br /&gt;
*&amp;lt;code&amp;gt;:OPERATED_BY&amp;lt;/code&amp;gt;LaunchVehicles are &#039;&#039;Operated by&#039;&#039; Institutions&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/Schema&amp;diff=1414</id>
		<title>Space Race/Schema</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/Schema&amp;diff=1414"/>
		<updated>2019-12-09T09:19:06Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: Created page with &amp;quot;==Space Race Schema== &amp;lt;p&amp;gt;Node labels and related properties: * &amp;lt;code&amp;gt;:Person:Astronaut{first_name, middle_names, surname, nickname, dob, unique_achievement, wiki_link}&amp;lt;/code&amp;gt;...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Space Race Schema==&lt;br /&gt;
&amp;lt;p&amp;gt;Node labels and related properties:&lt;br /&gt;
* &amp;lt;code&amp;gt;:Person:Astronaut{first_name, middle_names, surname, nickname, dob, unique_achievement, wiki_link}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:Component{name, translation, notes, launched, wiki_link}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:Country{name, abbrev, wiki_link}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:Institution{name, abbrev, formed, wiki_link}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:LaunchVehicle{name, notes, first_flight, last_flight, wiki_link, launches, failures, successes, reusable, is_rocket}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:Mission{name, start_date_time, end_date_time, type, wiki_link, notes}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:Program{name, goal, translation, wiki_link}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;:SpaceStation{name, wiki_link, launched, reentry, is_modular}&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt; Relationships and properties&lt;br /&gt;
*&amp;lt;code&amp;gt;:CREWED&amp;lt;/code&amp;gt; Astronauts &#039;Crew&#039; Missions&lt;br /&gt;
*&amp;lt;code&amp;gt;:BORN_IN&amp;lt;/code&amp;gt;Persons are &#039;Born in&#039; Countries&lt;br /&gt;
*&amp;lt;code&amp;gt;:RUN_BY&amp;lt;/code&amp;gt;Institutions are &#039;Run by&#039; Countries, Programs are &#039;Run by&#039; Institutions&lt;br /&gt;
*&amp;lt;code&amp;gt;:LAUNCHED_ON&amp;lt;/code&amp;gt; Missions are &#039;Launched on&#039; Launch Vehicles, non modular Space Stations can be &#039;Launched on&#039; Launch Vehicles, Components can be &#039;Launched On&#039; Launch Vehicles&lt;br /&gt;
*&amp;lt;code&amp;gt;:PART_OF&amp;lt;/code&amp;gt; Missions are &#039;Part of&#039; Programs&lt;br /&gt;
*&amp;lt;code&amp;gt;:EMPLOYED_BY&amp;lt;/code&amp;gt;Astronauts are &#039;Employed by&#039; Institutions&lt;br /&gt;
*&amp;lt;code&amp;gt;:RENDEZVOUSED_WITH{distance_in_metres}&amp;lt;/code&amp;gt;Missions can &#039;Rendezvous with&#039; other Missions&lt;br /&gt;
*&amp;lt;code&amp;gt;:DOCKED_WITH{date_time}&amp;lt;/code&amp;gt;Missions can &#039;Dock with&#039; other Missions&lt;br /&gt;
*&amp;lt;code&amp;gt;:RENDEZVOUSED_AND_DOCK_WITH{successful_dock, start_dock, end_dock}&amp;lt;/code&amp;gt;Missions can &#039;Rendezvous and dock&#039; with Space Stations&lt;br /&gt;
*&amp;lt;code&amp;gt;:FORMERLY&amp;lt;/code&amp;gt;Institutions can be &#039;:Formerly&#039; other Institutions, Countries can be &#039;:Formerly: other Countries &lt;br /&gt;
*&amp;lt;code&amp;gt;:IS_COMPONENT_OF&amp;lt;/code&amp;gt;Each Component &#039;Is component of&#039; a Space Station&lt;br /&gt;
*&amp;lt;code&amp;gt;:OPERATED_BY&amp;lt;/code&amp;gt;LaunchVehicles are &#039;Operated by&#039; Institutions&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1413</id>
		<title>Space Race/MATCH Tutorial</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1413"/>
		<updated>2019-12-09T08:53:42Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Visualisation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&lt;br /&gt;
==Cypher Cheat Sheet==&lt;br /&gt;
[[Space_Race/Cypher_Cheat_Sheet]]&lt;br /&gt;
==Database Schema==&lt;br /&gt;
[[Space_Race/Schema]]&lt;br /&gt;
&lt;br /&gt;
==Institutions==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Use &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; to return nodes. Use &amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt; to specify what label(s) you wish the returned nodes to have. Not specifying any label will return ALL nodes&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Using AS can alias the result column to whatever you wish, as long as it does not have spaces&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Institutions instead of Astronauts&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n AS Astronauts;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Institution) RETURN n AS Institutions; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Neil Armstrong&#039;s Birthday==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;When simply matching based on properties of a node, use the &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt; with the format &amp;lt;code&amp;gt;{property:value}&amp;lt;/code&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return Neil Armstrong&#039;s date of birth&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Gagarin&amp;quot;,first_name:&amp;quot;Yuri&amp;quot;})RETURN n.dob AS DateOfBirth;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Armstrong&amp;quot;,first_name:&amp;quot;Neil&amp;quot;})RETURN n.dob AS DateOfBirth;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The Young and Old==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&amp;lt;code&amp;gt;ORDER BY&amp;lt;/code&amp;gt; works similarly to SQL, defaulting to ordering from low to high value. Adding &amp;lt;code&amp;gt;DESC&amp;lt;/code&amp;gt; instead orders the result in descending order&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the names of the Astronauts ordered by their date of birth, from oldest to youngest.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n.first_name AS FirstName, n.surname AS Surname ORDER BY n.surname;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n.first_name AS FirstName, n.surname As Surname ORDER BY n.dob;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Nicknames==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;In Neo4j, rather than empty properties being assigned a value of &amp;lt;code&amp;gt;NULL&amp;lt;/code&amp;gt; like in SQL, properties which are not assigned a value do not exist at all &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt; This can be checked using the &amp;lt;code&amp;gt;EXISTS()&amp;lt;/code&amp;gt; function&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the nicknames of the Astronauts who have them in reverse alphabetical order&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)WHERE EXISTS(n.middle_names) RETURN n.middle_names AS MiddleNames; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)WHERE EXISTS(n.nickname) RETURN n.nickname AS Nicknames  ORDER BY n.nickname DESC;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Counting up the missions==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;As in SQL, aggregate functions can be applied to the results of the MATCH query. Unlike SQL you do not need to group by other non-aggregate parameters &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Functions include &amp;lt;code&amp;gt;count()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;avg()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;min()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;max()&amp;lt;/code&amp;gt; and many more&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the number of missions that took place in the Space Race.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:LaunchVehicle)RETURN count(m) AS Count; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:Mission) RETURN count(m) AS Count;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Failure Rate==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Arithmetic and string operations can also be used in the return statement. Strings can be parsed in to integers or floats using the &amp;lt;code&amp;gt;toInteger()&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;toFloat()&amp;lt;/code&amp;gt; functions&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The reverse can be done using the &amp;lt;code&amp;gt;toString()&amp;lt;/code&amp;gt; function.&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the name and percentage failure rate for each LaunchVehicle, ordered by number of failures in descending order.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:LaunchVehicle)RETURN m.name, toInteger(m.launches); &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:LaunchVehicle) RETURN m.name AS Name, ((toFloat(m.failures)/toFloat(m.launches))*100) AS PercentageFailureRate ORDER BY PercentageFailureRate DESC;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1412</id>
		<title>Space Race/MATCH Tutorial</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1412"/>
		<updated>2019-12-09T08:49:48Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Visualisation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&lt;br /&gt;
==Cypher Cheat Sheet==&lt;br /&gt;
[[Space_Race/Cypher_Cheat_Sheet]]&lt;br /&gt;
&lt;br /&gt;
==Institutions==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Use &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; to return nodes. Use &amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt; to specify what label(s) you wish the returned nodes to have. Not specifying any label will return ALL nodes&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Using AS can alias the result column to whatever you wish, as long as it does not have spaces&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Institutions instead of Astronauts&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n AS Astronauts;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Institution) RETURN n AS Institutions; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Neil Armstrong&#039;s Birthday==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;When simply matching based on properties of a node, use the &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt; with the format &amp;lt;code&amp;gt;{property:value}&amp;lt;/code&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return Neil Armstrong&#039;s date of birth&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Gagarin&amp;quot;,first_name:&amp;quot;Yuri&amp;quot;})RETURN n.dob AS DateOfBirth;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Armstrong&amp;quot;,first_name:&amp;quot;Neil&amp;quot;})RETURN n.dob AS DateOfBirth;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The Young and Old==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&amp;lt;code&amp;gt;ORDER BY&amp;lt;/code&amp;gt; works similarly to SQL, defaulting to ordering from low to high value. Adding &amp;lt;code&amp;gt;DESC&amp;lt;/code&amp;gt; instead orders the result in descending order&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the names of the Astronauts ordered by their date of birth, from oldest to youngest.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n.first_name AS FirstName, n.surname AS Surname ORDER BY n.surname;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n.first_name AS FirstName, n.surname As Surname ORDER BY n.dob;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Nicknames==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;In Neo4j, rather than empty properties being assigned a value of &amp;lt;code&amp;gt;NULL&amp;lt;/code&amp;gt; like in SQL, properties which are not assigned a value do not exist at all &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt; This can be checked using the &amp;lt;code&amp;gt;EXISTS()&amp;lt;/code&amp;gt; function&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the nicknames of the Astronauts who have them in reverse alphabetical order&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)WHERE EXISTS(n.middle_names) RETURN n.middle_names AS MiddleNames; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)WHERE EXISTS(n.nickname) RETURN n.nickname AS Nicknames  ORDER BY n.nickname DESC;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Counting up the missions==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;As in SQL, aggregate functions can be applied to the results of the MATCH query. Unlike SQL you do not need to group by other non-aggregate parameters &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Functions include &amp;lt;code&amp;gt;count()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;avg()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;min()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;max()&amp;lt;/code&amp;gt; and many more&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the number of missions that took place in the Space Race.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:LaunchVehicle)RETURN count(m) AS Count; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:Mission) RETURN count(m) AS Count;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Failure Rate==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Arithmetic and string operations can also be used in the return statement. Strings can be parsed in to integers or floats using the &amp;lt;code&amp;gt;toInteger()&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;toFloat()&amp;lt;/code&amp;gt; functions&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The reverse can be done using the &amp;lt;code&amp;gt;toString()&amp;lt;/code&amp;gt; function.&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the name and percentage failure rate for each LaunchVehicle, ordered by number of failures in descending order.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:LaunchVehicle)RETURN m.name, toInteger(m.launches); &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:LaunchVehicle) RETURN m.name AS Name, ((toFloat(m.failures)/toFloat(m.launches))*100) AS PercentageFailureRate ORDER BY PercentageFailureRate DESC;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1411</id>
		<title>Space Race/MATCH Tutorial</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1411"/>
		<updated>2019-12-09T08:48:41Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Visualisation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&lt;br /&gt;
==Cypher Cheat Sheet==&lt;br /&gt;
[/Space_Race/Cypher_Cheat_Sheet]&lt;br /&gt;
&lt;br /&gt;
==Institutions==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Use &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; to return nodes. Use &amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt; to specify what label(s) you wish the returned nodes to have. Not specifying any label will return ALL nodes&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Using AS can alias the result column to whatever you wish, as long as it does not have spaces&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Institutions instead of Astronauts&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n AS Astronauts;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Institution) RETURN n AS Institutions; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Neil Armstrong&#039;s Birthday==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;When simply matching based on properties of a node, use the &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt; with the format &amp;lt;code&amp;gt;{property:value}&amp;lt;/code&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return Neil Armstrong&#039;s date of birth&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Gagarin&amp;quot;,first_name:&amp;quot;Yuri&amp;quot;})RETURN n.dob AS DateOfBirth;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Armstrong&amp;quot;,first_name:&amp;quot;Neil&amp;quot;})RETURN n.dob AS DateOfBirth;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The Young and Old==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&amp;lt;code&amp;gt;ORDER BY&amp;lt;/code&amp;gt; works similarly to SQL, defaulting to ordering from low to high value. Adding &amp;lt;code&amp;gt;DESC&amp;lt;/code&amp;gt; instead orders the result in descending order&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the names of the Astronauts ordered by their date of birth, from oldest to youngest.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n.first_name AS FirstName, n.surname AS Surname ORDER BY n.surname;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n.first_name AS FirstName, n.surname As Surname ORDER BY n.dob;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Nicknames==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;In Neo4j, rather than empty properties being assigned a value of &amp;lt;code&amp;gt;NULL&amp;lt;/code&amp;gt; like in SQL, properties which are not assigned a value do not exist at all &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt; This can be checked using the &amp;lt;code&amp;gt;EXISTS()&amp;lt;/code&amp;gt; function&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the nicknames of the Astronauts who have them in reverse alphabetical order&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)WHERE EXISTS(n.middle_names) RETURN n.middle_names AS MiddleNames; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)WHERE EXISTS(n.nickname) RETURN n.nickname AS Nicknames  ORDER BY n.nickname DESC;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Counting up the missions==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;As in SQL, aggregate functions can be applied to the results of the MATCH query. Unlike SQL you do not need to group by other non-aggregate parameters &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Functions include &amp;lt;code&amp;gt;count()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;avg()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;min()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;max()&amp;lt;/code&amp;gt; and many more&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the number of missions that took place in the Space Race.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:LaunchVehicle)RETURN count(m) AS Count; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:Mission) RETURN count(m) AS Count;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Failure Rate==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Arithmetic and string operations can also be used in the return statement. Strings can be parsed in to integers or floats using the &amp;lt;code&amp;gt;toInteger()&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;toFloat()&amp;lt;/code&amp;gt; functions&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The reverse can be done using the &amp;lt;code&amp;gt;toString()&amp;lt;/code&amp;gt; function.&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the name and percentage failure rate for each LaunchVehicle, ordered by number of failures in descending order.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:LaunchVehicle)RETURN m.name, toInteger(m.launches); &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:LaunchVehicle) RETURN m.name AS Name, ((toFloat(m.failures)/toFloat(m.launches))*100) AS PercentageFailureRate ORDER BY PercentageFailureRate DESC;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1410</id>
		<title>Space Race/MATCH Tutorial</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1410"/>
		<updated>2019-12-09T08:48:18Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Visualisation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&lt;br /&gt;
==Cypher Cheat Sheet==&lt;br /&gt;
[Space_Race/Cypher_Cheat_Sheet]&lt;br /&gt;
&lt;br /&gt;
==Institutions==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Use &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; to return nodes. Use &amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt; to specify what label(s) you wish the returned nodes to have. Not specifying any label will return ALL nodes&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Using AS can alias the result column to whatever you wish, as long as it does not have spaces&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Institutions instead of Astronauts&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n AS Astronauts;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Institution) RETURN n AS Institutions; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Neil Armstrong&#039;s Birthday==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;When simply matching based on properties of a node, use the &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt; with the format &amp;lt;code&amp;gt;{property:value}&amp;lt;/code&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return Neil Armstrong&#039;s date of birth&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Gagarin&amp;quot;,first_name:&amp;quot;Yuri&amp;quot;})RETURN n.dob AS DateOfBirth;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Armstrong&amp;quot;,first_name:&amp;quot;Neil&amp;quot;})RETURN n.dob AS DateOfBirth;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The Young and Old==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&amp;lt;code&amp;gt;ORDER BY&amp;lt;/code&amp;gt; works similarly to SQL, defaulting to ordering from low to high value. Adding &amp;lt;code&amp;gt;DESC&amp;lt;/code&amp;gt; instead orders the result in descending order&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the names of the Astronauts ordered by their date of birth, from oldest to youngest.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n.first_name AS FirstName, n.surname AS Surname ORDER BY n.surname;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n.first_name AS FirstName, n.surname As Surname ORDER BY n.dob;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Nicknames==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;In Neo4j, rather than empty properties being assigned a value of &amp;lt;code&amp;gt;NULL&amp;lt;/code&amp;gt; like in SQL, properties which are not assigned a value do not exist at all &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt; This can be checked using the &amp;lt;code&amp;gt;EXISTS()&amp;lt;/code&amp;gt; function&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the nicknames of the Astronauts who have them in reverse alphabetical order&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)WHERE EXISTS(n.middle_names) RETURN n.middle_names AS MiddleNames; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)WHERE EXISTS(n.nickname) RETURN n.nickname AS Nicknames  ORDER BY n.nickname DESC;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Counting up the missions==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;As in SQL, aggregate functions can be applied to the results of the MATCH query. Unlike SQL you do not need to group by other non-aggregate parameters &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Functions include &amp;lt;code&amp;gt;count()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;avg()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;min()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;max()&amp;lt;/code&amp;gt; and many more&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the number of missions that took place in the Space Race.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:LaunchVehicle)RETURN count(m) AS Count; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:Mission) RETURN count(m) AS Count;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Failure Rate==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Arithmetic and string operations can also be used in the return statement. Strings can be parsed in to integers or floats using the &amp;lt;code&amp;gt;toInteger()&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;toFloat()&amp;lt;/code&amp;gt; functions&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The reverse can be done using the &amp;lt;code&amp;gt;toString()&amp;lt;/code&amp;gt; function.&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the name and percentage failure rate for each LaunchVehicle, ordered by number of failures in descending order.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:LaunchVehicle)RETURN m.name, toInteger(m.launches); &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:LaunchVehicle) RETURN m.name AS Name, ((toFloat(m.failures)/toFloat(m.launches))*100) AS PercentageFailureRate ORDER BY PercentageFailureRate DESC;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/Cypher_Cheat_Sheet&amp;diff=1409</id>
		<title>Space Race/Cypher Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/Cypher_Cheat_Sheet&amp;diff=1409"/>
		<updated>2019-12-09T08:47:28Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: Created page with &amp;quot;==Cypher Cheat Sheet==&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Cypher Cheat Sheet==&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1408</id>
		<title>Space Race/MATCH Tutorial</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1408"/>
		<updated>2019-12-09T08:45:05Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Visualisation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&lt;br /&gt;
==Institutions==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Use &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; to return nodes. Use &amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt; to specify what label(s) you wish the returned nodes to have. Not specifying any label will return ALL nodes&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Using AS can alias the result column to whatever you wish, as long as it does not have spaces&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Institutions instead of Astronauts&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n AS Astronauts;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Institution) RETURN n AS Institutions; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Neil Armstrong&#039;s Birthday==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;When simply matching based on properties of a node, use the &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt; with the format &amp;lt;code&amp;gt;{property:value}&amp;lt;/code&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return Neil Armstrong&#039;s date of birth&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Gagarin&amp;quot;,first_name:&amp;quot;Yuri&amp;quot;})RETURN n.dob AS DateOfBirth;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Armstrong&amp;quot;,first_name:&amp;quot;Neil&amp;quot;})RETURN n.dob AS DateOfBirth;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The Young and Old==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&amp;lt;code&amp;gt;ORDER BY&amp;lt;/code&amp;gt; works similarly to SQL, defaulting to ordering from low to high value. Adding &amp;lt;code&amp;gt;DESC&amp;lt;/code&amp;gt; instead orders the result in descending order&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the names of the Astronauts ordered by their date of birth, from oldest to youngest.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n.first_name AS FirstName, n.surname AS Surname ORDER BY n.surname;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n.first_name AS FirstName, n.surname As Surname ORDER BY n.dob;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Nicknames==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;In Neo4j, rather than empty properties being assigned a value of &amp;lt;code&amp;gt;NULL&amp;lt;/code&amp;gt; like in SQL, properties which are not assigned a value do not exist at all &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt; This can be checked using the &amp;lt;code&amp;gt;EXISTS()&amp;lt;/code&amp;gt; function&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the nicknames of the Astronauts who have them in reverse alphabetical order&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)WHERE EXISTS(n.middle_names) RETURN n.middle_names AS MiddleNames; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)WHERE EXISTS(n.nickname) RETURN n.nickname AS Nicknames  ORDER BY n.nickname DESC;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Counting up the missions==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;As in SQL, aggregate functions can be applied to the results of the MATCH query. Unlike SQL you do not need to group by other non-aggregate parameters &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Functions include &amp;lt;code&amp;gt;count()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;avg()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;min()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;max()&amp;lt;/code&amp;gt; and many more&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the number of missions that took place in the Space Race.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:LaunchVehicle)RETURN count(m) AS Count; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:Mission) RETURN count(m) AS Count;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Failure Rate==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Arithmetic and string operations can also be used in the return statement. Strings can be parsed in to integers or floats using the &amp;lt;code&amp;gt;toInteger()&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;toFloat()&amp;lt;/code&amp;gt; functions&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The reverse can be done using the &amp;lt;code&amp;gt;toString()&amp;lt;/code&amp;gt; function.&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the name and percentage failure rate for each LaunchVehicle, ordered by number of failures in descending order.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:LaunchVehicle)RETURN m.name, toInteger(m.launches); &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:LaunchVehicle) RETURN m.name AS Name, ((toFloat(m.failures)/toFloat(m.launches))*100) AS PercentageFailureRate ORDER BY PercentageFailureRate DESC;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/Relationships_Tutorial&amp;diff=1407</id>
		<title>Space Race/Relationships Tutorial</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/Relationships_Tutorial&amp;diff=1407"/>
		<updated>2019-12-09T08:43:33Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;Relationships are the most powerful part of graph-based databases. While some of the functionality these provide is possible under SQL using join tables for many to many relationships, certain queries can be constructed which would require many joins in SQL. A good example is the number of connections required to link one node to another.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All relationships in Neo4j are directional, that is they have a start and end node. They can only possess a single &amp;lt;code&amp;gt;TYPE&amp;lt;/code&amp;gt;, rather than multiple labels, but they can also possess properties similar to nodes&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Visualisation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Relationship types==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;The &amp;lt;code&amp;gt;Type()&amp;lt;/code&amp;gt; function can return the type of a relationship&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the type of the relationship between Astronaut and Mission&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(:Astronaut)-[r]-&amp;gt;(:Country) RETURN DISTINCT type(r);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(:Astronaut)-[r]-&amp;gt;(:Mission)  RETURN DISTINCT type(r);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Born in Russia==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;The item in &amp;lt;code&amp;gt;[]&amp;lt;/code&amp;gt; represents a &amp;lt;strong&amp;gt;relationship&amp;lt;/strong&amp;gt; between nodes, in this case the relationship possessing the label &amp;quot;BORN_IN&amp;quot;&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Note the &amp;lt;code&amp;gt;(startNode)-[:LABEL_NAME]-&amp;gt;(endNode)&amp;lt;/code&amp;gt; format. The direction the arrow points shows which node is the end point.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;It is perfectly valid to express this relationship as &amp;lt;code&amp;gt;(endNode)&amp;lt;-[:LABEL_NAME]-(startNode)&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;If you are not concerned about the direction of the relationships, you can also &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; based on &amp;lt;code&amp;gt;(node1)-[:LABEL_NAME]-(node2)&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show the Surnames of Astronauts born in Russia, and the full name of Russia rather than the USA. Hint: Use the ISO 3166-1 Alpha-2 code in all caps&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[:BORN_IN]-&amp;gt;(c:Country) WHERE c.abbrev =&#039;USA&#039; RETURN n.surname, c.name;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[:BORN_IN]-&amp;gt;(c:Country) WHERE c.abbrev= &#039;RU&#039; RETURN n.surname, c.name;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Flight Colleagues==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Numerous relationships can be strung together. &amp;lt;code&amp;gt;DISTINCT&amp;lt;/code&amp;gt; can be used to only display a result once if that node is linked to multiple times&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show the names of everyone that James Lovell flew with.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Armstrong&amp;quot;})-[:CREWED]-&amp;gt;(a:Mission)&amp;lt;-[:CREWED]-(m:Astronaut)  RETURN DISTINCT m.surname, m.first_name; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Lovell&amp;quot;})-[:CREWED]-&amp;gt;(a:Mission)&amp;lt;-[:CREWED]-(m:Astronaut)  RETURN DISTINCT  m.surname, m.first_name;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Saturn V Missions==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Aggregate functions can also be used on the result of relationships queries&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show how many missions were launched on the Saturn V.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:LaunchVehicle{name:&amp;quot;Saturn V&amp;quot;})RETURN DISTINCT n; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(:LaunchVehicle{name:&amp;quot;Saturn V&amp;quot;})&amp;lt;-[r:LAUNCHED_ON]-(:Mission) RETURN count(r);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1406</id>
		<title>Space Race/MATCH Tutorial</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1406"/>
		<updated>2019-12-01T12:42:44Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Visualisation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&lt;br /&gt;
==Institutions==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Use &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; to return nodes. Use &amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt; to specify what label(s) you wish the returned nodes to have. Not specifying any label will return ALL nodes&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Using AS can alias the result column to whatever you wish, as long as it does not have spaces&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Institutions instead of Astronauts&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n AS Astronauts;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Institution) RETURN n AS Insitutions; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Neil Armstrong&#039;s Birthday==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;When simply matching based on properties of a node, use the &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt; with the format &amp;lt;code&amp;gt;{property:value}&amp;lt;/code&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return Neil Armstrong&#039;s date of birth&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Gagarin&amp;quot;,first_name:&amp;quot;Yuri&amp;quot;})RETURN n.dob AS DateOfBirth;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Armstrong&amp;quot;,first_name:&amp;quot;Neil&amp;quot;})RETURN n.dob AS DateOfBirth;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The Young and Old==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&amp;lt;code&amp;gt;ORDER BY&amp;lt;/code&amp;gt; works similarly to SQL, defaulting to ordering from low to high value. Adding &amp;lt;code&amp;gt;DESC&amp;lt;/code&amp;gt; instead orders the result in descending order&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the names of the Astronauts ordered by their date of birth, from oldest to youngest.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n.first_name AS FirstName, n.surname AS Surname ORDER BY n.surname;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n.first_name AS FirstName, n.surname As Surname ORDER BY n.dob;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Nicknames==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;In Neo4j, rather than empty properties being assigned a value of &amp;lt;code&amp;gt;NULL&amp;lt;/code&amp;gt; like in SQL, properties which are not assigned a value do not exist at all &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt; This can be checked using the &amp;lt;code&amp;gt;EXISTS()&amp;lt;/code&amp;gt; function&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the nicknames of the Astronauts who have them in reverse alphabetical order&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)WHERE EXISTS(n.middle_names) RETURN n.middle_names AS MiddleNames; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)WHERE EXISTS(n.nickname) RETURN n.nickname AS Nicknames  ORDER BY n.nickname DESC;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Counting up the missions==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;As in SQL, aggregate functions can be applied to the results of the MATCH query. Unlike SQL you do not need to group by other non-aggregate parameters &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Functions include &amp;lt;code&amp;gt;count()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;avg()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;min()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;max()&amp;lt;/code&amp;gt; and many more&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the number of missions that took place in the Space Race.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:LaunchVehicle)RETURN count(m) AS Count; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:Mission) RETURN count(m) AS Count;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Failure Rate==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Arithmetic and string operations can also be used in the return statement. Strings can be parsed in to integers or floats using the &amp;lt;code&amp;gt;toInteger()&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;toFloat()&amp;lt;/code&amp;gt; functions&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The reverse can be done using the &amp;lt;code&amp;gt;toString()&amp;lt;/code&amp;gt; function.&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the name and percentage failure rate for each LaunchVehicle, ordered by number of failures in descending order.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:LaunchVehicle)RETURN m.name, toInteger(m.launches); &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:LaunchVehicle) RETURN m.name AS Name, ((toFloat(m.failures)/toFloat(m.launches))*100) AS PercentageFailureRate ORDER BY PercentageFailureRate DESC;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1405</id>
		<title>Space Race/MATCH Tutorial</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1405"/>
		<updated>2019-12-01T12:42:25Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Visualisation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&lt;br /&gt;
==Institutions==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Use &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; to return nodes. Use &amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt; to specify what label(s) you wish the returned nodes to have. Not specifying any label will return ALL nodes&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Using AS can alias the result column to whatever you wish, as long as it does not have spaces&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Institutions instead of Astronauts&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n AS Astronauts;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Institution) RETURN n AS Insitutions; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Neil Armstrong&#039;s Birthday==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;When simply matching based on properties of a node, use the &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt; with the format &amp;lt;code&amp;gt;{property:value}&amp;lt;/code&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return Neil Armstrong&#039;s date of birth&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Gagarin&amp;quot;,first_name:&amp;quot;Yuri&amp;quot;})RETURN n.dob AS DateOfBirth;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Armstrong&amp;quot;,first_name:&amp;quot;Neil&amp;quot;})RETURN n.dob AS DateOfBirth;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The Young and Old==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&amp;lt;code&amp;gt;ORDER BY&amp;lt;/code&amp;gt; works similarly to SQL, defaulting to ordering from low to high value. Adding &amp;lt;code&amp;gt;DESC&amp;lt;/code&amp;gt; instead orders the result in descending order&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the names of the Astronauts ordered by their date of birth, from oldest to youngest.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n.first_name AS FirstName, n.surname AS Surname ORDER BY n.surname;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n.first_name AS FirstName, n.surname As Surname ORDER BY n.dob;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Nicknames==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;In Neo4j, rather than empty properties being assigned a value of &amp;lt;code&amp;gt;NULL&amp;lt;/code&amp;gt; like in SQL, properties which are not assigned a value do not exist at all &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt; This can be checked using the &amp;lt;code&amp;gt;EXISTS()&amp;lt;/code&amp;gt; function&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the nicknames of the Astronauts who have them in reverse alphabetical order&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)WHERE EXISTS(n.middle_names) RETURN n.middle_names AS MiddleNames; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)WHERE EXISTS(n.nickname) RETURN n.nickname AS Nicknames  ORDER BY n.nickname DESC;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Counting up the missions==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;As in SQL, aggregate functions can be applied to the results of the MATCH query. Unlike SQL you do not need to group by other non-aggregate parameters &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Functions include &amp;lt;code&amp;gt;count()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;avg()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;min()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;max()&amp;lt;/code&amp;gt; and many more&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the number of missions that took place in the Space Race.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:LaunchVehicle)RETURN count(m) AS Count; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:Mission) RETURN count(m) AS Count;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Failure Rate==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Arithmetic and string operations can also be used in the return statement. Strings can be parsed in to integers or floats using the &amp;lt;code&amp;gt;toInteger()&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;toFloat()&amp;lt;/code&amp;gt; functions&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The reverse can be done using the &amp;lt;code&amp;gt;toString()&amp;lt;/code&amp;gt; function.&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the name and percentage failure rate for each LaunchVehicle, ordered by number of failures in descending order.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:LaunchVehicle)RETURN m.name, toInteger(m.launches); &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:LaunchVehicle) RETURN m.name AS Name, ((toFloat(m.failures)/toFloat(m.launches))*100) AS PercentageFailureRate ORDER BY PercentageFailureRate;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1404</id>
		<title>Space Race/MATCH Tutorial</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1404"/>
		<updated>2019-12-01T12:41:57Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Visualisation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&lt;br /&gt;
==Institutions==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Use &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; to return nodes. Use &amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt; to specify what label(s) you wish the returned nodes to have. Not specifying any label will return ALL nodes&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Using AS can alias the result column to whatever you wish, as long as it does not have spaces&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Institutions instead of Astronauts&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n AS Astronauts;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Institution) RETURN n AS Insitutions; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Neil Armstrong&#039;s Birthday==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;When simply matching based on properties of a node, use the &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt; with the format &amp;lt;code&amp;gt;{property:value}&amp;lt;/code&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return Neil Armstrong&#039;s date of birth&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Gagarin&amp;quot;,first_name:&amp;quot;Yuri&amp;quot;})RETURN n.dob AS DateOfBirth;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Armstrong&amp;quot;,first_name:&amp;quot;Neil&amp;quot;})RETURN n.dob AS DateOfBirth;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The Young and Old==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&amp;lt;code&amp;gt;ORDER BY&amp;lt;/code&amp;gt; works similarly to SQL, defaulting to ordering from low to high value. Adding &amp;lt;code&amp;gt;DESC&amp;lt;/code&amp;gt; instead orders the result in descending order&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the names of the Astronauts ordered by their date of birth, from oldest to youngest.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n.first_name AS FirstName, n.surname AS Surname ORDER BY n.surname;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n.first_name AS FirstName, n.surname As Surname ORDER BY n.dob;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Nicknames==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;In Neo4j, rather than empty properties being assigned a value of &amp;lt;code&amp;gt;NULL&amp;lt;/code&amp;gt; like in SQL, properties which are not assigned a value do not exist at all &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt; This can be checked using the &amp;lt;code&amp;gt;EXISTS()&amp;lt;/code&amp;gt; function&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the nicknames of the Astronauts who have them in reverse alphabetical order&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)WHERE EXISTS(n.middle_names) RETURN n.middle_names AS MiddleNames; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)WHERE EXISTS(n.nickname) RETURN n.nickname AS Nicknames  ORDER BY n.nickname DESC;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Counting up the missions==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;As in SQL, aggregate functions can be applied to the results of the MATCH query. Unlike SQL you do not need to group by other non-aggregate parameters &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Functions include &amp;lt;code&amp;gt;count()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;avg()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;min()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;max()&amp;lt;/code&amp;gt; and many more&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the number of missions that took place in the Space Race.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:LaunchVehicle)RETURN count(m) AS Count; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:Mission) RETURN count(m) AS Count;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Failure Rate==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Arithmetic and string operations can also be used in the return statement. Strings can be parsed in to integers or floats using the &amp;lt;code&amp;gt;toInteger()&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;toFloat()&amp;lt;/code&amp;gt; functions&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The reverse can be done using the &amp;lt;code&amp;gt;toString()&amp;lt;/code&amp;gt; function.&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the name and percentage failure rate for each LaunchVehicle, ordered by number of failures in descending order.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:LaunchVehicle)RETURN m.name, toInteger(m.launches); &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:LaunchVehicle) RETURN m.name AS Name, toString(((toFloat(m.failures)/toFloat(m.launches))*100))+&#039;%&#039; AS PercentageFailureRate ORDER BY PercentageFailureRate;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1403</id>
		<title>Space Race/MATCH Tutorial</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1403"/>
		<updated>2019-12-01T12:40:56Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Visualisation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&lt;br /&gt;
==Institutions==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Use &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; to return nodes. Use &amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt; to specify what label(s) you wish the returned nodes to have. Not specifying any label will return ALL nodes&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Using AS can alias the result column to whatever you wish, as long as it does not have spaces&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Institutions instead of Astronauts&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n AS Astronauts;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Institution) RETURN n AS Insitutions; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Neil Armstrong&#039;s Birthday==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;When simply matching based on properties of a node, use the &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt; with the format &amp;lt;code&amp;gt;{property:value}&amp;lt;/code&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return Neil Armstrong&#039;s date of birth&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Gagarin&amp;quot;,first_name:&amp;quot;Yuri&amp;quot;})RETURN n.dob AS DateOfBirth;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Armstrong&amp;quot;,first_name:&amp;quot;Neil&amp;quot;})RETURN n.dob AS DateOfBirth;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The Young and Old==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&amp;lt;code&amp;gt;ORDER BY&amp;lt;/code&amp;gt; works similarly to SQL, defaulting to ordering from low to high value. Adding &amp;lt;code&amp;gt;DESC&amp;lt;/code&amp;gt; instead orders the result in descending order&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the names of the Astronauts ordered by their date of birth, from oldest to youngest.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n.first_name AS FirstName, n.surname AS Surname ORDER BY n.surname;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n.first_name AS FirstName, n.surname As Surname ORDER BY n.dob;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Nicknames==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;In Neo4j, rather than empty properties being assigned a value of &amp;lt;code&amp;gt;NULL&amp;lt;/code&amp;gt; like in SQL, properties which are not assigned a value do not exist at all &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt; This can be checked using the &amp;lt;code&amp;gt;EXISTS()&amp;lt;/code&amp;gt; function&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the nicknames of the Astronauts who have them in reverse alphabetical order&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)WHERE EXISTS(n.middle_names) RETURN n.middle_names AS MiddleNames; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)WHERE EXISTS(n.nickname) RETURN n.nickname AS Nicknames  ORDER BY n.nickname DESC;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Counting up the missions==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;As in SQL, aggregate functions can be applied to the results of the MATCH query. Unlike SQL you do not need to group by other non-aggregate parameters &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Functions include &amp;lt;code&amp;gt;count()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;avg()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;min()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;max()&amp;lt;/code&amp;gt; and many more&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the number of missions that took place in the Space Race.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:LaunchVehicle)RETURN count(m) AS Count; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:Mission) RETURN count(m) AS Count;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Failure Rate==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Arithmetic and string operations can also be used in the return statement. Strings can be parsed in to integers or floats using the &amp;lt;code&amp;gt;toInteger()&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;toFloat()&amp;lt;/code&amp;gt; functions&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The reverse can be done using the &amp;lt;code&amp;gt;toString()&amp;lt;/code&amp;gt; function.&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the name and percentage failure rate for each LaunchVehicle, ordered by number of failures in descending order.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:LaunchVehicle)RETURN m.name, toInteger(m.launches); &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(m:LaunchVehicle) RETURN m.name AS Name, toString(((toFloat(m.failures)/toFloat(m.launches))*100))+&#039;%&#039; AS PercentageFailureRate;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/Relationships_Tutorial&amp;diff=1402</id>
		<title>Space Race/Relationships Tutorial</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/Relationships_Tutorial&amp;diff=1402"/>
		<updated>2019-12-01T12:14:00Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;Relationships are the most powerful part of graph-based databases. While some of the functionality these provide is possible under SQL using join tables for many to many relationships, certain queries can be constructed which would require many joins in SQL. A good example is the number of connections required to link one node to another.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All relationships in Neo4j are directional, that is they have a start and end node. They can only possess a single &amp;lt;code&amp;gt;TYPE&amp;lt;/code&amp;gt;, rather than multiple labels, but they can also possess properties similar to nodes&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Visualisation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Relationship types==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;The &amp;lt;code&amp;gt;Type()&amp;lt;/code&amp;gt; function can return the type of a relationship&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the type of the relationship between Astronaut and Mission&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(:Astronaut)-[r]-&amp;gt;(:Country) RETURN DISTINCT type(r);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(:Astronaut)-[r]-&amp;gt;(:Mission)  RETURN DISTINCT type(r);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Born in Russia==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;The item in &amp;lt;code&amp;gt;[]&amp;lt;/code&amp;gt; represents a &amp;lt;strong&amp;gt;relationship&amp;lt;/strong&amp;gt; between nodes, in this case the relationship possessing the label &amp;quot;BORN_IN&amp;quot;&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Note the &amp;lt;code&amp;gt;(startNode)-[:LABEL_NAME]-&amp;gt;(endNode)&amp;lt;/code&amp;gt; format. The direction the arrow points shows which node is the end point.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;It is perfectly valid to express this relationship as &amp;lt;code&amp;gt;(endNode)&amp;lt;-[:LABEL_NAME]-(startNode)&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;If you are not concerned about the direction of the relationships, you can also &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; based on &amp;lt;code&amp;gt;(node1)-[:LABEL_NAME]-(node2)&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show the Surnames of Astronauts born in Russia, and the full name of Russia rather than the USA. Hint: Use the ISO 3166-1 Alpha-2 code in all caps&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[:BORN_IN]-&amp;gt;(c:Country) WHERE c.abbrev =&#039;USA&#039; RETURN n.surname, c.name;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[:BORN_IN]-&amp;gt;(c:Country) WHERE c.abbrev= &#039;RU&#039; RETURN n.surname, c.name;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Flight Colleagues==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Numerous relationships can be strung together. &amp;lt;code&amp;gt;DISTINCT&amp;lt;/code&amp;gt; can be used to only display a result once if that node is linked to multiple times&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show the names of everyone that James Lovell flew with.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Armstrong&amp;quot;})-[:CREWED]-&amp;gt;(a:Mission)&amp;lt;-[:CREWED]-(m:Astronaut)  RETURN DISTINCT m.surname, m.first_name; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Lovell&amp;quot;})-[:CREWED]-&amp;gt;(a:Mission)&amp;lt;-[:CREWED]-(m:Astronaut)  RETURN DISTINCT  m.surname, m.first_name;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Saturn V Missions==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Aggregate functions can also be used on the result of relationships queries&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show how many missions were launched on the Saturn V.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:LaunchVehicle{name:&amp;quot;Saturn V&amp;quot;})RETURN DISTINCT n; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(:LaunchVehicle{name:&amp;quot;Saturn V&amp;quot;})&amp;lt;-[r:LAUNCHED_ON]-(:Mission) RETURN count(r);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1401</id>
		<title>Space Race/MATCH Tutorial</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1401"/>
		<updated>2019-12-01T12:04:38Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Visualisation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&lt;br /&gt;
==Institutions==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Use &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; to return nodes. Use &amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt; to specify what label(s) you wish the returned nodes to have. Not specifying any label will return ALL nodes&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Institutions instead of Astronauts&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Institution) RETURN n; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Neil Armstrong&#039;s Birthday==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;When simply matching based on properties of a node, use the &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt; with the format &amp;lt;code&amp;gt;{property:value}&amp;lt;/code&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return Neil Armstrong&#039;s date of birth&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Gagarin&amp;quot;,first_name:&amp;quot;Yuri&amp;quot;})RETURN n.dob;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Armstrong&amp;quot;,first_name:&amp;quot;Neil&amp;quot;})RETURN n.dob;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The Young and Old==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&amp;lt;code&amp;gt;ORDER BY&amp;lt;/code&amp;gt; works similarly to SQL, defaulting to ordering from low to high value. Adding &amp;lt;code&amp;gt;DESC&amp;lt;/code&amp;gt; instead orders the result in descending order&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the names of the Astronauts ordered by their date of birth, from oldest to youngest.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n.first_name, n.surname ORDER BY n.surname;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n.first_name, n.surname ORDER BY n.dob;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Nicknames==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;In Neo4j, rather than empty properties being assigned a value of &amp;lt;code&amp;gt;NULL&amp;lt;/code&amp;gt; like in SQL, properties which are not assigned a value do not exist at all &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt; This can be checked using the &amp;lt;code&amp;gt;EXISTS()&amp;lt;/code&amp;gt; function&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the nicknames of the Astronauts who have them in reverse alphabetical order&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)WHERE EXISTS(n.middle_names) RETURN n.middle_names; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)WHERE EXISTS(n.nickname) RETURN n.nickname ORDER BY n.nickname DESC;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Failure Rate==&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/Relationships_Tutorial&amp;diff=1400</id>
		<title>Space Race/Relationships Tutorial</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/Relationships_Tutorial&amp;diff=1400"/>
		<updated>2019-11-29T09:40:59Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;Relationships are the most powerful part of graph-based databases. While some of the functionality these provide is possible under SQL using join tables for many to many relationships, certain queries can be constructed which would require many joins in SQL.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All relationships in Neo4j are directional, that is they have a start and end node. They can only possess a single &amp;lt;code&amp;gt;TYPE&amp;lt;/code&amp;gt;, rather than multiple labels, but they can also possess properties similar to nodes&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Visualisation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&lt;br /&gt;
==Relationship types==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;The &amp;lt;code&amp;gt;Type()&amp;lt;/code&amp;gt; function can return the type of a relationship&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the type of the relationship between Astronaut and Mission&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[r]-&amp;gt;(c:Country) RETURN type(r);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[r]-&amp;gt;(m:Mission)  RETURN type(r);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Born in Russia==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;The item in &amp;lt;code&amp;gt;[]&amp;lt;/code&amp;gt; represents a &amp;lt;strong&amp;gt;relationship&amp;lt;/strong&amp;gt; between nodes, in this case the relationship possessing the label &amp;quot;BORN_IN&amp;quot;&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Note the &amp;lt;code&amp;gt;(startNode)-[:LABEL_NAME]-&amp;gt;(endNode)&amp;lt;/code&amp;gt; format. The direction the arrow points shows which node is the end point.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;It is perfectly valid to express this relationship as &amp;lt;code&amp;gt;(endNode)&amp;lt;-[:LABEL_NAME]-(startNode)&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;If you are not concerned about the direction of the relationships, you can also &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; based on &amp;lt;code&amp;gt;(node1)-[:LABEL_NAME]-(node2)&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show the Surnames of Astronauts born in Russia, and the full name of Russia rather than the USA. Hint: Use the ISO 3166-1 Alpha-2 code in all caps&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[:BORN_IN]-&amp;gt;(c:Country) WHERE c.abbrev =&#039;USA&#039; RETURN n.surname, c.name;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[:BORN_IN]-&amp;gt;(c:Country) WHERE c.abbrev= &#039;RU&#039; RETURN n.surname, c.name;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Flight Colleagues==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Numerous relationships can be strung together. &amp;lt;code&amp;gt;DISTINCT&amp;lt;/code&amp;gt; can be used to only display a result once if that node is linked to multiple times&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show the names of everyone that James Lovell flew with.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Armstrong&amp;quot;})-[:CREWED]-&amp;gt;(a:Mission)&amp;lt;-[:CREWED]-(m:Astronaut)  RETURN DISTINCT m.surname, m.first_name; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Lovell&amp;quot;})-[:CREWED]-&amp;gt;(a:Mission)&amp;lt;-[:CREWED]-(m:Astronaut)  RETURN DISTINCT  m.surname, m.first_name;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/Relationships_Tutorial&amp;diff=1399</id>
		<title>Space Race/Relationships Tutorial</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/Relationships_Tutorial&amp;diff=1399"/>
		<updated>2019-11-29T09:38:57Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;Relationships are the most powerful part of graph-based databases. While some of the functionality these provide is possible under SQL using join tables for many to many relationships, certain queries can be constructed which would require many joins in SQL.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All relationships in Neo4j are directional, that is they have a start and end node. They can only possess a single &amp;lt;code&amp;gt;TYPE&amp;lt;/code&amp;gt;, rather than multiple labels, but they can also possess properties similar to nodes&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Visualisation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&lt;br /&gt;
==Relationship types==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;The &amp;lt;code&amp;gt;Type()&amp;lt;/code&amp;gt; function can return the type of a relationship&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the type of the relationship between Astronaut and Mission&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[r]-&amp;gt;(c:Country) RETURN type(r);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[r]-&amp;gt;(m:Mission)  RETURN type(r);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Born in Russia==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;The item in &amp;lt;code&amp;gt;[]&amp;lt;/code&amp;gt; represents a &amp;lt;strong&amp;gt;relationship&amp;lt;/strong&amp;gt; between nodes, in this case the relationship possessing the label &amp;quot;BORN_IN&amp;quot;&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Note the &amp;lt;code&amp;gt;(startNode)-[:LABEL_NAME]-&amp;gt;(endNode)&amp;lt;/code&amp;gt; format. The direction the arrow points shows which node is the end point.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;It is perfectly valid to express this relationship as &amp;lt;code&amp;gt;(endNode)&amp;lt;-[:LABEL_NAME]-(startNode)&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;If you are not concerned about the direction of the relationships, you can also &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; based on &amp;lt;code&amp;gt;(node1)-[:LABEL_NAME]-(node2)&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show the Surnames of Astronauts born in Russia, and the full name of Russia rather than the USA. Hint: Use the ISO 3166-1 Alpha-2 code in all caps&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[:BORN_IN]-&amp;gt;(c:Country) WHERE c.abbrev =&#039;USA&#039; RETURN n.surname, c.name;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[:BORN_IN]-&amp;gt;(c:Country) WHERE c.abbrev= &#039;RU&#039; RETURN n.surname, c.name;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Flight Colleagues==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Numerous relationships can be strung together. &amp;lt;code&amp;gt;DISTINCT&amp;lt;/code&amp;gt; can be used to only display a result once if that node is linked to multiple times&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show the names of everyone that James Lovell flew with.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Armstrong&amp;quot;})-[:CREWED]-&amp;gt;(a:Mission)&amp;lt;-[:CREWED]-(m:Astronaut)  RETURN DISTINCT m.surname, m.first_name &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Lovell&amp;quot;})-[:CREWED]-&amp;gt;(a:Mission)&amp;lt;-[:CREWED]-(m:Astronaut)  RETURN DISTINCT  m.surname, m.first_name&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/Relationships_Tutorial&amp;diff=1398</id>
		<title>Space Race/Relationships Tutorial</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/Relationships_Tutorial&amp;diff=1398"/>
		<updated>2019-11-29T09:38:27Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;Relationships are the most powerful part of graph-based databases. While some of the functionality these provide is possible under SQL using join tables for many to many relationships, certain queries can be constructed which would require many joins in SQL.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All relationships in Neo4j are directional, that is they have a start and end node. They can only possess a single &amp;lt;code&amp;gt;TYPE&amp;lt;/code&amp;gt;, rather than multiple labels, but they can also possess properties similar to nodes&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Visualisation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&lt;br /&gt;
==Relationship types==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;The &amp;lt;code&amp;gt;Type()&amp;lt;/code&amp;gt; function can return the type of a relationship&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the type of the relationship between Astronaut and Mission&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[r]-&amp;gt;(c:Country) RETURN type(r);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[r]-&amp;gt;(m:Mission)  RETURN type(r);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Born in Russia==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;The item in &amp;lt;code&amp;gt;[]&amp;lt;/code&amp;gt; represents a &amp;lt;strong&amp;gt;relationship&amp;lt;/strong&amp;gt; between nodes, in this case the relationship possessing the label &amp;quot;BORN_IN&amp;quot;&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Note the &amp;lt;code&amp;gt;(startNode)-[:LABEL_NAME]-&amp;gt;(endNode)&amp;lt;/code&amp;gt; format. The direction the arrow points shows which node is the end point.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;It is perfectly valid to express this relationship as &amp;lt;code&amp;gt;(endNode)&amp;lt;-[:LABEL_NAME]-(startNode)&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;If you are not concerned about the direction of the relationships, you can also &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; based on &amp;lt;code&amp;gt;(node1)-[:LABEL_NAME]-(node2)&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show the Surnames of Astronauts born in Russia, and the full name of Russia rather than the USA. Hint: Use the ISO 3166-1 Alpha-2 code in all caps&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[:BORN_IN]-&amp;gt;(c:Country) WHERE c.abbrev =&#039;USA&#039; RETURN n.surname, c.name;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[:BORN_IN]-&amp;gt;(c:Country) WHERE c.abbrev= &#039;RU&#039; RETURN n.surname, c.name;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Flight Colleagues==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Numerous relationships can be strung together. &amp;lt;code&amp;gt;DISTINCT&amp;lt;/code&amp;gt; can be used to only display a result once if that node is linked to multiple times&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show the names of everyone that James Lovell flew with and the mission he flew with them on.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Armstrong&amp;quot;})-[:CREWED]-&amp;gt;(a:Mission)&amp;lt;-[:CREWED]-(m:Astronaut)  RETURN DISTINCT m.surname, m.first_name &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Lovell&amp;quot;})-[:CREWED]-&amp;gt;(a:Mission)&amp;lt;-[:CREWED]-(m:Astronaut)  RETURN DISTINCT  m.surname, m.first_name&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=NoSQL_Zoo&amp;diff=1397</id>
		<title>NoSQL Zoo</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=NoSQL_Zoo&amp;diff=1397"/>
		<updated>2019-11-29T09:04:16Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Learn NoSQL using MongoDB.&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;mongo&amp;quot;&amp;gt;&lt;br /&gt;
  What is the capital of France?&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;db.world.findOne({name: &amp;quot;France&amp;quot;}, {capital: 1});&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
{{TopTenTips}}&lt;br /&gt;
&amp;lt;div style=&amp;quot;min-height:25em&amp;quot;&amp;gt;&lt;br /&gt;
==Tutorials: Learn NoSQL in stages==&lt;br /&gt;
&lt;br /&gt;
===MongoDB===&lt;br /&gt;
; 1 [[FIND Tutorial|FIND Tutorial]]:Using Find.&lt;br /&gt;
; 2 [[AGGREGATE Tutorial|AGGREGATE Tutorial]]:In which we query the world collection and make use of aggregate functions. (extra: [[AGGREGATE Movies Tutorial|AGGREGATE Movies Tutorial]])&lt;br /&gt;
; 3 [[MAPREDUCE Tutorial]]:Using MapReduce.&lt;br /&gt;
; 4 [[MAPREDUCE Elite]]:MapReduce questions using the Elite Dangerous dataset.&lt;br /&gt;
; 5 [https://goo.gl/forms/ep8rBbCQSa381ic82 Survey]:Do you have thoughts about this website that you would like to share? Help improve NoSQLZoo!&lt;br /&gt;
===Neo4j===&lt;br /&gt;
; 1 [[Space_Race/MATCH_Tutorial|MATCH Tutorial]]: Using MATCH&lt;br /&gt;
; 2 [[Space_Race/Relationships_Tutorial|Relationships Tutorial]]: Understanding Relationships&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Reference: How to...==&lt;br /&gt;
; [[AGGREGATE examples | AGGREGATE Examples]]&lt;br /&gt;
; [[Find|FIND]]&lt;br /&gt;
; [[FIND Examples]]&lt;br /&gt;
; [[JavaScript: Fundamentals]]&lt;br /&gt;
; [[JavaScript: Computed Properties]]&lt;br /&gt;
; [[MapReduce | MAPREDUCE]]&lt;br /&gt;
; [[Elite Document Structure|NOSQLZOO: &#039;elite&#039; dataset schema]]&lt;br /&gt;
; [[RegEx Pattern Matching]]&lt;br /&gt;
&lt;br /&gt;
==MongoDB resources==&lt;br /&gt;
;Manuals: [http://docs.mongodb.org/manual/ MongoDB Documentation] [https://github.com/mongodb/docs MongoDB Documentation GitHub]&amp;lt;br/&amp;gt;[https://docs.python.org/3/ Python 3 Documentation] [http://api.mongodb.org/python/current/ PyMongo API Documentation]&amp;lt;br/&amp;gt; Karl Seguin&#039;s [http://openmymind.net/mongodb.pdf The Little MongoDB Book]&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race&amp;diff=1396</id>
		<title>Space Race</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race&amp;diff=1396"/>
		<updated>2019-11-29T09:03:49Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Learn how to use Neo4j using data from the Space Race. ==&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;[[/MATCH_Tutorial]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[/Relationships_Tutorial]]&amp;lt;/p&amp;gt;&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=NoSQL_Zoo&amp;diff=1395</id>
		<title>NoSQL Zoo</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=NoSQL_Zoo&amp;diff=1395"/>
		<updated>2019-11-29T09:03:05Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Learn NoSQL using MongoDB.&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;mongo&amp;quot;&amp;gt;&lt;br /&gt;
  What is the capital of France?&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;db.world.findOne({name: &amp;quot;France&amp;quot;}, {capital: 1});&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
{{TopTenTips}}&lt;br /&gt;
&amp;lt;div style=&amp;quot;min-height:25em&amp;quot;&amp;gt;&lt;br /&gt;
==Tutorials: Learn NoSQL in stages==&lt;br /&gt;
&lt;br /&gt;
===MongoDB===&lt;br /&gt;
; 1 [[FIND Tutorial|FIND Tutorial]]:Using Find.&lt;br /&gt;
; 2 [[AGGREGATE Tutorial|AGGREGATE Tutorial]]:In which we query the world collection and make use of aggregate functions. (extra: [[AGGREGATE Movies Tutorial|AGGREGATE Movies Tutorial]])&lt;br /&gt;
; 3 [[MAPREDUCE Tutorial]]:Using MapReduce.&lt;br /&gt;
; 4 [[MAPREDUCE Elite]]:MapReduce questions using the Elite Dangerous dataset.&lt;br /&gt;
; 5 [https://goo.gl/forms/ep8rBbCQSa381ic82 Survey]:Do you have thoughts about this website that you would like to share? Help improve NoSQLZoo!&lt;br /&gt;
===Neo4j===&lt;br /&gt;
; 1 [[Space_Race/MATCH_Tutorial|MATCH TUTORIAL]]: Using MATCH&lt;br /&gt;
; 2 [[Space_Race/Relationship_Tutorial|RELATIONSHIP TUTORIAL]]: Understanding Relationships&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Reference: How to...==&lt;br /&gt;
; [[AGGREGATE examples | AGGREGATE Examples]]&lt;br /&gt;
; [[Find|FIND]]&lt;br /&gt;
; [[FIND Examples]]&lt;br /&gt;
; [[JavaScript: Fundamentals]]&lt;br /&gt;
; [[JavaScript: Computed Properties]]&lt;br /&gt;
; [[MapReduce | MAPREDUCE]]&lt;br /&gt;
; [[Elite Document Structure|NOSQLZOO: &#039;elite&#039; dataset schema]]&lt;br /&gt;
; [[RegEx Pattern Matching]]&lt;br /&gt;
&lt;br /&gt;
==MongoDB resources==&lt;br /&gt;
;Manuals: [http://docs.mongodb.org/manual/ MongoDB Documentation] [https://github.com/mongodb/docs MongoDB Documentation GitHub]&amp;lt;br/&amp;gt;[https://docs.python.org/3/ Python 3 Documentation] [http://api.mongodb.org/python/current/ PyMongo API Documentation]&amp;lt;br/&amp;gt; Karl Seguin&#039;s [http://openmymind.net/mongodb.pdf The Little MongoDB Book]&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race&amp;diff=1394</id>
		<title>Space Race</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race&amp;diff=1394"/>
		<updated>2019-11-29T09:02:14Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Learn how to use Neo4j using data from the Space Race. ==&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;[[/MATCH_Tutorial]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[/Relationship_Tutorial]]&amp;lt;/p&amp;gt;&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race&amp;diff=1393</id>
		<title>Space Race</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race&amp;diff=1393"/>
		<updated>2019-11-29T09:01:50Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Learn how to use Neo4j using data from the Space Race. ==&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&lt;br /&gt;
[[/MATCH_Tutorial]]&lt;br /&gt;
[[/Relationship_Tutorial]]&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/Relationships_Tutorial&amp;diff=1392</id>
		<title>Space Race/Relationships Tutorial</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/Relationships_Tutorial&amp;diff=1392"/>
		<updated>2019-11-29T09:01:24Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: Created page with &amp;quot;&amp;lt;p&amp;gt;Relationships are the most powerful part of graph-based databases. While some of the functionality these provide is possible under SQL using join tables for many to many re...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;Relationships are the most powerful part of graph-based databases. While some of the functionality these provide is possible under SQL using join tables for many to many relationships, certain queries can be constructed which would require many joins in SQL.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All relationships in Neo4j are directional, that is they have a start and end node. As well as being also able to possess labels, they can also possess properties similar to nodes&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Visualisation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&lt;br /&gt;
==Born in Russia==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;The item in &amp;lt;code&amp;gt;[]&amp;lt;/code&amp;gt; represents a &amp;lt;strong&amp;gt;relationship&amp;lt;/strong&amp;gt; between nodes, in this case the relationship possessing the label &amp;quot;BORN_IN&amp;quot;&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Note the &amp;lt;code&amp;gt;(startNode)-[:LABEL_NAME]-&amp;gt;(endNode)&amp;lt;/code&amp;gt; format. The direction the arrow points shows which node is the end point.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;It is perfectly valid to express this relationship as &amp;lt;code&amp;gt;(endNode)&amp;lt;-[:LABEL_NAME]-(startNode)&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;If you are not concerned about the direction of the relationships, you can also &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; based on &amp;lt;code&amp;gt;(node1)-[:LABEL_NAME]-(node2)&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show the Surnames of Astronauts born in Russia, and the full name of Russia rather than the USA. Hint: Use the ISO 3166-1 Alpha-2 code in all caps&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[:BORN_IN]-&amp;gt;(c:Country) WHERE c.abbrev =&#039;USA&#039; RETURN n.surname, c.name;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[:BORN_IN]-&amp;gt;(c:Country) WHERE c.abbrev= &#039;RU&#039; RETURN n.surname, c.name;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1391</id>
		<title>Space Race/MATCH Tutorial</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1391"/>
		<updated>2019-11-29T08:47:13Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Visualisation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&lt;br /&gt;
==Institutions==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Use &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; to return nodes. Use &amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt; to specify what label(s) you wish the returned nodes to have. Not specifying any label will return ALL nodes&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Institutions instead of Astronauts&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Institution) RETURN n; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Neil Armstrong&#039;s Birthday==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;When simply matching based on properties of a node, use the &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt; with the format &amp;lt;code&amp;gt;{property:value}&amp;lt;/code&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return Neil Armstrong&#039;s date of birth&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Gagarin&amp;quot;,first_name:&amp;quot;Yuri&amp;quot;})RETURN n.dob;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Armstrong&amp;quot;,first_name:&amp;quot;Neil&amp;quot;})RETURN n.dob;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The Young and Old==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&amp;lt;code&amp;gt;ORDER BY&amp;lt;/code&amp;gt; works similarly to SQL, defaulting to ordering from low to high value. Adding &amp;lt;code&amp;gt;DESC&amp;lt;/code&amp;gt; instead orders the result in descending order&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the names of the Astronauts ordered by their date of birth from earlier to later&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n.first_name, n.surname ORDER BY n.surname;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n.first_name, n.surname ORDER BY n.dob;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Nicknames==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;In Neo4j, rather than empty properties being assigned a value of &amp;lt;code&amp;gt;NULL&amp;lt;/code&amp;gt; like in SQL, properties which are not assigned a value do not exist at all &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt; This can be checked using the &amp;lt;code&amp;gt;EXISTS()&amp;lt;/code&amp;gt; function&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the nicknames of the Astronauts who have them in reverse alphabetical order&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)WHERE EXISTS(n.middle_names) RETURN n.middle_names; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)WHERE EXISTS(n.nickname) RETURN n.nickname ORDER BY n.nickname DESC;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1390</id>
		<title>Space Race/MATCH Tutorial</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1390"/>
		<updated>2019-11-28T17:32:57Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Visualisation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&lt;br /&gt;
==Institutions==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Use &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; to return nodes. Use &amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt; to specify what label(s) you wish the returned nodes to have. Not specifying any label will return ALL nodes&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Institutions instead of Astronauts&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Institution) RETURN n; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Born in Russia==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Use &amp;lt;code&amp;gt;WHERE&amp;lt;/code&amp;gt; to specify conditions and the &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; operator to access individual properties of a node.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;The item in &amp;lt;code&amp;gt;[]&amp;lt;/code&amp;gt; represents a &amp;lt;strong&amp;gt;relationship&amp;lt;/strong&amp;gt; between nodes, in this case the relationship possessing the label &amp;quot;BORN_IN&amp;quot;&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show the Surnames of Astronauts born in Russia, and the full name of Russia rather than the USA. Hint: Use the ISO 3166-1 Alpha-2 code in all caps&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[:BORN_IN]-&amp;gt;(c:Country) WHERE c.abbrev =&#039;USA&#039; RETURN n.surname, c.name;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[:BORN_IN]-&amp;gt;(c:Country) WHERE c.abbrev= &#039;RU&#039; RETURN n.surname, c.name;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Neil Armstrong&#039;s Birthday==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;When simply matching based on properties of a node, use the &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt; with the format &amp;lt;code&amp;gt;{property:value}&amp;lt;/code&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return Neil Armstrong&#039;s date of birth&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Gagarin&amp;quot;,first_name:&amp;quot;Yuri&amp;quot;})RETURN n.dob;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Armstrong&amp;quot;,first_name:&amp;quot;Neil&amp;quot;})RETURN n.dob;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The Young and Old==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&amp;lt;code&amp;gt;ORDER BY&amp;lt;/code&amp;gt; works similarly to SQL, defaulting to ordering from low to high value. Adding &amp;lt;code&amp;gt;DESC&amp;lt;/code&amp;gt; instead orders the result in descending order&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the names of the Astronauts ordered by their date of birth from earlier to later&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n.first_name, n.surname ORDER BY n.surname;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n.first_name, n.surname ORDER BY n.dob;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Nicknames==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;In Neo4j, rather than empty properties being assigned a value of &amp;lt;code&amp;gt;NULL&amp;lt;/code&amp;gt; like in SQL, properties which are not assigned a value do not exist at all &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt; This can be checked using the &amp;lt;code&amp;gt;EXISTS()&amp;lt;/code&amp;gt; function&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the nicknames of the Astronauts who have them in reverse alphabetical order&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)WHERE EXISTS(n.middle_names) RETURN n.middle_names; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)WHERE EXISTS(n.nickname) RETURN n.nickname ORDER BY n.nickname DESC;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1389</id>
		<title>Space Race/MATCH Tutorial</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1389"/>
		<updated>2019-11-28T09:31:55Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Visualisation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&lt;br /&gt;
==Institutions==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Use &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; to return nodes. Use &amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt; to specify what label(s) you wish the returned nodes to have. Not specifying any label will return ALL nodes&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Institutions instead of Astronauts&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Institution) RETURN n; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Born in Russia==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Use &amp;lt;code&amp;gt;WHERE&amp;lt;/code&amp;gt; to specify conditions and the &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; operator to access individual properties of a node.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;The item in &amp;lt;code&amp;gt;[]&amp;lt;/code&amp;gt; represents a &amp;lt;strong&amp;gt;relationship&amp;lt;/strong&amp;gt; between nodes, in this case the relationship possessing the label &amp;quot;BORN_IN&amp;quot;&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show the Surnames of Astronauts born in Russia, and the full name of Russia rather than the USA. Hint: Use the ISO 3166-1 Alpha-2 code in all caps&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[:BORN_IN]-&amp;gt;(c:Country) WHERE c.abbrev =&#039;USA&#039; RETURN n.surname, c.name;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[:BORN_IN]-&amp;gt;(c:Country) WHERE c.abbrev= &#039;RU&#039; RETURN n.surname, c.name;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Neil Armstrong&#039;s Birthday==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;When simply matching based on properties of a node, use the &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt; with the format &amp;lt;code&amp;gt;{property:value}&amp;lt;/code&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return Neil Armstrong&#039;s date of birth&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Gagarin&amp;quot;,first_name:&amp;quot;Yuri&amp;quot;})RETURN n.dob;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Armstrong&amp;quot;,first_name:&amp;quot;Neil&amp;quot;})RETURN n.dob;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The Young and Old==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&amp;lt;code&amp;gt;ORDER BY&amp;lt;/code&amp;gt; works similarly to SQL, defaulting to ordering from low to high value. Adding &amp;lt;code&amp;gt;DESC&amp;lt;/code&amp;gt; instead orders the result in descending order&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the names of the Astronauts ordered by their date of birth from earlier to later&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n.first_name, n.surname ORDER BY n.surname;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n.first_name, n.surname ORDER BY n.dob;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Nicknames==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;In Neo4j, rather empty than properties being assigned a value of &amp;lt;code&amp;gt;NULL&amp;lt;/code&amp;gt; like in SQL, properties which are not assigned a value do not exist at all &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt; This can be checked using the &amp;lt;code&amp;gt;EXISTS()&amp;lt;/code&amp;gt; comparator&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the nicknames of the Astronauts who have them in reverse alphabetical order&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)WHERE EXISTS(n.middle_names) RETURN n.middle_names; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)WHERE EXISTS(n.nickname) RETURN n.nickname ORDER BY n.nickname DESC;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1388</id>
		<title>Space Race/MATCH Tutorial</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1388"/>
		<updated>2019-11-28T09:19:11Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Visualisation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&lt;br /&gt;
==Institutions==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Use &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; to return nodes. Use &amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt; to specify what label(s) you wish the returned nodes to have. Not specifying any label will return ALL nodes&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Institutions instead of Astronauts&amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Institution) RETURN n; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Born in Russia==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Use &amp;lt;code&amp;gt;WHERE&amp;lt;/code&amp;gt; to specify conditions and the &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; operator to access individual properties of a node.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;The item in &amp;lt;code&amp;gt;[]&amp;lt;/code&amp;gt; represents a &amp;lt;strong&amp;gt;relationship&amp;lt;/strong&amp;gt; between nodes, in this case the relationship possessing the label &amp;quot;BORN_IN&amp;quot;&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show the Surnames of Astronauts born in Russia, and the full name of Russia rather than the USA. Hint: Use the ISO 3166-1 Alpha-2 code in all caps&amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[:BORN_IN]-&amp;gt;(c:Country) WHERE c.abbrev =&#039;USA&#039; RETURN n.surname, c.name;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[:BORN_IN]-&amp;gt;(c:Country) WHERE c.abbrev= &#039;RU&#039; RETURN n.surname, c.name;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Neil Armstrong&#039;s Birthday==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;When simply matching based on properties of a node, use the &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt; with the format &amp;lt;code&amp;gt;{property:value}&amp;lt;/code&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return Neil Armstrong&#039;s date of birth&amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Gagarin&amp;quot;,first_name:&amp;quot;Yuri&amp;quot;})RETURN n.dob;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Armstrong&amp;quot;,first_name:&amp;quot;Neil&amp;quot;})RETURN n.dob;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The Young and Old==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&amp;lt;code&amp;gt;ORDER BY&amp;lt;/code&amp;gt; works similarly to SQL, defaulting to ordering from low to high value. &lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return the names of the Astronauts ordered by their date of birth from earlier to later&amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n.first_name, n.surname ORDER BY n.surname;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n.first_name, n.surname ORDER BY n.dob;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1387</id>
		<title>Space Race/MATCH Tutorial</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1387"/>
		<updated>2019-11-28T08:56:18Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Visualisation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&lt;br /&gt;
==Institutions==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Use &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; to return nodes. Use &amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt; to specify what label(s) you wish the returned nodes to have. Not specifying any label will return ALL nodes&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Institutions instead of Astronauts&amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Institution) RETURN n; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Born in Russia==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Use &amp;lt;code&amp;gt;WHERE&amp;lt;/code&amp;gt; to specify conditions and the &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; operator to access individual properties of a node.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;The item in &amp;lt;code&amp;gt;[]&amp;lt;/code&amp;gt; represents a &amp;lt;strong&amp;gt;relationship&amp;lt;/strong&amp;gt; between nodes, in this case the relationship possessing the label &amp;quot;BORN_IN&amp;quot;&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show the Surnames of Astronauts born in Russia, and the full name of Russia rather than the USA. Hint: Use the ISO 3166-1 Alpha-2 code in all caps&amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[:BORN_IN]-&amp;gt;(c:Country) WHERE c.abbrev =&#039;USA&#039; RETURN n.surname, c.name;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[:BORN_IN]-&amp;gt;(c:Country) WHERE c.abbrev= &#039;RU&#039; RETURN n.surname, c.name;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Neil Armstrong&#039;s Birthday==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;When simply matching based on properties of a node, an alternative to using &amp;lt;code&amp;gt;WHERE&amp;lt;/code&amp;gt; is to use the &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt; with the format &amp;lt;code&amp;gt;{property:value}&amp;lt;/code&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Return Neil Armstrong&#039;s date of birth&amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Gagarin&amp;quot;,first_name:&amp;quot;Yuri&amp;quot;})RETURN n.dob;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut{surname:&amp;quot;Armstrong&amp;quot;,first_name:&amp;quot;Neil&amp;quot;})RETURN n.dob;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=NoSQL_Zoo&amp;diff=1386</id>
		<title>NoSQL Zoo</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=NoSQL_Zoo&amp;diff=1386"/>
		<updated>2019-11-28T08:36:17Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Learn NoSQL using MongoDB.&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;mongo&amp;quot;&amp;gt;&lt;br /&gt;
  What is the capital of France?&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;db.world.findOne({name: &amp;quot;France&amp;quot;}, {capital: 1});&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
{{TopTenTips}}&lt;br /&gt;
&amp;lt;div style=&amp;quot;min-height:25em&amp;quot;&amp;gt;&lt;br /&gt;
==Tutorials: Learn NoSQL in stages==&lt;br /&gt;
&lt;br /&gt;
===MongoDB===&lt;br /&gt;
; 1 [[FIND Tutorial|FIND Tutorial]]:Using Find.&lt;br /&gt;
; 2 [[AGGREGATE Tutorial|AGGREGATE Tutorial]]:In which we query the world collection and make use of aggregate functions. (extra: [[AGGREGATE Movies Tutorial|AGGREGATE Movies Tutorial]])&lt;br /&gt;
; 3 [[MAPREDUCE Tutorial]]:Using MapReduce.&lt;br /&gt;
; 4 [[MAPREDUCE Elite]]:MapReduce questions using the Elite Dangerous dataset.&lt;br /&gt;
; 5 [https://goo.gl/forms/ep8rBbCQSa381ic82 Survey]:Do you have thoughts about this website that you would like to share? Help improve NoSQLZoo!&lt;br /&gt;
===Neo4j===&lt;br /&gt;
; 1 [[Space_Race/MATCH_Tutorial|MATCH TUTORIAL]]: Using MATCH&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Reference: How to...==&lt;br /&gt;
; [[AGGREGATE examples | AGGREGATE Examples]]&lt;br /&gt;
; [[Find|FIND]]&lt;br /&gt;
; [[FIND Examples]]&lt;br /&gt;
; [[JavaScript: Fundamentals]]&lt;br /&gt;
; [[JavaScript: Computed Properties]]&lt;br /&gt;
; [[MapReduce | MAPREDUCE]]&lt;br /&gt;
; [[Elite Document Structure|NOSQLZOO: &#039;elite&#039; dataset schema]]&lt;br /&gt;
; [[RegEx Pattern Matching]]&lt;br /&gt;
&lt;br /&gt;
==MongoDB resources==&lt;br /&gt;
;Manuals: [http://docs.mongodb.org/manual/ MongoDB Documentation] [https://github.com/mongodb/docs MongoDB Documentation GitHub]&amp;lt;br/&amp;gt;[https://docs.python.org/3/ Python 3 Documentation] [http://api.mongodb.org/python/current/ PyMongo API Documentation]&amp;lt;br/&amp;gt; Karl Seguin&#039;s [http://openmymind.net/mongodb.pdf The Little MongoDB Book]&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1385</id>
		<title>Space Race/MATCH Tutorial</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1385"/>
		<updated>2019-11-27T09:20:43Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Visualisation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&lt;br /&gt;
==Institutions==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Use &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; to return nodes. Use &amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt; to specify what label(s) you wish the returned nodes to have. Not specifying any label will return ALL nodes&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Institutions instead of Astronauts&amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Institution) RETURN n; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Born in Russia==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Use &amp;lt;code&amp;gt;WHERE&amp;lt;/code&amp;gt; to specify conditions and the &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; operator to access individual properties of a node.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show the Surnames of Astronauts born in Russia, and the full name of Russia rather than the USA. Hint: Use the ISO 3166-1 Alpha-2 code in all caps&amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[:BORN_IN]-(c:Country{}) WHERE c.abbrev =&#039;USA&#039; RETURN n.surname, c.name;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[:BORN_IN]-(c:Country) WHERE c.abbrev= &#039;RU&#039; RETURN n.surname, c.name;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1384</id>
		<title>Space Race/MATCH Tutorial</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1384"/>
		<updated>2019-11-27T09:11:51Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Visualisation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&lt;br /&gt;
==Institutions==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Use &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; to show nodes that are Institutions rather than Astronauts&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Institutions instead of Astronauts&amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Institution) RETURN n; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Born in Russia==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Use &amp;lt;code&amp;gt;WHERE&amp;lt;/code&amp;gt; to specify conditions and the &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; operator to access individual properties of a node.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show the Surnames of Astronauts born in Russia rather than the USA &amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[:BORN_IN]-(c:Country) WHERE c.abbrev =&#039;usa&#039; RETURN n.surname, c.name;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[:BORN_IN]-(c:Country) WHERE c.abbrev= &#039;ru&#039; RETURN n.surname;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1383</id>
		<title>Space Race/MATCH Tutorial</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1383"/>
		<updated>2019-11-27T09:08:24Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Visualisation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&lt;br /&gt;
==Institutions==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Use &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; to show nodes that are Institutions rather than Astronauts&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Institutions instead of Astronauts&amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Institution) RETURN n; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Born in Russia==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;Use &amp;lt;code&amp;gt;WHERE&amp;lt;/code&amp;gt; to specify conditions and the &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; operator to access individual&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show the Surnames of Astronauts born in Russia rather than the USA &amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[:BORN_IN]-(c:Country) WHERE c.name = &#039;United States of America&#039; RETURN n.surname;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[:BORN_IN]-(c:Country) WHERE c.name = &#039;Russia&#039; RETURN n.surname;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1382</id>
		<title>Space Race/MATCH Tutorial</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1382"/>
		<updated>2019-11-27T09:04:19Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Visualisation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&lt;br /&gt;
==Institutions==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  Use &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; to show nodes that are Institutions rather than Astronauts&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Institutions instead of Astronauts&amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Institution) RETURN n; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Born in Russia==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  Use &amp;lt;code&amp;gt;WHERE&amp;lt;/code&amp;gt; to specify conditions&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Astronauts born in Russia rather than the USA &amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[:BORN_IN]-(c:Country) WHERE c.name = &#039;United States of America&#039; RETURN n;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[:BORN_IN]-(c:Country) WHERE c.name = &#039;Russia&#039; RETURN n;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1381</id>
		<title>Space Race/MATCH Tutorial</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1381"/>
		<updated>2019-11-27T09:03:46Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== MATCH ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&lt;br /&gt;
==Institutions==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  Use &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; to show nodes that are Institutions rather than Astronauts&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Institutions instead of Astronauts&amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Institution) RETURN n; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Born in Russia==&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  Use &amp;lt;code&amp;gt;WHERE&amp;lt;/code&amp;gt; to specify conditions&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Astronauts born in Russia rather than the USA &amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[:BORN_IN]-(c:Country) WHERE c.name = &#039;United States of America&#039; RETURN n;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut)-[:BORN_IN]-(c:Country) WHERE c.name = &#039;Russia&#039; RETURN n;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race&amp;diff=1380</id>
		<title>Space Race</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race&amp;diff=1380"/>
		<updated>2019-11-26T18:11:16Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Learn how to use Neo4j using data from the Space Race. ==&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&lt;br /&gt;
[[/MATCH_Tutorial]]&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1379</id>
		<title>Space Race/MATCH Tutorial</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1379"/>
		<updated>2019-11-26T18:01:02Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== MATCH ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&lt;br /&gt;
===MATCH===&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  Use MATCH and RETURN to show nodes that are Institutions rather than Astronauts&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Institutions instead of Astronauts&amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Institution) RETURN n; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1378</id>
		<title>Space Race/MATCH Tutorial</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race/MATCH_Tutorial&amp;diff=1378"/>
		<updated>2019-11-26T17:55:35Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: Created page with &amp;quot;I am error&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am error&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race&amp;diff=1377</id>
		<title>Space Race</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race&amp;diff=1377"/>
		<updated>2019-11-26T09:40:27Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Learn how to use Neo4j using data from the Space Race. ==&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  Use MATCH and RETURN to show nodes that are Institutions rather than Astronauts&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Institutions instead of Astronauts&amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Institution) RETURN n; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race&amp;diff=1376</id>
		<title>Space Race</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race&amp;diff=1376"/>
		<updated>2019-11-26T09:18:25Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Learn how to use Neo4j using data from the Space Race. ==&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php Click here for 3d graph visualisation]&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  Use &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; to show nodes that are Countries rather than Astronauts&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Institutions instead of Astronauts&amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Institution) RETURN n; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race&amp;diff=1375</id>
		<title>Space Race</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race&amp;diff=1375"/>
		<updated>2019-11-26T09:17:37Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Learn how to use Neo4j using data from the Space Race. ==&lt;br /&gt;
&lt;br /&gt;
[http://nosqlzoo.net/mw/visproject/visualisation.php]&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  Use &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; to show nodes that are Countries rather than Astronauts&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Institutions instead of Astronauts&amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Institution) RETURN n; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race&amp;diff=1374</id>
		<title>Space Race</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race&amp;diff=1374"/>
		<updated>2019-11-22T10:36:04Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Learn how to use Neo4j using data from the Space Race. ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  Use &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; to show nodes that are Countries rather than Astronauts&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Institutions instead of Astronauts&amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronaut) RETURN n;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Institution) RETURN n; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race&amp;diff=1373</id>
		<title>Space Race</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race&amp;diff=1373"/>
		<updated>2019-11-22T10:31:01Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Learn how to use Neo4j using data from the Space Race. ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  Use &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; to show nodes that are Countries rather than Astronauts&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Institutions instead of Astronauts&amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronauts) RETURN n;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Institutions) RETURN n; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race&amp;diff=1372</id>
		<title>Space Race</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race&amp;diff=1372"/>
		<updated>2019-11-22T10:30:02Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Learn how to use Neo4j using data from the Space Race. ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  Use &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; to show nodes that are Countries rather than Astronauts&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Institutions instead of Astronauts&amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronauts) RETURN *;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Institutions) RETURN *; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race&amp;diff=1371</id>
		<title>Space Race</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race&amp;diff=1371"/>
		<updated>2019-11-22T10:29:12Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Learn how to use Neo4j using data from the Space Race. ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  Use &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; to show nodes that are Countries rather than Astronauts&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Institutions instead of Astronauts&amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronauts) RETURN properties(n);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Institutions) RETURN properties(n); &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race&amp;diff=1370</id>
		<title>Space Race</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race&amp;diff=1370"/>
		<updated>2019-11-22T10:28:21Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Learn how to use Neo4j using data from the Space Race. ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  Use &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; to show nodes that are Countries rather than Astronauts&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Institutions instead of Astronauts&amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronauts) RETURN n.*;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Institutions) RETURN n.*; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
	<entry>
		<id>https://nosqlzoo.net/w/index.php?title=Space_Race&amp;diff=1369</id>
		<title>Space Race</title>
		<link rel="alternate" type="text/html" href="https://nosqlzoo.net/w/index.php?title=Space_Race&amp;diff=1369"/>
		<updated>2019-11-22T10:26:05Z</updated>

		<summary type="html">&lt;p&gt;ChrisHouston: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Learn how to use Neo4j using data from the Space Race. ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;q nonum&amp;quot; data-lang=&amp;quot;neo4j&amp;quot;&amp;gt;&lt;br /&gt;
  Use &amp;lt;code&amp;gt;MATCH&amp;lt;/code&amp;gt; to show nodes that are Countries rather than Astronauts&lt;br /&gt;
  &amp;lt;p class=&#039;strong&#039;&amp;gt;Show Institutions instead of Astronauts&amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;pre class=&amp;quot;def&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Astronauts) RETURN n;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre class=&amp;quot;ans&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;MATCH(n:Institutions) RETURN n; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Acknowledgements}}&lt;/div&gt;</summary>
		<author><name>ChrisHouston</name></author>
	</entry>
</feed>