mirror of
https://github.com/norohind/SquadsActivityMonitor.git
synced 2026-10-27 01:16:02 +03:00
WIP: model.get_leaderboard_sum_history and all appropriate stuff
This commit is contained in:
6 files changed
+128
-1
No files matched your search
@@ -84,4 +84,14 @@ full join
|
||||
limit 1)) old_stats
|
||||
on new_stats.squadron_id = old_stats.squadron_id
|
||||
where coalesce(new_stats.score, 0) - coalesce(old_stats.score, 0) <> 0
|
||||
order by coalesce(new_stats.score, 0) - coalesce(old_stats.score, 0) desc;"""
|
||||
order by coalesce(new_stats.score, 0) - coalesce(old_stats.score, 0) desc;"""
|
||||
|
||||
select_leaderboard_sum_history = """select
|
||||
sum(score)::bigint as "Score Sum",
|
||||
to_char(max(timestamp), 'YYYY-MM-DD HH24:MI:SS') as "Timestamp UTC"
|
||||
from squads_stats_states
|
||||
where leaderboard_type = %(LB_type)s and platform = %(platform)s
|
||||
group by action_id
|
||||
order by "Timestamp UTC" desc
|
||||
limit 1000;
|
||||
"""
|
||||
Reference in new issue
Block a user