Unanswered: Strange behaviour in DB2 9.7.6 WSE for LUW
Since we moved from DB2 9.1.8 WSE for LUW to 9.7.6 WSE for LUW I experience sometimes a strange behaviour.
The sentence db2 "select year(date_column),month(date_column),count(*) from table_name where column1_name<>0 and c=208 group by year(date_column),month(date_column)"
should give first the year, second the month and last the count.
It looks as though you are getting exactly what you asked for, the year, the month and the count.
I think you are trying to say that you do not like the ordering of the data that is returned. Order is never garaunteed without an order by. You may get data in the order you are expecting in some cases due to how the data is clustered, but even then some data might be out of order if you do not expressly define an ORDER BY statement.
You, also, mention GROUP BY, again this has nothing to do with the ordering of the data that is returned to you.