2022-12-30
閱讀量:
677
mysql 學(xué)習(xí)46--每小時(shí)PV、UV、人均瀏覽量、成交量、成交額
-- 3.1.3 練習(xí):每小時(shí)PV、UV、人均瀏覽量、成交量、成交額
select
小時(shí),
sum(behavior_type='pv') as 瀏覽量,
count(distinct user_id) as 訪客數(shù),
sum(behavior_type='pv')/count(distinct user_id) as 人均瀏覽量,
sum(behavior_type='buy') as 成交量,
sum(if(behavior_type='buy',amount,0)) as 成交額
from UserBehavior_new
group by 小時(shí);






評(píng)論(0)


暫無(wú)數(shù)據(jù)
CDA考試動(dòng)態(tài)
CDA報(bào)考指南
推薦帖子
0條評(píng)論
1條評(píng)論
0條評(píng)論