pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Henry <henry_lu@hotmail.com>
To: pgsql-general@postgresql.org.pgsql-sql
Subject: Help with SQL statement - Thanks
Date: Sat, 14 Jul 2001 15:16:01 -0400
Message-ID: <fR047.109239$HJ1.3093152@e3500-atl1.usenetserver.com> (raw)

There is a table called "Payments" which records every payment that a
company has received:

CustomerNo     Date    Amount
----------------------------------------
3214                2/12    30
3214                4/10    50
9943                4/18    40
9943                5/10    30
9943                2/13    70
1121                5/23    10
1121                4/20    40
1121                3/12    30
(more data...)


I want to be able to pull out the last payment made by everyone in a query:

CustomerNo     Date    Amount
---------------------------------------
3214                4/10    50
9943                5/10    30
1121                5/23    10
(other users...)

How should I write the SQL statement? Please email to me at
henry_lu@hotmail.com. Thank you very much.

Henry






view thread (3+ messages)  latest in thread

Message-ID: <fR047.109239$HJ1.3093152@e3500-atl1.usenetserver.com>
Permalink:  ../fR047.109239$HJ1.3093152@e3500-atl1.usenetserver.com/
Also on:    postgresql.org/message-id/fR047.109239$HJ1.3093152@e3500-atl1.usenetserver.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: henry_lu@hotmail.com, pgsql-general@postgresql.org.pgsql-sql
  Subject: Re: Help with SQL statement - Thanks
  In-Reply-To: <fR047.109239$HJ1.3093152@e3500-atl1.usenetserver.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