From c690351f1a4e74ed3f1371e1f8b852494cdcc0b9 Mon Sep 17 00:00:00 2001 From: David Kaufmann Date: Sun, 16 Jun 2019 19:04:01 +0200 Subject: [PATCH] update main_3.tex --- ex3/main_3.tex | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/ex3/main_3.tex b/ex3/main_3.tex index 473f27f..ca1f8e1 100644 --- a/ex3/main_3.tex +++ b/ex3/main_3.tex @@ -1 +1,34 @@ %ex3.3 + +\begin{enumerate}[label=(\alph*)] + \item\textbf{Two basic queries to start with:} + \begin{itemize} + \item\textbf{List all the distinct countries for which addresses are + registered in the database.} + \begin{verbatim} + MATCH (n:Address) RETURN DISTINCT n.countries + \end{verbatim} + This returns 222 different countries. We chose ''Austria''. + \item\textbf{Choose one of these countries and list 5 entities which + are based in that country.} + \begin{verbatim} + MATCH (n:Address {countries: 'Austria'})<-[r:REGISTERED_ADDRESS]-(e:Entity) + RETURN DISTINCT e LIMIT 5 + \end{verbatim} + \end{itemize} + \item + \begin{enumerate}[label=\theenumiii] + \item\textbf{First, find the 10 \texttt{top intermediaries} , i.e. + those 10 intermediaries that have the most outgoing + \texttt{INTERMEDIARY\_OF} edges. Output the name of the + intermediary as well as the number of relevant edges.} + \item\textbf{Extend the query of i to also count outgoing + \texttt{OFFICER\_OF} edges to determine the top intermediaries. + Output the name of the intermediary as well as the number of + relevant edges.} + \item\textbf{For the top intermediary from query ii, output all the + outgoing edges, except for those that have type either + \texttt{OFFICER\_OF} or \texttt{INTERMEDIARY\_OF}. Also output + the respective nodes at the other side of the edges.} + \end{enumerate} +\end{enumerate} -- 2.43.0