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 -> Re: Simple SQL (or complex???)

Re: Simple SQL (or complex???)

From: DA Morgan <damorgan_at_psoug.org>
Date: Mon, 19 Mar 2007 14:37:04 -0700
Message-ID: <1174340224.448003@bubbleator.drizzle.com>


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.org
Received on Mon Mar 19 2007 - 16:37:04 CDT

Original text of this message

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