Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
|
I'm afraid you didn't understood me.
Without worrying about the order of the rows, does the query up there gives you the good rows or not ?
If it's just a matter of ordering, then it's nothing.
If you don't have the right rows, than there is something else to change in the query.
Again, a "group by" clause does not order anything.
You cannot order something with a "group by", you can only limit the number of rows you are getting back on a specific criteria.
So, if the rows are not those you expect, then the "group by" criteria is wrong.
If the rows are correct, then the "order by" clause need some work.
Maybe a sub query is needed to filter the group by result, I don't know.
It's up to you to tell me.
By the way, the table definitions and some sample datas would be of great help.
__________________
Only a biker knows why a dog sticks his head out the window.
|