title: Non-group key variable in SELECT
body: <p>I'm performing with success the following query on virtuoso web interface (e.g.: <a href="http://live.dbpedia.org/sparql" rel="nofollow noreferrer">http://live.dbpedia.org/sparql</a>)</p>
  
  <pre><code>SELECT ?o (COUNT(?member) as ?memberCount) WHERE {
    ?member &lt;http://purl.org/dc/terms/subject&gt; ?o.
    FILTER isIRI(?o) {
      SELECT ?o WHERE {
        &lt;http://dbpedia.org/resource/Heroic_Purgatory&gt;
        &lt;http://purl.org/dc/terms/subject&gt;
        ?o.
      }
    }
  }
  ORDER BY ?memberCount
  LIMIT 1
  </code></pre>
  
  <p>When I do this query through Apache Jena, an exception rises up:</p>
  
  <pre><code>Non-group key variable in SELECT: ?o
  </code></pre>
  
  <p>I don't understand why... any suggestion?</p>