Another stupid question

Clearsky24

New member
Local time
Today, 10:48
Joined
Mar 12, 2003
Messages
8
Yesterday I got help when I was building a query to show the last order by a customer. That way I could quickly see an email and phone number of customers who haven't used us in the last four months. I couldn't figure out how to show only the last order date.... but we figured it out by doing a total then max on the last order date.

But now I thought, since I got that to work I have more questions.... GREED

So I have my querry merging company info name phone email etc... with the last date they ordered from the orders table, which results in just 1 line for each customer.

Anyhoo, Now I am adding to that querry with a UnitPrice column, and what I want to see is.... the total of all of their orders, so if they ordered 15 logos at $50 a piece it would say $750 Instead when I do Sum of Unit price it tells me $11250 which is the Sum of all of their orders * the number of orders they received.
What in the heck am I doing wrong here?
 
Is this helpful?
I guess what I need to find out, is why that column, I want to show, the total amount of money that customer has spent with us, so a total of the unitprice column should do it.... but.... instead it tells me the total of the unitprice column times the number of records they have on file.

I could hide the column and build a second query that says divide that number... by total number of records, but I don't know how to get the thing to recognize number of records.
querry.jpg
 

Users who are viewing this thread

Back
Top Bottom