fix daily aggregation report
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-01-15 12:38:11 +11:00
parent 3f985dcd4d
commit bba308ad28
2 changed files with 25 additions and 15 deletions

View File

@@ -507,6 +507,7 @@ WITH daily AS (
), totals AS (
SELECT COALESCE(SUM(total_samples_day), 0) AS total_samples FROM enriched
)
-- monthly averages are weighted by the implied sample counts per day (SamplesPresent / AvgIsPresent)
INSERT INTO %s (
"InventoryId", "Name", "Vcenter", "VmId", "EventKey", "CloudId", "CreationTime", "DeletionTime",
"ResourcePool", "Datacenter", "Cluster", "Folder", "ProvisionedDisk", "VcpuCount",