I imagine it is a very easy problem to solve, but I have been in it for a few days and so far I have not succeeded. I\'m making a database that contains the following structure