I have a table task
select 
   sts_id, 
   count(*) mycount 
from 
   task
where 
sts_id in (1,  8,  39)
group by sts_id;
output :
   sts_id count
       1      1
       8      1
       39     1
I have one more temp table with one column sts_id which looks like this
      sts_id 
       1 
       8
       39
      40
      41.
I am trying for a left join for both the tables
select 
   in_list.sts_id, 
   count(*) mycount 
from 
   task
left outer join
   in_list
  on task.sts_id = in_list.sts_id 
group by sts_id;
to get ab o/p like
1 1
8 1
39 1
40 0
41 0..
I am getting an error of column ambiguously defined.
 
     
     
     
    