We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
example:
select state, count(*) "Total count", count(*) filter (where now() - state_change <= '1 second') as "Fresh (<1 sec)", count(*) filter (where now() - state_change > '1 second') as "Old (1+ sec)" from pg_stat_activity group by cube(state);
+ per host (clent_addr) + per app
clent_addr