This commit is contained in:
2026-05-10 21:13:58 +08:00
parent aa86eef3c7
commit 2847d2a2bf
+10 -1
View File
@@ -10,7 +10,8 @@ from activities;
-- 数据总量
select max(activity_id) - min(activity_id) + 1
from activities;
select count(*) from activities;
select count(*)
from activities;
-- 1天内的数据,按action分组排序
select b.action_id, b.action, count(b.action_id)
@@ -247,3 +248,11 @@ where action_id = (select action_id from actions where action = 'block-form')
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-form 行为,按时间倒序排序,前500个
select *
from activities
where action_id = (select action_id from actions where action = 'block-form')
and timestamp > EXTRACT(EPOCH FROM current_timestamp(0))::bigint - 86400 * 1
order by timestamp desc
limit 500;