Re: Sorting by data the lowest values
The GROUP BY has to happen after the ORDER BY, so you need a subquery:
SELECT * FROM (
SELECT T1.*, T2.property
FROM T1
JOIN T2 ON T1.id=T2.owner
WHERE T1.menu='. $variable. '
ORDER BY T2.property, T1.date, T1.name
) x
GROUP BY x.owner
ORDER BY x.property, x.date, x.name
Subject
Written By
Posted
Re: Sorting by data the lowest values
June 03, 2010 09:05PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.