【发布时间】:2019-03-09 18:11:20
【问题描述】:
此查询从活动表中获取每月所有活跃玩家的数量:
SELECT
date_trunc('month', createdat) as month,
count(distinct playerid) as play_all
FROM
activity
group by month
order by 1
这个查询得到每个月玩“蜜蜂”游戏的玩家数量:
SELECT
date_trunc('month', createdat) as month,
count(distinct playerid) as play_bee
FROM
activity
where gamename = 'bee'
group by month
order by 1
如何获取每个月玩“蜜蜂”游戏的玩家百分比?
【问题讨论】:
标签: sql amazon-web-services amazon-redshift