Commit 98dd0a11 by wangyulong

1.添加用户类型特征

parent 760b8652
...@@ -110,7 +110,37 @@ SELECT ...@@ -110,7 +110,37 @@ SELECT
,U.prodAndUserPurchSpecial ,U.prodAndUserPurchSpecial
,U.ispayeduser ,U.ispayeduser
,U.userfeatures ,concat_ws(',',
cast(round(nvl(U.30DaysDetailPV,0),4) as string),cast(round(nvl(U.30DaysDetailPVN,0),4) as string),
cast(round(nvl(U.30DaysDetailPVS,0),4) as string),cast(round(nvl(U.30DaysDetailPVA,0),4) as string),
cast(round(nvl(U.30DaysDetailPVAB,0),4) as string),cast(round(nvl(U.30DaysDetailPVB,0),4) as string),
cast(round(nvl(U.30DaysChannelPVPaiHangBang,0),4) as string),cast(round(nvl(U.30DaysChannelPVRenQiBang,0),4) as string),
cast(round(nvl(U.30DaysChannelPVXinPinBang,0),4) as string),cast(round(nvl(U.30DaysChannelPVJRZK,0),4) as string),
cast(round(nvl(U.30DaysChannelPVAoLai,0),4) as string),cast(round(nvl(U.30DaysChannelPVXSCJ,0),4) as string),
cast(round(nvl(U.30DaysSearchCount,0),4) as string),cast(round(nvl(U.30DaysSearchBrandCount,0),4) as string),
cast(round(nvl(U.30DaysSearchCategoryCount,0),4) as string),cast(round(nvl(U.1YearCartProductCount,0),4) as string),
cast(round(nvl(U.1YearCartBrandCount,0),4) as string),cast(round(nvl(U.1YearCartCategoryCount,0),4) as string),
cast(round(nvl(U.1YearCartPriceAmt,0),4) as string),cast(round(nvl(U.1YearAddFavProductCount,0),4) as string),
cast(round(nvl(U.1YearAddFavBrandCount,0),4) as string),cast(round(nvl(U.1YearAddFavCategoryCount,0),4) as string),
cast(round(nvl(U.1YearAddFavPriceAmt,0),4) as string),cast(round(nvl(U.1YearOrderCount,0),4) as string),
cast(round(nvl(U.1YearOrderProductCountAvg,0),4) as string),cast(round(nvl(U.1YearOrderPayCount,0),4) as string),
cast(round(nvl(U.1YearOrderPayPriceAmt,0),4) as string),cast(round(nvl(U.1YearOrderPayProductCount,0),4) as string),
cast(round(nvl(U.1YearOrderPayBrandCount,0),4) as string),cast(round(nvl(U.1YearOrderPayCategoryCount,0),4) as string),
cast(round(nvl(U.1YearOrderTicketCount,0),4) as string),cast(round(nvl(U.1YearOrderTicketProductCount,0),4) as string),
cast(round(nvl(U.1YearOrderTicketPriceAmt,0),4) as string),cast(round(nvl(U.1YearOrderTicketBrandCount,0),4) as string),
cast(round(nvl(U.1YearOrderTicketCategoryCount,0),4) as string),cast(round(nvl(U.1YearOrderUsePointCount,0),4) as string),
cast(round(nvl(U.1YearOrderUsePointPriceAmt,0),4) as string),cast(round(nvl(U.1YearOrderProductManCount,0),4) as string),
cast(round(nvl(U.1YearOrderProductManPriceAmt,0),4) as string),cast(round(nvl(U.1YearOrderProductWomanCount,0),4) as string),
cast(round(nvl(U.1YearOrderProductWomanPriceAmt,0),4) as string),cast(round(nvl(U.1YearOrderProductOtherCount,0),4) as string),
cast(round(nvl(U.1YearOrderProductOtherPriceAmt,0),4) as string),
(case round(nvl(U.addCartIn7Days,0),0) when 0 then '1,0' when 1 then '0,1' else '1,0' end),
(case round(nvl(U.deviceType,0),0) when 0 then '1,0,0' when 1 then '0,1,0' when 2 then '0,0,1' else '1,0,0' end),
(case round(nvl(U.purchasedBrand100,0),0) when 0 then '1,0' when 1 then '0,1' else '1,0' end),
(case round(nvl(U.purchasedItems,0),0) when 0 then '1,0' when 1 then '0,1' else '1,0' end),
(case round(nvl(U.activeIn7Days,0),0) when 0 then '1,0' when 1 then '0,1' else '1,0' end),
(case round(nvl(U.activeInWeekends,0),0) when 0 then '1,0' when 1 then '0,1' else '1,0' end),
(case round(nvl(U.gender,0),0) when 0 then '1,0,0' when 1 then '0,1,0' when 2 then '0,0,1' else '1,0,0' end)
) userfeatures
,U.userlabels ,U.userlabels
,U.is_new_user ,U.is_new_user
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment