Question : equivalent of partition

could you rewrite the following without using partition clause? - with just select, from, where, groupby, having?

select distinct col1, col2, col3, count(distinct col3) over (partition by col1, col2) cnt
 from a
where col3 is not null

Answer : equivalent of partition

ok, let's see:
1:
2:
3:
4:
5:
select distinct col1, col2, col3
, ( select count(distinct x.col3) from a x WHERE x.col1= a.col1 AND x.col2 = a.col2 ) cnt
 from a
where col3 is not null
Random Solutions  
 
programming4us programming4us