Both left and right aliases encountered in Hive JOIN; without any inequality clause

前端 未结 3 1043
鱼传尺愫
鱼传尺愫 2021-02-13 20:37

I am using following query:

Select
   S.MDSE_ITEM_I,
   S.CO_LOC_I,
   MAX(S.SLS_D) as MAX_SLS_D,
   MIN(S.SLS_D) as MIN_SLS_D,
   sum(S.SLS_UNIT_Q) as SLS_UNIT_         


        
3条回答
  •  日久生厌
    2021-02-13 21:01

    you're right. The where clause should include nulls where records could get dropped:

    where (PRSMN_VAL_STRT_D IS NULL) or (S.SLS_D between PRSMN_VAL_STRT_D and PRSMN_VAL_END_D)

提交回复
热议问题