The easiest way to explain what I want to accomplish is with this example:
let data = datatable(id:int, b:string, c:string, dateTime:datetime)
[
1,"","c one","2021-03-03",
2,"b one","","2021-03-04",
3,"","c two","2021-03-05"
];
As you can see, id and date values are present for every row. Values for b and c columns are optional. The goal would be to get, in one row, the latest value for each column, when that value is not empty. Result should look like:
3, "b one", "c two", "2021-03-05"
In real scenario there are much more columns and I am wondering is it possible to do it on an easy way, without writing too much queries.