I have this problem:
SELECT monthname (h.i_date) AS m FROM History h where year (now ()) GROUP BY month (h.i_date)
I execute this statement in mysql and there are no problems. But using JPA in java launches the second 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.
I hope you can help me. Thanks.