Commit 780b0206 by lishihang

'ADD:feature'

parent bdf04c7b
......@@ -84,7 +84,7 @@ drop table tmp.tmp_query_category_base_cross_lsh;
create table if not exists tmp.tmp_query_category_base_cross_lsh as
select key_word,search_device_id,split(search_categorys,',')[0] search_categorys
from secoo_fact_hour.fact_search_detail_union_p_hour_inrc
where search_device_id is not null and p_day >= date_sub(current_date(), 15) and p_day <= date_sub(current_date(), 1)
where search_device_id is not null and p_day >= date_sub(current_date(), 60) and p_day <= date_sub(current_date(), 1)
group by key_word,search_device_id,split(search_categorys,',')[0];
--搜索识别品牌交叉特征基础表
......@@ -92,7 +92,7 @@ drop table tmp.tmp_query_brand_base_cross_lsh;
create table if not exists tmp.tmp_query_brand_base_cross_lsh as
select key_word,search_device_id,split(search_brands,',')[0] search_brands
from secoo_fact_hour.fact_search_detail_union_p_hour_inrc
where search_device_id is not null and p_day >= date_sub(current_date(), 15) and p_day <= date_sub(current_date(), 1)
where search_device_id is not null and p_day >= date_sub(current_date(), 60) and p_day <= date_sub(current_date(), 1)
group by key_word,search_device_id,split(search_brands,',')[0];
......@@ -138,7 +138,7 @@ drop table tmp.tmp_query_category_cart_base_cross_lsh;
create table if not exists tmp.tmp_query_category_cart_base_cross_lsh as
select key_word,add_cart_device_id,product_category_id
from secoo_fact_hour.fact_search_detail_union_p_hour_inrc
where add_cart_device_id is not null and p_day >= date_sub(current_date(), 15) and p_day <= date_sub(current_date(), 1)
where add_cart_device_id is not null and p_day >= date_sub(current_date(), 60) and p_day <= date_sub(current_date(), 1)
group by key_word,add_cart_device_id,product_category_id;
......@@ -147,7 +147,7 @@ drop table tmp.tmp_query_brand_cart_base_cross_lsh;
create table if not exists tmp.tmp_query_brand_cart_base_cross_lsh as
select key_word,add_cart_device_id,product_brand_id
from secoo_fact_hour.fact_search_detail_union_p_hour_inrc
where add_cart_device_id is not null and p_day >= date_sub(current_date(), 15) and p_day <= date_sub(current_date(), 1)
where add_cart_device_id is not null and p_day >= date_sub(current_date(), 60) and p_day <= date_sub(current_date(), 1)
group by key_word,add_cart_device_id,product_brand_id;
......@@ -193,7 +193,7 @@ drop table tmp.tmp_query_category_pay_base_cross_lsh;
create table if not exists tmp.tmp_query_category_pay_base_cross_lsh as
select key_word,pay_device_id,product_category_id
from secoo_fact_hour.fact_search_detail_union_p_hour_inrc
where pay_device_id is not null and p_day >= date_sub(current_date(), 15) and p_day <= date_sub(current_date(), 1)
where pay_device_id is not null and p_day >= date_sub(current_date(), 60) and p_day <= date_sub(current_date(), 1)
group by key_word,pay_device_id,product_category_id;
--搜索购买品牌交叉特征基础表
......@@ -201,7 +201,7 @@ drop table tmp.tmp_query_brand_pay_base_cross_lsh;
create table if not exists tmp.tmp_query_brand_pay_base_cross_lsh as
select key_word,pay_device_id,product_brand_id
from secoo_fact_hour.fact_search_detail_union_p_hour_inrc
where pay_device_id is not null and p_day >= date_sub(current_date(), 15) and p_day <= date_sub(current_date(), 1)
where pay_device_id is not null and p_day >= date_sub(current_date(), 60) and p_day <= date_sub(current_date(), 1)
group by key_word,pay_device_id,product_brand_id;
......
......@@ -3,7 +3,7 @@ drop table tmp.tmp_query_base_lsh;
create table if not exists tmp.tmp_query_base_lsh as
select key_word,product_brand_id,product_category_id,is_action_add_cart,is_pay_success
from secoo_fact_hour.fact_search_detail_union_p_hour_inrc
where p_day >= date_sub(current_date(), 15) and p_day <= date_sub(current_date(), 1);
where p_day >= date_sub(current_date(), 60) and p_day <= date_sub(current_date(), 1);
--query最近加购的品牌 Top5
......
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