join: reference to column is ambiguous
<p>I want to join 2 tables with the CONT_ID parameter </p>

<pre><code> select (case when age_years &gt;= 18 and age_years &lt; 30 then '18-29'     
         when age_years &lt; 50 then '30-49'                               
         when age_years &lt; 70 then '50-69'                               
          when age_years &lt; 100 then '70-100'                            
         end) as age_range,                                             
          count(DISTINCT CONT_ID) as num,                               
       SUM(ACAUT) / COUNT(*) as avg                
     from CLIENT c                                         
      left join PAYTB t                                       
       on c.CONT_ID = t.CONT_ID                                         
   group by (case when age_years &gt;= 18 and age_years &lt; 30 then '18-29'  
      when age_years &lt; 50 then '30-49'                                  
      when age_years &lt; 70 then '50-69'                                  
      when age_years &lt; 100 then '70-100'                                
      end)                                                              
      order by min(age_years);   
</code></pre>

<p>Error</p>

<p>SQLCODE = -203, ERROR:  A REFERENCE TO COLUMN CONT_ID IS AMBIGUOUS  </p>