I have tried (if I understand corectly)

SELECT returnMonth(date, 'name') AS month , COUNT(*)AS "count", SUM
(invoice.value) AS "sum", AVG(invoice.value) AS "average" FROM invoice
WHERE invoice.farmerId=1 AND invoice.companyId LIKE '1' AND
invoice.dbyear LIKE '%' GROUP BY month ORDER BY
returnMonth(date, 'no')

but I got

org.h2.jdbc.JdbcSQLException: Column DATE must be in the GROUP BY
list;





--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to