title: variable 'x' in projection not present in GROUP BY
body: <p>I want to count municipalities and what I have in parentheses work. However, I want to get another variable too, but when I am adding it to SELECT, I am getting:</p>
  
  <blockquote>
    <p>org.openrdf.query.MalformedQueryException: variable 'region_name' in projection not present in GROUP BY.</p>
  </blockquote>
  
  <p>In my query I have:</p>
  
  <pre><code>"SELECT ?region_name (COUNT(?municipality) AS ?count) " +
  </code></pre>
  
  <p>What am I missing?</p>
  
  <p>Notice that I do not have anything like GROUP anywhere in my project, I think it is happening internally of Sesame.</p>
  
  <p>I just saw that if I remove (COUNT...), I am getting the names as expected.</p>