you may want to do it with where condition

count(distinct col1) as count 1 where col2 is not null

On Fri, Sep 12, 2014 at 11:55 PM, Manoj Bharadwaj <manoj.bharad...@gmail.com
> wrote:

> Hello World!
>
> I'm not able to do the below in Hive. Is this a limitation?
>
> *Count (Distinct Case When Col2 is not null then Col1 else End) as Count1*
>
> This give me the same result as:
> *Count (Distinct Col1) as Count2*
>
> NB: There are significant cases where *Col2* is null
>
> I couldn't find any support on the web for this - hence the question to
> the group. Links/reading material appreciated
>
> Thanks!
> Manoj
>



-- 
Nitin Pawar

Reply via email to