Hi,
I've been asked to create a SQL View which contains a single row per PalletID from our Scan table.
Below is an example of the table we have. Each row is a scan against a PalletID with a ActivityRef and Scan Date of when it happened.

I need to condense this information within a view whereby I have one row per PalletID, ActivityRef1 column displays the latest scan date of when a scan activity ref of 1 is completed and the same for ActivityRef3.

Any help with this would be amazing.
Thanks
