| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Simple SQL (or complex???)
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
![]() |
![]() |