• Can you explain a bit more what you are trying to achieve?

    Btw, your sample data has different IDs and all the other columns are the same.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP