Not sure if you could do it in one step, but you could try using the 'distinct' command to get the first records of each cp/period - IIRC you can only retrieve the fields that you actually want to be ...
Results that may be inaccessible to you are currently showing.
Hide inaccessible results