I currently run the below query in Snowflake for some of my reconciliations and have never worked in PostgreSQL, which we just adopted.
Select count(1), min (LAST_UPDATED_DATE), max(LAST_UPDATED_DATE)
from "SOURCE"."SCHEMA"."TABLE"
I'm looking to do the same thing in PostgreSQL. It's one that we can run against a table that will give us the last updated date and a count when checking that movements completed.
I know Postgres can be time heavy on counts and some of these tables are massive. That aside I'm not sure how to rewrite this to begin with.