Calculating total amounts per clientid - Mailing list pgsql-general

From MT
Subject Calculating total amounts per clientid
Date
Msg-id 20031213142121.7e43075f.m_tessier@sympatico.ca
Whole thread Raw
Responses Re: Calculating total amounts per clientid  (Martin Marques <martin@bugs.unl.edu.ar>)
List pgsql-general
Hi,

I have an invoicing system using postgresql. Each time a customer makes a purchase, a new record is inserted into the
"cart"table. The "cart" table, among other things, contains a customer_id field and a total for the amount purchased on
theparticular invoice. Now what I'd like to do is to calculate the total invoices for each customer in a given time
interval,then list those customers in descending order from most paying to least paying. Could someone give me some
pointerson how to construct an sql statement that would flush out this data. 

Thanks for your help,

Mark

pgsql-general by date:

Previous
From: Josué Maldonado
Date:
Subject: Re: Why is postgres an ORDMS
Next
From: Martin Marques
Date:
Subject: Re: Calculating total amounts per clientid