SELECT schemaname,relname,n_live_tup FROM pg_stat_user_tables ORDER BY n_live_tup DESC;
Recently, I imported 25 Excels into PostgreSQL separate tables with R, after imported, I was told there existed two excel files with the same content, I forgot recording  the relationship between excel and table, so I found the SQL to help me detect the duplicated tables.