1
0
Fork 0

Fix aggregates update SQL

main release-0.7
Kevin Belisle 2021-09-02 22:29:29 -04:00
parent 24d33afd59
commit 6b3f87c401
1 changed files with 3 additions and 3 deletions

View File

@ -145,9 +145,9 @@ object StatisticsImporter {
GROUP BY Live."Type", Live."Name", Live."PlayerId" GROUP BY Live."Type", Live."Name", Live."PlayerId"
) as LiveMax ) as LiveMax
LEFT JOIN AGGREGATESTATISTICS as Agg LEFT JOIN AGGREGATESTATISTICS as Agg
ON Live."Type" = Agg."Type" ON LiveMax."Type" = Agg."Type"
GROUP BY Live."Type" GROUP BY LiveMax."Type"
HAVING sum(Live."Value") <> max(Agg."Value") OR max(Agg."Value") IS NULL; HAVING sum(LiveMax."Value") <> max(Agg."Value") OR max(Agg."Value") IS NULL;
INSERT INTO AGGREGATESTATISTICS ("Type", "Name", "Timestamp", "Value") INSERT INTO AGGREGATESTATISTICS ("Type", "Name", "Timestamp", "Value")
SELECT LiveMax."Type", SELECT LiveMax."Type",