select relname as TABLE_NAME, reltuples as rowCounts from pg_class where relkind = 'r' and relnamespace = ( select oid from pg_namespace where nspname = 'dw') order by rowCounts desc;