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: GROUP BY....but not on all columns

Re: GROUP BY....but not on all columns

From: DA Morgan <damorgan_at_psoug.org>
Date: Sun, 17 Jun 2007 11:22:09 -0700
Message-ID: <1182104528.499378@bubbleator.drizzle.com>


pankaj_wolfhunter_at_yahoo.co.in wrote:

> On Jun 17, 1:41 am, "Michel Cadot" <micadot{at}altern{dot}org> wrote:

>> <pankaj_wolfhun..._at_yahoo.co.in> a écrit dans le message de news: 1182022067.132225.271..._at_n15g2000prd.googlegroups.com...
>> | Greetings,
>> | I need to apply a group by in my query but not necessarily on all
>> | columns in select list.
>> |
>> | For eg:
>> |
>> | select col1, col2, col3, col4, col5
>> | from table_name
>> | group by col1, col2, col3, col4
>> |
>> | Now the requirement is to include all 5 columns but group by only
>> | first 4
>> |
>> | How can I achieve this? Any help would be appreciated.
>> |
>> | TIA
>> |
>>
>> Instead of posting a wrong query
>> post your needs in functional terms.
>> What do you want?
>>
>> Regards
>> Michel Cadot

>
> Thanks for the reply Michael and sorry for that query as a demo

That's Michel ... not Michael.

> We have one de-normalized table in one schema(say db2). ...

This is not the statement of a business requirement it is an "I want" statement. What is the business case?

For example:
We need to aggregate, by some value, all of the ....

-- 
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 Sun Jun 17 2007 - 13:22:09 CDT

Original text of this message

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