It seems the problem is in ORDER BY clause. Try this:
SELECT returnMonth(date, 'no') as month_num, 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, month_num
ORDER BY month_num
--~--~---------~--~----~------------~-------~--~----~
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