>>>I would try to get Reference, Min Date and Max Date in separate CTE and JOIN back to PIVOT results
>
>>Very Good Idea
>>
>>Thanks, I will use it as Option B
>
>it is that I would love to have 1 single record per reference, and doing it like that, will give me more than one record per reference
You are doing it incorrectly if you get more than 1 record per Reference
--sb--