Hi There
Just created a .sql script and executes fine, it comes back with two lines of results, I was wondering is there a way of adding up the two results to get a round number. I tired wc -l but that didn't work.
Many Thanks for your help
Code:
Code:
psql -t -f /opt/ca/SAP_Tooling/sql/self_monitoring/check_number_of_open_connections_database.sql
The result is:
The SQL query:
Quote:
select count(*), state from pg_stat_activity group by state;
\q
|
Is there any way of adding those two numbers to get a whole round number of users as in 35.