I need to query three values from two tables. the first two values are queried as follows:
SELECT
(SELECT COUNT(*) FROM table1) AS count,
(SELECT COUNT(*) FROM table2 WHERE config IS NULL) AS upCount,
the third value downCount should be count - upCount. can this operation be done by psql and returned as downCount?