select pk as pk_patient, *
from
	dem.identity
where
	modified_when between (
		-- when was the faulty script imported
		select imported from gm.schema_revision where filename like '%v10-dem-identity-dynamic.sql%'
	) and (
		-- when was this fixup script imported
		select imported from gm.schema_revision where filename = '$RCSfile: v11-cfg-report_query-dynamic.sql,v $'
	)
