From 0088ccfc9dea4a38a948ad8890df79d9de87615b Mon Sep 17 00:00:00 2001 From: Fortern Date: Sun, 1 Feb 2026 19:46:28 +0800 Subject: [PATCH] prism --- PostgreSQL/prism/prism.sql | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/PostgreSQL/prism/prism.sql b/PostgreSQL/prism/prism.sql index 37e537d..371cbc6 100644 --- a/PostgreSQL/prism/prism.sql +++ b/PostgreSQL/prism/prism.sql @@ -158,6 +158,15 @@ where action_id = (select action_id from actions where action = 'block-break') group by world_id, x, y, z order by count((world_id, x, y, z)) desc; +-- 1天内,cause_id为null的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_id is null + and timestamp > EXTRACT(EPOCH FROM current_timestamp(0))::bigint - 86400 * 1 +group by world_id, x, y, z +order by count((world_id, x, y, z)) desc; + -- 1天内,风弹实体触发的 block-break 行为,按坐标分组 select world_id, x, y, z, count((world_id, x, y, z)) from activities