Update access_record table

pull distinct records from raw_access_record
update entityId field for simple query