Commit 32065ce2 authored by litaolemo's avatar litaolemo

update

parent 27c6d13d
...@@ -154,7 +154,8 @@ print(huidu_device_id_sql) ...@@ -154,7 +154,8 @@ print(huidu_device_id_sql)
huidu_device_id_df = spark.sql(huidu_device_id_sql) huidu_device_id_df = spark.sql(huidu_device_id_sql)
huidu_device_id_df.createOrReplaceTempView("dev_view") huidu_device_id_df.createOrReplaceTempView("dev_view")
sql_search_ctr = r""" sql_search_ctr = r"""
SELECT query,count(query) as count_query,search_pv,search_uv SELECT query,count_query,search_pv,search_uv from
(SELECT query,count(query) as count_query,search_pv,search_uv
FROM FROM
( (
SELECT query SELECT query
...@@ -255,7 +256,7 @@ SELECT query,count(query) as count_query,search_pv,search_uv ...@@ -255,7 +256,7 @@ SELECT query,count(query) as count_query,search_pv,search_uv
)t2 )t2
on t1.cl_id=t2.device_id AND t1.partition_date = t2.partition_date on t1.cl_id=t2.device_id AND t1.partition_date = t2.partition_date
GROUP BY query GROUP BY query
) order by count_query desc )) order by count_query desc limit 200
""".format(start_date='20201024',end_date='20201025') """.format(start_date='20201024',end_date='20201025')
print(sql_search_ctr) print(sql_search_ctr)
......
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