0
I have the following table
userid--state-----fraction
589-----wrong---0,0
589-----wright---1,0
589-----wright---1,0
589-----wrong---0,0
589-----wrong---0,0
589-----wrong---0,0
589-----wrong---0,0
589-----wrong---0,0
589-----wrong---0,0
589-----gaveup--NULL
When trying to bring the average using the query below the line at which the value of state
for gaveup
is not considered, by fraction
be of value NULL
:
how can I assign value 0,0
to fraction
if the value state
be it gaveup
to get the average correctly?
SELECT avg(fraction) FROM table
Thank you very much friend!
– Miguel Silva
@Miguelsilva, if you solved the problem, mark as accepted ;)
– rLinhares