diff --git a/PostgreSQL/prism/prism.sql b/PostgreSQL/prism/prism.sql index aea08f1..8faf9b9 100644 --- a/PostgreSQL/prism/prism.sql +++ b/PostgreSQL/prism/prism.sql @@ -152,3 +152,12 @@ where action_id = (select action_id from actions where action = 'entity-death') and timestamp > EXTRACT(EPOCH FROM current_timestamp(0))::bigint - 86400 * 1 group by cause_player_id, player order by count(cause_player_id) desc; + +-- 1天内的 entity-death 按实体分组 +select affected_entity_type_id, entity_types.entity_type, count(*) +from activities + left join entity_types on activities.affected_entity_type_id = entity_types.entity_type_id +where action_id = (select action_id from actions where action = 'entity-death') + and timestamp > EXTRACT(EPOCH FROM current_timestamp(0))::bigint - 86400 * 1 +group by affected_entity_type_id, entity_types.entity_type +order by count(*) desc;