WITH target_tables(relname) AS (
  VALUES
    ('users'),
    ('user_assets'),
    ('user_asset_changes'),
    ('user_subscriptions'),
    ('payment_orders'),
    ('billing_usage_entries'),
    ('api_keys'),
    ('redeem_codes'),
    ('promo_codes'),
    ('promo_code_usages'),
    ('invite_commission_records'),
    ('user_allowed_groups'),
    ('accounts'),
    ('account_groups')
)
SELECT
  c.relname,
  COALESCE(s.n_live_tup,0)::bigint AS est_rows,
  pg_total_relation_size(c.oid) AS total_bytes
FROM pg_class c
JOIN pg_namespace n ON n.oid = c.relnamespace
JOIN target_tables t ON t.relname = c.relname
LEFT JOIN pg_stat_user_tables s ON s.relid = c.oid
WHERE c.relkind = 'r' AND n.nspname = 'public'
ORDER BY pg_total_relation_size(c.oid) DESC;
