# https://www.w3.org/TR/sparql11-federated-query/
PREFIX foaf:   <http://xmlns.com/foaf/0.1/>
SELECT ?person ?interest ?known
WHERE
{
    SERVICE <http://people.example.org/sparql> {
        ?person foaf:name ?name .
        OPTIONAL {
            ?person foaf:interest ?interest .
            SERVICE <http://people2.example.org/sparql> {
                ?person foaf:knows ?known .
            }
        }
    }
}
# Error message: maximum recursion depth exceeded in comparison
