Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> QUERY HELP NEEDED

QUERY HELP NEEDED

From: <fwdkhan_at_gmail.com>
Date: 10 Mar 2007 06:04:48 -0800
Message-ID: <1173535488.859876.105360@j27g2000cwj.googlegroups.com>


Hi All,
i need ur help this is the query i have written now what i want is the maximum value from EXPR1 column i try to use use MAX(Count(COL1)) but it give error pls help me to achieve this task. i hope u understand my question. thanku.

SELECT COUNT(TABLE1.COL1) AS Expr1, TABLE2.COL2 FROM TABLE1,TABLE2 where TABLE1.COL1 = TABLE2.COL1 GROUP BY TABLE2.COL2
ORDER BY expr1 DESC

RESULT

EXPR1      COL2
6             1212131
6             1212131
4             121121
2             1212121


what i want is the maximum values

RESULT

EXPR1         COL2
6                 1212131
6                 1212131
Received on Sat Mar 10 2007 - 08:04:48 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US