Re: Consecutive row count query - Mailing list pgsql-sql

From Jaime Casanova
Subject Re: Consecutive row count query
Date
Msg-id c2d9e70e0503171332763fd02a@mail.gmail.com
Whole thread Raw
In response to Consecutive row count query  (Leon Stringer <leon.stringer@ntlworld.com>)
List pgsql-sql
On Thu, 17 Mar 2005 20:21:24 +0000, Leon Stringer
<leon.stringer@ntlworld.com> wrote:
> Hi,
> 
> I wondered if anyone could answer the following question:
> 
> If I have a table such as the one below:
> 
> col1   col_order
> -----------
> Apple  1
> Apple  2
> Orange 3
> Banana 4
> Apple  5
> 
> Is there a way I can get the following results:
> 
> Apple  2
> Orange 1
> Banana 1
> Apple  1
> 
A function?

regards,
Jaime Casanova


pgsql-sql by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Consecutive row count query
Next
From: Greg Stark
Date:
Subject: Re: Consecutive row count query