i have case make report, i tried test the SQL from phpMyadmin oke its work, but then i tried it in the controller its not work properly, the code like this:
SELECT brg.nama, DATE(c.tanggal), SUM(dp.jumlah) FROM DetailPenjualan dp JOIN penjualan c ON
c.id = dp.penjualan_Id JOIN barang brg ON dp.barang_Id =
brg.id GROUP BY brg.nama, DATE(c.tanggal)
but the result in the browser like:
IllegalArgumentException occured : org.hibernate.hql.ast.QuerySyntaxException: unexpected token: ON near line 1, column 98 [SELECT brg.nama, DATE(c.tanggal), SUM(dp.jumlah) FROM models.DetailPenjualan dp JOIN penjualan c ON c.id = dp.penjualan_Id JOIN barang brg ON dp.barang_Id = brg.id GROUP BY brg.nama, DATE(c.tanggal)]
how can i convert it from SQL into JPQL
.?????