I need help with converting multiple date of visits into columns using SQL server. I know this can be done in pivot. I have tried but can't get it to work. Any help would be greatly appreciated. Thanks much!
I have sample data in columns; ID,DOB, visitDate and NumberOfVisits.

and would like to have outputs look like this.
