From fe694579f1f2468c51a57193c0ed51b9c66933db Mon Sep 17 00:00:00 2001 From: Fortern Date: Thu, 22 Jan 2026 21:44:55 +0800 Subject: [PATCH] prism --- PostgreSQL/prism/prism.sql | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/PostgreSQL/prism/prism.sql b/PostgreSQL/prism/prism.sql index 372dd4f..c585721 100644 --- a/PostgreSQL/prism/prism.sql +++ b/PostgreSQL/prism/prism.sql @@ -190,6 +190,14 @@ where action_id = (select action_id from actions where action = 'item-dispense') group by world_id, x, y, z order by count((world_id, x, y, z)) desc; +-- 1天内,item-dispense行为,按坐标与物品分组 +select world_id, x, y, z, descriptor, count((world_id, x, y, z, descriptor)) +from activities +where action_id = (select action_id from actions where action = 'item-dispense') + and timestamp > EXTRACT(EPOCH FROM current_timestamp(0))::bigint - 86400 * 1 +group by world_id, x, y, z, descriptor +order by count((world_id, x, y, z, descriptor)) desc; + -- 1天内,发射的矿车,按坐标分组 select world_id, x, y, z, count((world_id, x, y, z)) from activities