pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jaime Casanova <systemguards@gmail.com>
To: Leon Stringer <leon.stringer@ntlworld.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Consecutive row count query
Date: Thu, 17 Mar 2005 16:32:31 -0500
Message-ID: <c2d9e70e0503171332763fd02a@mail.gmail.com> (raw)
In-Reply-To: <1111090884.22783.5.camel@localhost.localdomain>
References: <1111090884.22783.5.camel@localhost.localdomain>

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



view thread (6+ messages)  latest in thread

Message-ID: <c2d9e70e0503171332763fd02a@mail.gmail.com>
Permalink:  ../c2d9e70e0503171332763fd02a@mail.gmail.com/
Also on:    postgresql.org/message-id/c2d9e70e0503171332763fd02a@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: systemguards@gmail.com, leon.stringer@ntlworld.com
  Subject: Re: Consecutive row count query
  In-Reply-To: <c2d9e70e0503171332763fd02a@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox