I'm working on a Order Table which has all the details regarding the order's that were allocated. The sample DB example is
Order ID Order Status Action Date
23424 ALC 1571467792094280
23424 PIK 1571467792999990
23424 PAK 1571469792999990
23424 SHP 1579967792999990
33755 ALC 1581467792238640
33755 PIK 1581467792238640
33755 PAK 1581467792238640
33755 SHP 1581467792238640
In the table I have order ID , status, action_date (the action dates updated when ever there is an update on order status against the update timestamp, the action_date is unix time)
I'm trying to write a query that can provide me the Order ID, ALC_AT, PIK_AT, PAK_AT, SHP_AT Basically all the timestamp updates against a Order ID within one row, I know it can be done via Nested Query but, I'm unable to figure how how to do it.
Any help would be highly appreciated.
Edit (As asked to provide the sample result ) :
Order ID Order Status ALC_AT PIK_AT PAK_AT SHP_AT
23424 SHP 1571467792094280 1571467792999990 1571469792999990 1579967792999990