title: SPARQL subquery with limit
body: <p>I'm using Apache Jena Fuseki to query my graph using SPARQL.</p>
  <p>I need to do subquery with limit, and I found one example similar to my requirements <a href="https://www.w3.org/2009/sparql/wiki/Design:SubSelect#Test_Cases" rel="nofollow noreferrer">here</a>.</p>
  <p>The example looks like this.</p>
  <h3>Data</h3>
  <pre><code>@prefix : &lt;http://people.example/&gt; .
  
  :alice :name &quot;Alice&quot;, &quot;Alice Foo&quot;, &quot;A. Foo&quot; .
  :alice :knows :bob, :carol . 
  :bob :name &quot;Bob&quot;, &quot;Bob Bar&quot;, &quot;B. Bar&quot; .
  :carol :name &quot;Carol&quot;, &quot;Carol Baz&quot;, &quot;C. Baz&quot; .
  </code></pre>
  <h3>Query</h3>
  <pre><code>PREFIX : &lt;http://people.example/&gt;
  SELECT ?y ?name WHERE {
    :alice :knows ?y .
    {
      SELECT ?y ?name WHERE {
        ?y :name ?name
      }
      ORDER BY ?name
      LIMIT 1
    }
  }
  </code></pre>
  <h3>Result</h3>
  <pre><code>?y          ?name
  :bob        &quot;B. Bar&quot;
  :carol      &quot;C. Baz&quot;
  </code></pre>
  <p>I did the same query with the same data on Fuseki, but the result is empty.</p>
  <p>Is it problem of SPARQL implementation in Fuseki?</p>
  <p>Which SPARQL engine can I use to get the same result as showed in the example?</p>