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: Michel Cadot <micadot{at}altern{dot}org>
Date: Thu, 8 Mar 2007 17:53:36 +0100
Message-ID: <45f03f8e$0$10426$426a74cc@news.free.fr>

<Rajisistla_at_gmail.com> a écrit dans le message de news: 1173372103.534945.216040_at_v33g2000cwv.googlegroups.com...
|i am trying to find out
| customer who has got more clicks and spent amount for yesterday
|
| 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
|
| But its giving more than one Rec. I need only one.
|
| I appreciate your help.
| Thanks
|

It gives you what you ask: 1 row per cust_key. What do you want?

Regards
Michel Cadot Received on Thu Mar 08 2007 - 10:53:36 CST

Original text of this message

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