Can you post a set of data for table from [co_audit_trail] au please? DDL and DML. It will make this exercise much easier for folks to work on if they can see your data.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden