Tengo este problema:
SELECT monthname(h.i_date) AS m FROM History h where year(now()) GROUP BY month(h.i_date)
ejecuto esta sentencia en mysql y no hay problemas. Pero utilizando JPA en java lanza el sgte error:
[33, 34] The SELECT clause has 'monthname' and '(h.iDate) AS m' that are not separated by a comma. [70, 88] The expression is not a valid conditional expression. [102, 103] The GROUP BY clause has 'month' and '(h.iDate)' that are not separated by a comma.
Ojala me puedan ayudar. Gracias.