Good morning, I have a database in which I store students and notes. I have the notes of the first exam and the second exam and I have a third empty column in which I want to store these notes.
I'm trying with select to simulate it but it doesn't get me the average of the sum of the two columns:
select nombre, avg(primerexamen+segundoexamen) as media from dl.modulo1 group by nombre;
If someone can lend me a hand to get this operation.
I plan to do an insert later with the operation indicating that it has to save it in the quarternote column
To calculate this mean, you would have to first calculate one and then the other:
But this is going to return it to you in two columns, so you could do a simple equation to calculate the mean:
This way it should work fine for you.
I wait your answer.