I have a PostgreSQL table that shows period (date time) with an 15 second increment starting i.g. from
2020-03-27 00:00:00
to
2020-03-27 23:59:45
Each day is identical
2020-03-28 00:00:00
to
2020-03-28 23:59:45
Each of those 15 second increments show a numeric value: Latency_us.
I would like to get the avg, min, max of each day in a separate column. How can I do that?
Here is my select query
create view s3fstj.pc_latency as
select TO_TIMESTAMP(start_time, 'YYYY/MM/DD HH24:MI:SS') as period, epoch, host_name, db_alias, database, db_host, db_host_ip, ip_port, latency_us, pc_domain
from s3fstj.pc_dblatmonstat_latency
I'm also converting period string to timestamp.
