Hi, so I need to show something like this:
App | sum | Sum of the past 30 days
the querie would be something like this:
select app, sum(bandwidth), (sum(bandwidth)/30) from $log where to_timestamp(itime)::date BETWEEN (current_date) and (current_date-30)
That's just an example, maybe it's not even functional. But here's my question, with the where condition the querie would select the records between today and the actual date minus 30 days. So, the last column will collect those records, make the sum and divide the result.
But how I could select the records from today and just that ones to make the sum of the present day(2nd column).
I'm not sure if I'm being clear or something. If someone got the idea and knows what could I do, I'd aprecciate it and if someone needs a better explanation just let me know.
Regards.
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
User | Count |
---|---|
1749 | |
1114 | |
765 | |
447 | |
241 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.