Subversion Repositories SmartDukaan

Rev

Rev 16359 | Rev 16361 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 16359 Rev 16360
Line 50... Line 50...
50
    from flipkartorders fo join user_segmentation_weigthage uw on "orders"=uw.weightage_type 
50
    from flipkartorders fo join user_segmentation_weigthage uw on "orders"=uw.weightage_type 
51
    where  fo.category is not null and fo.brand is not null and  fo.brand not like '' and fo.user_id!=0 and fo.user_id is not null group by fo.category,fo.brand,fo.user_id
51
    where  fo.category is not null and fo.brand is not null and  fo.brand not like '' and fo.user_id!=0 and fo.user_id is not null group by fo.category,fo.brand,fo.user_id
52
    
52
    
53
    UNION
53
    UNION
54
    
54
    
55
    select bp.user_id,bp.brand,bp.category_id,count(1) as count,"preferences" as source,(uw.weightage* count(1) as weight
55
    select bp.user_id,bp.brand,bp.category_id,count(1) as count,"preferences" as source,(uw.weightage* count(1)) as weight
56
    from brand_preferences bp join user_segmentation_weigthage uw on "preferences"=uw.weightage_type  
56
    from brand_preferences bp join user_segmentation_weigthage uw on "preferences"=uw.weightage_type  
57
    where user_id!=0 and status='show' group by category_id,brand,user_id;
57
    where user_id!=0 and status='show' group by category_id,brand,user_id;
58
 
58
 
59
) as x
59
) as x
60
 
60