I am running a query to keep the last submitted record based on mobile. I have that process nailed down, as you can see in the below query example.
WITH cte AS (