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

Home -> Community -> Usenet -> c.d.o.misc -> Simple SQL (or complex???)

Simple SQL (or complex???)

From: <P_swiggers_at_yahoo.com>
Date: 19 Mar 2007 14:29:30 -0700
Message-ID: <1174339770.188421.13280@e1g2000hsg.googlegroups.com>


I'm looking for some help on SQL.

very simple table:

SQL> select * from patt;

       CMB COD
---------- --------

         1    A
         1    B
         1    C
         2    X
         2    B
         2    C
         3    A
         3    B
         3    C


As I can see there are :
2 sets of same COD: A,B,C (for CMB 1 & 3) with max(CMB)=3 1 set of same COD: X,B,C (for CMB 2) with max(CMB)=2

However, I cannot get my query to get result: max(CMB) count(*)

3               2
2               1

Hallelujah Hollywood for who can give me the sql...:-)) Received on Mon Mar 19 2007 - 16:29:30 CDT

Original text of this message

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