\begin{sql}
CREATE OR REPLACE {\red TYPE BODY} \black CityORType \\
\red AS \\
\> \red MEMBER FUNCTION Distance (other IN CityORType) \\
\> \red RETURN NUMBER \\
\> IS \\
\> BEGIN \\
\>\>   RETURN {\blue SELF.coordinates.distance(other.coordinates)}; \\
\> END; \\
\> \red MEMBER FUNCTION NoOfOrganizations RETURN NUMBER \\
\> IS \\
\>\>  n NUMBER;\\
\> BEGIN \\
\>\> SELECT count(*) INTO n \\
\>\> FROM Organization o \\
\>\> WH\=ERE o.city = SELF.name  \\
\>\>\> AND o.province = SELF.province  \\
\>\>\> AND o.country = SELF.country; \\
\>\> RETURN n; \\
\> END; \\
END; \\
/
\end{sql}
