I have the data this way in my table and i am trying to get data as below. I tried using coalese but having issues getting data for the latest.
Key Hazards DateTime
170021 Safety 2016-01-25
170021 Concerns 2016-01-25
170021 Abuse 2016-01-25
252098 Financial 2016-10-28
250606 Environmental 2016-10-26
359287 food,utilities 2016-08-08
409153 climate control 2016-06-24
671881 None 2016-05-24
Answer: Safety,Concerns,Abuse
Result Should be as above. What iam trying to do is get the key based on latest value of DateTime and if multiple records available for that Key concatenate them into a string and return back. If only single record just get that record back.