Hive column as a subquery select

前端 未结 1 1002
死守一世寂寞
死守一世寂寞 2020-12-10 00:05

I\'m trying to do something like below with Hive. How can I have a column in Hive be defined as a subquery? Is this possible in Hive?

hive -e \"                    


        
相关标签:
1条回答
  • 2020-12-10 00:40

    Correlated subqueries are not supported in Hive. How about something like this instead? (I didn't get a chance to verify this query on Hive myself)

    select
        i.SearchListingID,
        count(*)
    from
        (
        select
             distinct i.SearchListingID as SearchListingID 
        from 
            Impressions i
        where
            i.yyyymmdd = 20120401
        )i
        join
        calls c
        on(c.ServiceID = i.SearchListingID)
    limit 10
    
    0 讨论(0)
提交回复
热议问题