Message-Id: <10652.119582@fatcity.com> From: Abdul Aleem Date: Wed, 18 Oct 2000 08:45:59 +0500 Subject: RE: group by sorting This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C038B5.EF042260 Content-Type: text/plain; charset="iso-8859-1" If I understood correctly then I feel this should work SELECT col1, col2, col3, SUM(col4), MIN(Col5), ..... GROUP BY Col1, Col2, Col3 ORDER BY col1 DESC, col2, Col3 DESC Aleem -----Original Message----- From: Bowes, Chris [mailto:Chris.Bowes@kosa.com] Sent: Wednesday, October 18, 2000 3:23 AM To: Multiple recipients of list ORACLE-L Subject: group by sorting I have looked in a couple manuals for this but have not found it. When doing a group by, a sort is done on the data. Is there anyway to specify a descending order for that sort? It is defaulted to ascending. Is there a way of overriding that? I told the developer that she should put it into a subquery but the query itself (all 3 pages) is already complex enough. Any ideas? Thank you in advance. --Chris Chris.Bowes@Kosa.com ------_=_NextPart_001_01C038B5.EF042260 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable group by sorting

I= f I understood correctly then I feel this should = work

<= ![if = !supportEmptyParas]> 

=

S= ELECT col1, col2, col3, SUM(col4), MIN(Col5), ….. =

G= ROUP BY Col1, Col2, Col3

O= RDER BY col1 DESC, col2, Col3 DESC

<= ![if = !supportEmptyParas]> 

=

A= leem

<= ![if = !supportEmptyParas]> 

=

-----Original Message-----
From: Bowes, Chris [mailto:Chris.Bowes@kosa.com]
Sent: Wednesday, October = 18, 2000 3:23 AM
To: Multiple recipients = of list ORACLE-L
Subject: group by = sorting

 

I have looked = in a couple manuals for this but have not found it.  When doing a group = by, a sort is done on the data. Is there anyway to specify a descending order = for that sort?  It is defaulted to ascending.  Is there a way of overriding that?   I told the developer that she should put = it into a subquery but the query itself (all 3 pages) is already complex = enough.  Any ideas?  Thank you in advance.=

 =

--Chris<= /font>
Chris.Bowes@Kosa.com