Zilvia.net Forums | Nissan 240SX (Silvia) and Z (Fairlady) Car Forum

Go Back   Zilvia.net Forums | Nissan 240SX (Silvia) and Z (Fairlady) Car Forum > Specific Topics > Off Topic Chat

Off Topic Chat All non related chat goes here.


 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 03-03-2006, 10:54 AM   #5
ZK
Zilvia FREAK!
 
ZK's Avatar
 
Join Date: May 2003
Location: North Cal
Posts: 1,088
Trader Rating: (0)
ZK is making a name for him/her selfZK is making a name for him/her selfZK is making a name for him/her self
Feedback Score: 0 reviews
Quote:
Originally Posted by jOeHaCk98
These are the fields:
Firstname, Lastname, Order Date, Product name, Quantity, Unit Price, OrderID

Here is the problem
I want to total up the customer orders, right now it is displaying each individual order. I want to delete the duplicate 'OrderID' BUT merge the 'Unit Price' THEN multiply by the 'Quantity'

Can anyone help?

THANKS!
Use this:

Select distinct Firstname, Lastname, Order Date, sum(unit price*quantity) group by firstname, lastname, Order Date

I feel old .. I graduated from college 6 years ago.
ZK is offline   Reply With Quote
 

Bookmarks


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 01:02 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vB.Sponsors
Copyright ? 1998 - 2022, Zilvia.net