I have a table that has three columns: ID, Date, Group. There are two rows for each unique ID (where Group = 1 or where Group = 2). How can I combine these into a table with one row per ID and the Date values sorted into two columns?
I have:
ID Date Group
123456 12/7/2016 1
123456 12/3/2016 2
789654 11/8/2016 1
789654 12/1/2016 2
I want:
ID Date1 Date2
123456 12/7/2016 12/3/2016
789654 11/8/2016 12/1/2016
This is for Sybase 12, if that matters.