Let the a table be:
Product ID | Date of Sale | Time of Sale | Buyer ID | ...
------------------------------------------------------------------
1 | 2019-01-09 | 22:21 | 12 | ...
1 | 2019-01-09 | 9:44 | 13 | ...
1 | 2019-01-03 | 10:32 | 11 | ...
2 | 2019-01-08 | 14:51 | 55 | ...
2 | 2019-01-02 | 11:20 | 10 | ...
. | . | . | . | ...
. | . | . | . | ...
. | . | . | . | ...
I would like to create a View that displays the row of last product bought. That being said, it would be this table:
Product ID | Date of Sale | Time of Sale | Buyer ID | ...
------------------------------------------------------------------
1 | 2019-01-09 | 22:21 | 12 | ...
2 | 2019-01-08 | 14:51 | 55 | ...
. | . | . | . | ...
. | . | . | . | ...
. | . | . | . | ...
I would gladly give my attempts of code but they don't add anything to this question, as they are quite far from an actual solution. However, I've searched extensively on the internet for a couple of minutes. I know that it has to be done with a function.