I have problems with formulating the query to resolve the following. I have a table like for example (illustration). I need to group by the trio of columns that appear in yellow and the fourth column of the result of the query would be the record that appears first.
... and I need to see the result in the following way ...