I have two different queries:
Is:
select SUM(calidadProducto) from calidad cal where cal.codigo = 50;
which will return the value 11.
And this:
select COUNT(calidadProducto) from calidad cal where cal.codigo = 50;
which will return the value 4.
What I need is to divide (mathematically speaking) the queries. And so get the result: 2.75 or 3 if it returns as an integer. Because what I have is the total sum and the quantities, I need to do that division to obtain the average.