{\end{ex} %
}
+\usepackage{listings}
+\usepackage{color}
+
+\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
+\lstdefinestyle{block}{
+ backgroundcolor=\color{white},
+ basicstyle=\small\ttfamily,
+ columns=flexible,
+ breaklines=true,
+ showstringspaces=false
+}
+\lstdefinestyle{command}{
+ backgroundcolor=\color{backcolour},
+ basicstyle=\small\ttfamily,
+ columns=flexible,
+ breaklines=true,
+ showspaces=false,
+ showstringspaces=false,
+ frame=single
+% xleftmargin=0pt,
+% xrightmargin=0pt,
+% breakindent=0pt,
+% resetmargins=true
+}
+\lstset{style=block}
+\usepackage{array}
+\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}
+\newcolumntype{M}[1]{>{\arraybackslash}p{#1}}
+
+
%% HINWEIS!
%%
%% Die vorgegebene Formatierung der Loesung ist nur als
\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}
+ \begin{lstlisting}[style=command]
+MATCH (n:Address) RETURN DISTINCT n.countries AS countries
+ \end{lstlisting}
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}
+ \begin{lstlisting}[style=command]
+MATCH (n:Address {countries: 'Austria'})<-[r:REGISTERED_ADDRESS]-(e:Entity)
+ RETURN DISTINCT e AS entity LIMIT 5
+ \end{lstlisting}
+ \input{results/result_3a.tex}
\end{itemize}
\item
\begin{enumerate}[label=\theenumiii]
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
+ \begin{lstlisting}[style=command]
+MATCH (n:Intermediary)-[r:INTERMEDIARY_OF]->()
+ RETURN n.name AS name, COUNT(r) AS count ORDER BY count DESC LIMIT 10
+ \end{lstlisting}
+ \input{results/result_3b1.tex}
+ \item\textbf{Extend the query of \texttt{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.}
+ \begin{lstlisting}[style=command]
+MATCH (n:Intermediary)-[r:INTERMEDIARY_OF|OFFICER_OF]->()
+ RETURN n.name AS name, COUNT(r) AS count ORDER BY count DESC LIMIT 10
+ \end{lstlisting}
+ \input{results/result_3b2.tex}
+ \item\textbf{For the top intermediary from query \texttt{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.}
+ \begin{lstlisting}[style=command]
+MATCH (n:Intermediary {node_id: "54662"})-[r]->(t)
+ WHERE NOT (n)-[r:INTERMEDIARY_OF|OFFICER_OF]->(t)
+ RETURN type(r) AS relation, t.node_id AS node
+ \end{lstlisting}
+ \input{results/result_3b3.tex}
\end{enumerate}
\end{enumerate}
--- /dev/null
+\lstset{style=block}
+\begin{tabular}{ |M{12.5cm}| }
+\hline
+entity \\
+\hline
+\hline
+\begin{lstlisting}
+"{sourceID:Paradise Papers - Appleby,closed_date:15-JUN-2007,valid_until:Appleby data is current through 2014,ibcRUC:127348,jurisdiction:KY,name:Latintrade Ltd. ** INCOMPLETE **,country_codes:AUT;CYM,service_provider:Appleby,countries:Austria;Cayman Islands,jurisdiction_description:Cayman Islands,incorporation_date:11-JUL-2003,node_id:82002136}"
+\end{lstlisting} \\
+\hline
+\begin{lstlisting}
+"{sourceID:Paradise Papers - Appleby,closed_date:15-JUN-2007,valid_until:Appleby data is current through 2014,ibcRUC:130370,jurisdiction:KY,name:Agro Commodity Ltd. ** INCOMPLETE **,country_codes:AUT;CYM,service_provider:Appleby,countries:Austria;Cayman Islands,jurisdiction_description:Cayman Islands,incorporation_date:07-NOV-2003,node_id:82002216}"
+\end{lstlisting} \\
+\hline
+\begin{lstlisting}
+"{sourceID:Panama Papers,jurisdiction:BVI,struck_off_date:30-APR-2008,service_provider:Mossack Fonseca,countries:Austria,jurisdiction_description:British Virgin Islands,valid_until:The Panama Papers data is current through 2015,ibcRUC:191199,name:ELITE TECHNOLOGIES LIMITED,country_codes:AUT,inactivation_date:02-MAY-2008,incorporation_date:04-JUL-1996,node_id:10071089,status:Defaulted}"
+\end{lstlisting} \\
+\hline
+\begin{lstlisting}
+"{sourceID:Offshore Leaks,valid_until:The Offshore Leaks data is current through 2010,jurisdiction:XXX,name:The Internet Consulting Corporation,country_codes:AUT;XXX,service_provider:Commonwealth Trust Limited,countries:Austria;Not identified,jurisdiction_description:Undetermined,incorporation_date:18-JUL-1997,node_id:195933,status:Dead}"
+\end{lstlisting} \\
+\hline
+\begin{lstlisting}
+"{sourceID:Offshore Leaks,company_type:Business Company Limited by Shares,jurisdiction:XXX,service_provider:Commonwealth Trust Limited,countries:Austria;British Virgin Islands,jurisdiction_description:Undetermined,valid_until:The Offshore Leaks data is current through 2010,ibcRUC:1010445,name:MIRA CONSTRUCTION AND DEVELOPMENT CORPORATION,country_codes:AUT;VGB,incorporation_date:13-FEB-2006,node_id:227537,status:Dead}"
+\end{lstlisting} \\
+\hline
+\end{tabular}
\ No newline at end of file
--- /dev/null
+\lstset{style=block}
+\begin{tabular}{ |M{9.5cm}|P{3cm}| }
+\hline
+name & count \\
+\hline
+\hline
+\verb|Morning Star Holdings Limited| & 35358 \\
+\hline
+\verb|MOSSACK FONSECA & CO. (BAHAMAS) LIMITED| & 14903 \\
+\hline
+\verb|UBS TRUSTEES (BAHAMAS) LTD.| & 9731 \\
+\hline
+\verb|CREDIT SUISSE TRUST LIMITED| & 8305 \\
+\hline
+\verb|TRIDENT CORPORATE SERVICES (BAH) LTD| & 8302 \\
+\hline
+\verb|MMG BAHAMAS LTD.| & 8157 \\
+\hline
+\verb|Internal User| & 7900 \\
+\hline
+\verb|ORION HOUSE SERVICES (HK) LIMITED| & 7017 \\
+\hline
+\verb|Unitrust Corporate Services Ltd.| & 5699 \\
+\hline
+\verb|K.M.C. CORPORATE SERVICES LTD.| & 5318 \\
+\hline
+\end{tabular}
\ No newline at end of file
--- /dev/null
+\lstset{style=block}
+\begin{tabular}{ |M{9.5cm}|P{3cm}| }
+\hline
+name & count \\
+\hline
+\hline
+\verb|Portcullis TrustNet (BVI) Limited| & 36375 \\
+\hline
+\verb|Morning Star Holdings Limited| & 35358 \\
+\hline
+\verb|MOSSACK FONSECA & CO. (BAHAMAS) LIMITED| & 14903 \\
+\hline
+\verb|UBS TRUSTEES (BAHAMAS) LTD.| & 9731 \\
+\hline
+\verb|CREDIT SUISSE TRUST LIMITED| & 8305 \\
+\hline
+\verb|TRIDENT CORPORATE SERVICES (BAH) LTD| & 8302 \\
+\hline
+\verb|MMG BAHAMAS LTD.| & 8157 \\
+\hline
+\verb|Internal User| & 7900 \\
+\hline
+\verb|ORION HOUSE SERVICES (HK) LIMITED| & 7017 \\
+\hline
+\verb|Unitrust Corporate Services Ltd.| & 5699 \\
+\hline
+\end{tabular}
\ No newline at end of file
--- /dev/null
+\lstset{style=block}
+\begin{tabular}{ |M{9.5cm}|P{3cm}| }
+\hline
+relation & node \\
+\hline
+\hline
+\verb|REGISTERED_ADDRESS| & 269677 \\
+\hline
+\verb|REGISTERED_ADDRESS| & 236879 \\
+\hline
+\verb|REGISTERED_ADDRESS| & 236748 \\
+\hline
+\verb|REGISTERED_ADDRESS| & 236931 \\
+\hline
+\verb|REGISTERED_ADDRESS| & 250183 \\
+\hline
+\verb|REGISTERED_ADDRESS| & 254223 \\
+\hline
+\verb|REGISTERED_ADDRESS| & 236724 \\
+\hline
+\verb|UNDERLYING| & 90485 \\
+\hline
+\end{tabular}