Commit 6186b9cd authored by litaolemo's avatar litaolemo

update

parent 73a957c0
......@@ -93,9 +93,13 @@ spark.sql("CREATE TEMPORARY FUNCTION arrayMerge AS 'com.gmei.hive.common.udf.UDF
# huidu_device_id_df = spark.sql(huidu_device_id_sql)
# huidu_device_id_df.createOrReplaceTempView("dev_view")
sql_search_ctr = r"""
SELECT query
, sum(all_search_uv) as all_search_uv --全部搜索uv
, sum(t3.all_search_pv) as all_search_pv --全部搜索pv
FROM (
--搜索pvuv
SELECT
click.partition_date as partition_date
SELECT query
, click.partition_date as partition_date
, count(click.cl_id) as all_search_pv
, count(distinct click.cl_id) as all_search_uv
FROM (
......@@ -191,9 +195,9 @@ sql_search_ctr = r"""
AND action = 'on_click_card'
AND params['card_type'] = 'highlight_word'
) click
GROUP BY click.partition_date
GROUP BY click.partition_date, query
) t3 group by query order by all_search_uv asc
""".format(start_date='20201017',end_date='20201116')
......
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