Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: [Q] SQL statement grouping by a field , and ordering within a group
Kyoichi Ozaki wrote:
> hi all,
>
> i have an question considering a SQL statement.
>
> here is what i have, and want to do.
>
> i have a table with artist,songs,song ids.
>
> 0001 personA song1
> 0002 personA song2
> 0003 personB song3
> 0004 personC song4
> 0005 personA song6
> 0006 personA song5
> 0007 personD song7
>
> and i want to creat a SQL statement that generates a result
> that is grouped by artist, and ordered by songs owned by that
> artist.
>
> 0001 personA song1
> 0002 personA song2
> 0006 personA song5
> 0005 personA song6
> 0003 personB song3
> 0004 personC song4
> 0007 personD song7
>
> please help
>
> ---
> Kyoichi Ozaki
> k-ozaki_at_igs.inter-gate.co.jp
RTFM about order by clause in select statement. Received on Fri Dec 15 2000 - 02:38:23 CST