Add total row counts
jeffshumphreys opened this issue · comments
SELECT table_name, (SELECT n_live_tup FROM pg_stat_user_tables WHERE relname = table_name) AS row_count FROM information_schema. tables WHERE table_schema = 'public'; This
SELECT sum(row_count) FROM (SELECT table_name, (SELECT n_live_tup FROM pg_stat_user_tables WHERE relname = table_name AND schemaname = 'simplified') AS row_count FROM information_schema. tables WHERE table_schema = 'simplified') AS x;
Added to D:\qt_projects\filmcab\simplified\stats\FilmCab Daily Progress - using SQL.sql.