Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Simple SQL (or complex???)
P_swiggers_at_yahoo.com wrote:
> 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...:-))
Post your query. This looks a lot like homework so it would be helpful to see what you did.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Mon Mar 19 2007 - 16:37:04 CDT
![]() |
![]() |