Domanda

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;
È stato utile?

Soluzione 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

Altri suggerimenti

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;
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top