prism
This commit is contained in:
@@ -38,7 +38,7 @@ group by cause_entity_type_id, entity_type
|
|||||||
order by count(cause_entity_type_id) desc;
|
order by count(cause_entity_type_id) desc;
|
||||||
|
|
||||||
-- 1天内,非明确实体触发的block-place行为,按cause_id分组
|
-- 1天内,非明确实体触发的block-place行为,按cause_id分组
|
||||||
select activities.cause_id, causes.cause, count(activities.cause_id)
|
select activities.cause_id, causes.cause, count(*)
|
||||||
from activities
|
from activities
|
||||||
left join causes on activities.cause_id = causes.cause_id
|
left join causes on activities.cause_id = causes.cause_id
|
||||||
where action_id = (select action_id from actions where action = 'block-place')
|
where action_id = (select action_id from actions where action = 'block-place')
|
||||||
@@ -55,3 +55,40 @@ where action_id = (select action_id from actions where action = 'block-place')
|
|||||||
and timestamp > EXTRACT(EPOCH FROM current_timestamp(0))::bigint - 86400
|
and timestamp > EXTRACT(EPOCH FROM current_timestamp(0))::bigint - 86400
|
||||||
group by world_id, x, y, z
|
group by world_id, x, y, z
|
||||||
order by count((world_id, x, y, z)) desc;
|
order by count((world_id, x, y, z)) desc;
|
||||||
|
|
||||||
|
-- 1天内,unknown 引发的 block-place 事件,按坐标分组并排序
|
||||||
|
select world_id, x, y, z, count((world_id, x, y, z))
|
||||||
|
from activities
|
||||||
|
where action_id = (select action_id from actions where action = 'block-place')
|
||||||
|
and cause_id = (select cause_id from causes where cause = 'unknown')
|
||||||
|
and timestamp > EXTRACT(EPOCH FROM current_timestamp(0))::bigint - 86400
|
||||||
|
group by world_id, x, y, z
|
||||||
|
order by count((world_id, x, y, z)) desc;
|
||||||
|
|
||||||
|
-- 1天内的 block-break 行为按玩家分组
|
||||||
|
select cause_player_id, players.player, count(*)
|
||||||
|
from activities
|
||||||
|
left join players on activities.cause_player_id = players.player_id
|
||||||
|
where action_id = (select action_id from actions where action = 'block-break')
|
||||||
|
and timestamp > EXTRACT(EPOCH FROM current_timestamp(0))::bigint - 86400
|
||||||
|
group by cause_player_id, player
|
||||||
|
order by count(cause_player_id) desc;
|
||||||
|
|
||||||
|
-- 1天内,非玩家触发的 block-break 行为,按 cause_id 分组
|
||||||
|
select activities.cause_id, causes.cause, count(*)
|
||||||
|
from activities
|
||||||
|
left join causes on activities.cause_id = causes.cause_id
|
||||||
|
where action_id = (select action_id from actions where action = 'block-break')
|
||||||
|
and timestamp > EXTRACT(EPOCH FROM current_timestamp(0))::bigint - 86400
|
||||||
|
and activities.cause_player_id is null
|
||||||
|
group by activities.cause_id, causes.cause
|
||||||
|
order by count(activities.cause_id) desc;
|
||||||
|
|
||||||
|
-- 1天内,风弹实体触发的 block-break 行为,按坐标分组
|
||||||
|
select world_id, x, y, z, count((world_id, x, y, z))
|
||||||
|
from activities
|
||||||
|
where action_id = (select action_id from actions where action = 'block-break')
|
||||||
|
and cause_entity_type_id = (select entity_type_id from entity_types where entity_type = 'breeze_wind_charge')
|
||||||
|
and timestamp > EXTRACT(EPOCH FROM current_timestamp(0))::bigint - 86400
|
||||||
|
group by world_id, x, y, z
|
||||||
|
order by count((world_id, x, y, z)) desc;
|
||||||
|
|||||||
Reference in New Issue
Block a user