It looks like you want to return the full row for the earliest record for each branch.
Based on that assumption you can use GROUP BY to group up all rows for each branch, and Min to extract the UniqueId for the earliest row for each group. You can then use that list of UniqueIds to filter the original set of rows.
Assuming your table is called LogTable:
INNER JOIN (SELECT Min(UniqueId) as MinUniqueId
GROUP BY Branch_Id) AS Filtered
ON LogTable.UniqueId = Filtered.MinUniqueId