title: SQL "group by" question - I can't select every column
body: <p>I have a database where each row has an id, a URL, and an XML.
  The IDs are unique, but URLs column can have duplicates.
  I need all the URLs, without duplicates, and for each URL I need the id and XML.</p>
  
  <p>If I ask only for the URL and the Id, I use the following query:</p>
  
  <pre><code>select URL, max(ID) as ID from T1 group by URL
  </code></pre>
  
  <p>And all is working great.</p>
  
  <p>But when I want also the XML, and I use the following query:</p>
  
  <pre><code>select URL, max(ID) as ID, XML from T1 group by URL
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>ISC ERROR CODE:335544569
  ISC ERROR MESSAGE:
  Dynamic SQL Error
  SQL error code = -104
  user name required
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p>Thanks,</p>
  
  <p>Dikla</p>
  
  <p>Thanks for the answers. I want to add an explanation:<br>
  In case of duplicate URLs, I don't care which of them will be returned.
  But I need to get them without duplicates, even if the XML is different between the rows.
  Is it possible?<br>
  Thanks!</p>