Commit a99d4d09 authored by 高雅喆's avatar 高雅喆

bug fix

parent ac331fb1
......@@ -764,29 +764,29 @@ object GetDeviceDuration {
val uid_duration_last = sc.sql(
s"""
|select d.device_id,
|sum(if(d.level1_id=0,sum_duration,0)) as 'kongbai',
|sum(if(d.level1_id=1,sum_duration,0)) as 'yanbu',
|sum(if(d.level1_id=10,sum_duration,0)) as 'simi',
|sum(if(d.level1_id=1024,sum_duration,0)) as 'zitizhifang',
|sum(if(d.level1_id=1080,sum_duration,0)) as 'banyongjiu',
|sum(if(d.level1_id=11,sum_duration,0)) as 'yachi',
|sum(if(d.level1_id=12,sum_duration,0)) as 'kouchun',
|sum(if(d.level1_id=13,sum_duration,0)) as 'erbu',
|sum(if(d.level1_id=2,sum_duration,0)) as 'bibu',
|sum(if(d.level1_id=2053,sum_duration,0)) as 'remen',
|sum(if(d.level1_id=2054,sum_duration,0)) as 'banyongjiuzhuang',
|sum(if(d.level1_id=2212,sum_duration,0)) as 'jiankangguanli',
|sum(if(d.level1_id=2214,sum_duration,0)) as 'qita',
|sum(if(d.level1_id=3,sum_duration,0)) as 'lunkuo',
|sum(if(d.level1_id=4,sum_duration,0)) as 'shoushen',
|sum(if(d.level1_id=5,sum_duration,0)) as 'pifu',
|sum(if(d.level1_id=6933,sum_duration,0)) as 'shenghuo',
|sum(if(d.level1_id=7,sum_duration,0)) as 'xiongbu',
|sum(if(d.level1_id=9,sum_duration,0)) as 'maofa',
|sum(if(d.level1_id=922,sum_duration,0)) as 'kangshuai',
|sum(if(d.level1_id=929,sum_duration,0)) as 'shili',
|sum(if(d.level1_id=971,sum_duration,0)) as 'chanhouxiufu',
|sum(if(d.level1_id=992,sum_duration,0)) as 'zhushe'
|sum(if(d.level1_id=0,sum_duration,0)) as kongbai,
|sum(if(d.level1_id=1,sum_duration,0)) as yanbu,
|sum(if(d.level1_id=10,sum_duration,0)) as simi,
|sum(if(d.level1_id=1024,sum_duration,0)) as zitizhifang,
|sum(if(d.level1_id=1080,sum_duration,0)) as banyongjiu,
|sum(if(d.level1_id=11,sum_duration,0)) as yachi,
|sum(if(d.level1_id=12,sum_duration,0)) as kouchun,
|sum(if(d.level1_id=13,sum_duration,0)) as erbu,
|sum(if(d.level1_id=2,sum_duration,0)) as bibu,
|sum(if(d.level1_id=2053,sum_duration,0)) as remen,
|sum(if(d.level1_id=2054,sum_duration,0)) as banyongjiuzhuang,
|sum(if(d.level1_id=2212,sum_duration,0)) as jiankangguanli,
|sum(if(d.level1_id=2214,sum_duration,0)) as qita,
|sum(if(d.level1_id=3,sum_duration,0)) as lunkuo,
|sum(if(d.level1_id=4,sum_duration,0)) as shoushen,
|sum(if(d.level1_id=5,sum_duration,0)) as pifu,
|sum(if(d.level1_id=6933,sum_duration,0)) as shenghuo,
|sum(if(d.level1_id=7,sum_duration,0)) as xiongbu,
|sum(if(d.level1_id=9,sum_duration,0)) as maofa,
|sum(if(d.level1_id=922,sum_duration,0)) as kangshuai,
|sum(if(d.level1_id=929,sum_duration,0)) as shili,
|sum(if(d.level1_id=971,sum_duration,0)) as chanhouxiufu,
|sum(if(d.level1_id=992,sum_duration,0)) as zhushe
|from
| (select c.device_id,c.level1_id,sum(c.duration) as sum_duration from
| (select a.device_id,
......
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