Does \"group by\" clause automatically guarantee that the results will be ordered by that key? In other words, is it enough to write:
select * from table group
group by does not order the data neccessarily. A DB is designed to grab the data as fast as possible and only sort if necessary.
group by
So add the order by if you need a guaranteed order.
order by