Closed AmandaDoyle closed 4 years ago
SELECT datasource, datasource_old, count_old, count_new, count_new - count_old as diff
from(
SELECT REPLACE(datasource, 'facilities_', '' ) as datasource_join, datasource as datasource_old, count(datasource) as count_old from (
SELECT unnest(string_to_array(pgtable, ';')) as datasource
from facilities_20190110) as a group by datasource) a
FULL JOIN
(select datasource, count(datasource) as count_new from facilities group by datasource) b
on a.datasource_join = b.datasource;
Stale issue message
In addition to current reports also output the following summary statistics to help in QAQC procedures:
;
so if you havedcas_colp; acs_daycare
you'll have +1 for dcas_colp and +1 for acs_daycare