Compare commits
2 Commits
6c78331d26
...
8603108d2c
| Author | SHA1 | Date | |
|---|---|---|---|
| 8603108d2c | |||
| 1fa5b8b496 |
@@ -10,7 +10,7 @@ from activities;
|
||||
select b.action_id, b.action, count(b.action_id)
|
||||
from activities as a
|
||||
left join actions as b on a.action_id = b.action_id
|
||||
where timestamp > EXTRACT(EPOCH FROM current_timestamp(0))::bigint - 86400
|
||||
where timestamp > EXTRACT(EPOCH FROM current_timestamp(0))::bigint - 86400 * 1
|
||||
group by b.action_id, b.action
|
||||
order by count(b.action_id) desc;
|
||||
|
||||
@@ -19,7 +19,7 @@ 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-place')
|
||||
and timestamp > EXTRACT(EPOCH FROM current_timestamp(0))::bigint - 86400
|
||||
and timestamp > EXTRACT(EPOCH FROM current_timestamp(0))::bigint - 86400 * 1
|
||||
group by cause_player_id, player
|
||||
order by count(cause_player_id) desc;
|
||||
|
||||
@@ -27,7 +27,7 @@ order by count(cause_player_id) desc;
|
||||
select *
|
||||
from activities
|
||||
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 * 1
|
||||
and cause_id is not null
|
||||
limit 500;
|
||||
|
||||
@@ -36,7 +36,7 @@ select cause_entity_type_id, entity_type, count(*)
|
||||
from activities
|
||||
left join entity_types on activities.cause_entity_type_id = entity_types.entity_type_id
|
||||
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 * 1
|
||||
and cause_player_id is null
|
||||
group by cause_entity_type_id, entity_type
|
||||
order by count(cause_entity_type_id) desc;
|
||||
@@ -46,7 +46,7 @@ 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-place')
|
||||
and timestamp > EXTRACT(EPOCH FROM current_timestamp(0))::bigint - 86400
|
||||
and timestamp > EXTRACT(EPOCH FROM current_timestamp(0))::bigint - 86400 * 1
|
||||
and activities.cause_id is not null
|
||||
group by activities.cause_id, causes.cause
|
||||
order by count(activities.cause_id) desc;
|
||||
@@ -56,7 +56,7 @@ 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 = 'nature')
|
||||
and timestamp > EXTRACT(EPOCH FROM current_timestamp(0))::bigint - 86400
|
||||
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;
|
||||
|
||||
@@ -65,7 +65,7 @@ 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
|
||||
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;
|
||||
|
||||
@@ -74,7 +74,7 @@ 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
|
||||
and timestamp > EXTRACT(EPOCH FROM current_timestamp(0))::bigint - 86400 * 1
|
||||
group by cause_player_id, player
|
||||
order by count(cause_player_id) desc;
|
||||
|
||||
@@ -83,7 +83,7 @@ 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 timestamp > EXTRACT(EPOCH FROM current_timestamp(0))::bigint - 86400 * 1
|
||||
and activities.cause_player_id is null
|
||||
group by activities.cause_id, causes.cause
|
||||
order by count(activities.cause_id) desc;
|
||||
@@ -93,7 +93,7 @@ select activities.cause_entity_type_id, entity_types.entity_type, count(*)
|
||||
from activities
|
||||
left join entity_types on activities.cause_entity_type_id = entity_types.entity_type_id
|
||||
where action_id = (select action_id from actions where action = 'block-break')
|
||||
and timestamp > EXTRACT(EPOCH FROM current_timestamp(0))::bigint - 86400
|
||||
and timestamp > EXTRACT(EPOCH FROM current_timestamp(0))::bigint - 86400 * 1
|
||||
and activities.cause_player_id is null
|
||||
group by activities.cause_entity_type_id, entity_types.entity_type
|
||||
order by count(activities.cause_id) desc;
|
||||
@@ -103,7 +103,7 @@ 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
|
||||
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;
|
||||
|
||||
@@ -115,14 +115,14 @@ where action_id = (select action_id from actions where action = 'block-break')
|
||||
and cause_entity_type_id is null
|
||||
and cause_player_id is null
|
||||
and cause_id is null
|
||||
and timestamp > EXTRACT(EPOCH FROM current_timestamp(0))::bigint - 86400
|
||||
and timestamp > EXTRACT(EPOCH FROM current_timestamp(0))::bigint - 86400 * 1
|
||||
limit 100;
|
||||
|
||||
-- 1天内,发射器的数据,按发射的物品分组统计
|
||||
select descriptor, count(*)
|
||||
from activities
|
||||
where action_id = 2
|
||||
and timestamp > EXTRACT(EPOCH FROM current_timestamp(0))::bigint - 86400
|
||||
and timestamp > EXTRACT(EPOCH FROM current_timestamp(0))::bigint - 86400 * 1
|
||||
group by descriptor
|
||||
order by count(descriptor) desc;
|
||||
|
||||
@@ -130,7 +130,7 @@ order by count(descriptor) desc;
|
||||
select descriptor, count(*)
|
||||
from activities
|
||||
where action_id = 2
|
||||
and timestamp > EXTRACT(EPOCH FROM current_timestamp(0))::bigint - 86400
|
||||
and timestamp > EXTRACT(EPOCH FROM current_timestamp(0))::bigint - 86400 * 1
|
||||
and descriptor = 'Shulker Box'
|
||||
group by descriptor
|
||||
order by count(descriptor) desc;
|
||||
@@ -140,6 +140,6 @@ 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 = 'entity-death')
|
||||
and timestamp > EXTRACT(EPOCH FROM current_timestamp(0))::bigint - 86400
|
||||
and timestamp > EXTRACT(EPOCH FROM current_timestamp(0))::bigint - 86400 * 1
|
||||
group by cause_player_id, player
|
||||
order by count(cause_player_id) desc;
|
||||
|
||||
Reference in New Issue
Block a user