I currently run the below query in Snowflake for some of my reconciliations- have never worked in PostgreSQL but we just adopted it.
Select count(1), min (LAST_UPDATED_DATE), max(LAST_UPDATED_DATE) from "SOURCE"."SCHEMA"."TABLE"
I’m looking to do the same thing in PosgreSQL. 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 either. Any pointers/tips would be amazing