title: Query not working in Ingres
body: <p>I've inherited some ingres database stuff. Never used ingres before. I found the following query to isolate distinct email address records.</p>
  
  <pre><code>select a.reg_uid as id, a.firstname, a.lastname, a.postzip_code, a.suburb, a.city, a.state, a.email, a.country 
  from register a
  inner join 
  (
   select distinct email, min(reg_uid) as id from register 
    group by email 
  ) as b
  on a.email = b.email 
  and a.id = b.id
  </code></pre>
  
  <p>However, when I plug this into ingres, I get the error </p>
  
  <pre><code>"Table 'select' does not exist or is not owned by you."
  </code></pre>
  
  <p>Any ideas?</p>