## Now, find updated or inserted records
select @m := max_bioRecordModified 
from lastUpdated;

replace into updatedRecords
select bioRecordKey as brKey, bioRecordModifiedDate
from GBIF.bioRecord
where bioRecordModifiedDate > @m;
