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 -> Re: SQl Query Group By function

Re: SQl Query Group By function

From: <Rajisistla_at_gmail.com>
Date: 8 Mar 2007 11:12:36 -0800
Message-ID: <1173381156.672857.310610@64g2000cwx.googlegroups.com>


On Mar 8, 2:01 pm, "Michel Cadot" <micadot{at}altern{dot}org> wrote:
> | I want the Customer Key with max clicks
>
> Sorry did not understand:
>
> select * from (
> select c.cust_key, max(c.bllble_clk_cnt) bllble_clk_cnt,
> max(bllble_clk_rev_amt) bllble_clk_rev_amt
> from pfp_acct_dly_fct c where
> time_key=TO_NUMBER(TO_CHAR(TRUNC(SYSDATE-1), 'YYYYMMDD'))
> group by c.cust_key
> order by 2 desc, 3 desc
> )
> where rownum = 1
> /
>
> Regards
> Michel Cadot

Thanks a Lot Michel Cadot. Received on Thu Mar 08 2007 - 13:12:36 CST

Original text of this message

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