Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: GROUP BY....but not on all columns
On Jun 17, 12:27 am, "pankaj_wolfhun..._at_yahoo.co.in"
<pankaj_wolfhun..._at_yahoo.co.in> wrote:
> 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
Sorry...didnt provide the oracle version earlier
Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production PL/SQL Release 9.2.0.8.0 - Production Received on Sat Jun 16 2007 - 14:46:27 CDT