estoy dandole vueltas y más vueltas y no se me ocurre manera
¿cómo podría realizar la siguiente consulta?
Código:
select id,sum(puntos)
from ptabla
where sum(puntos)>=(select sum(puntos) from ptabla where id=1)
group by id
order by sum(puntos)
me tira un #1111 - Invalid use of group function