|
@@ -68,13 +68,13 @@ def get_sql(date, previous_date_str, project):
|
|
FROM (
|
|
FROM (
|
|
SELECT videoid
|
|
SELECT videoid
|
|
,dt
|
|
,dt
|
|
- ,return_all as return
|
|
|
|
- ,lastonehour_recommend_view as `view`
|
|
|
|
- ,lastonehour_recommend_share as share
|
|
|
|
- ,lastonehour_recommend_return1 as return1
|
|
|
|
- ,lastonehour_recommend_return2n as return2
|
|
|
|
- ,last2nhour_return1 as return3
|
|
|
|
- ,last2nhour_return2n as return4
|
|
|
|
|
|
+ ,SUM(return_all) as return
|
|
|
|
+ ,SUM(lastonehour_recommend_view) as `view`
|
|
|
|
+ ,SUM(lastonehour_recommend_share) as share
|
|
|
|
+ ,SUM(lastonehour_recommend_return1) as return1
|
|
|
|
+ ,SUM(lastonehour_recommend_return2n) as return2
|
|
|
|
+ ,SUM(last2nhour_return1) as return3
|
|
|
|
+ ,SUM(last2nhour_return2n) as return4
|
|
FROM loghubods.video_return_composition_1hour
|
|
FROM loghubods.video_return_composition_1hour
|
|
WHERE dt <= '{}23'
|
|
WHERE dt <= '{}23'
|
|
AND dt >= '{}00'
|
|
AND dt >= '{}00'
|
|
@@ -164,4 +164,4 @@ if __name__ == '__main__':
|
|
|
|
|
|
|
|
|
|
# cd /root/zhangbo/rov-offline
|
|
# cd /root/zhangbo/rov-offline
|
|
-# python alg_recsys_rank_item_realtime_1h.py 20240117 20
|
|
|
|
|
|
+# python alg_recsys_rank_item_realtime_1hroot.py 20240408 14
|