Pergunta

This is the SQL statement:

SELECT opc.contenido, COUNT(r.idOpcPregunta)  
from  Opcionesrespuestas as opc LEFT JOIN Respuestasimples as r ON r.idOpcPregunta = opc.idOpcPregunta 
where opc.idPregunta ='6' 
GROUP BY opc.idOpcPregunta;
Foi útil?

Solução 2

This is the sentence HQL

select opc.contenido, count(r.idOpcPregunta)   from  Respuestasimples as r
right join r.idOpcPregunta as opc  where opc.idPregunta ='6'  
group by opc.contenido

Outras dicas

This is a HQL

select opc.contenido, count(r.idOpcPregunta)  
from  Opcionesrespuestas as opc 
left join opc.OpcPregunta as r  
where opc.idPregunta ='6' 
group by opc.contenido;
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top