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 ...
一部の結果でアクセス不可の可能性があるため、非表示になっています。
アクセス不可の結果を表示する