0
I’m trying to use the code below:
select
case when((sum(valido) / sum(total) * 100) >= 60 then 60 else (sum(valido) / sum(total) * 100) end) i1
from tabela
Syntax error near 'then 60 Else...'
0
I’m trying to use the code below:
select
case when((sum(valido) / sum(total) * 100) >= 60 then 60 else (sum(valido) / sum(total) * 100) end) i1
from tabela
Syntax error near 'then 60 Else...'
Browser other questions tagged mysql query
You are not signed in. Login or sign up in order to post.
I don’t understand, what is the doubt?
– Ricardo Pontual
hi buddy, sorry. I made the post change @Ricardopunctual
– Italo Rodrigo
Don’t have to end with END CASE? https://dev.mysql.com/doc/refman/8.0/en/case.html
– Leonardo Alves Machado
@Leonardoalvesmachado no. the error is in the calculation. by the looks of it I will create Queries to make the code I need.
– Italo Rodrigo