Commit e883f3f7 by wangjf

change all

parent 1298bb46
No preview for this file type
......@@ -9,9 +9,9 @@ SET mapreduce.reduce.java.opts=-Xmx8192m;
DROP TABLE IF EXISTS package_num;
CREATE TABLE package_num AS SELECT tt.package_name,tt.install_nums FROM
(SELECT t1.package_name,(t1.install_num - (CASE WHEN t2.install_num IS NULL THEN 0 ELSE t2.install_num END)) AS install_nums
FROM (SELECT package_name,count(1) AS install_num FROM dwh.dm_install_list_v2 WHERE dt = '${dt}' AND business = '3s' GROUP BY package_name) AS t1
FROM (SELECT package_name,count(1) AS install_num FROM dwh.dm_install_list_v2 WHERE dt = '${dt}' GROUP BY package_name) AS t1
LEFT JOIN
(SELECT package_name,count(1) AS install_num FROM dwh.dm_install_list_v2 WHERE dt = '${last_dt}' AND business = '3s' GROUP BY package_name) AS t2
(SELECT package_name,count(1) AS install_num FROM dwh.dm_install_list_v2 WHERE dt = '${last_dt}' GROUP BY package_name) AS t2
ON t1.package_name = t2.package_name
) tt WHERE tt.install_nums > 30000;
......
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