Calculating total amounts per clientid

Поиск
Список
Период
Сортировка
От MT
Тема Calculating total amounts per clientid
Дата
Msg-id 20031213142121.7e43075f.m_tessier@sympatico.ca
обсуждение исходный текст
Ответы Re: Calculating total amounts per clientid
Список 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 по дате отправления:

Предыдущее
От: Josué Maldonado
Дата:
Сообщение: Re: Why is postgres an ORDMS
Следующее
От: Martin Marques
Дата:
Сообщение: Re: Calculating total amounts per clientid