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.


Reply
 
Thread Tools Display Modes
Old 02-28-2006, 07:41 PM   #1
jOeHaCk98
Zilvia Addict
 
Join Date: May 2002
Posts: 730
Trader Rating: (0)
jOeHaCk98 is making a name for him/her selfjOeHaCk98 is making a name for him/her self
Feedback Score: 0 reviews
School Help: DB Access question.

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!
jOeHaCk98 is offline   Reply With Quote
Sponsored Links
Old 03-01-2006, 12:49 PM   #2
jOeHaCk98
Zilvia Addict
 
Join Date: May 2002
Posts: 730
Trader Rating: (0)
jOeHaCk98 is making a name for him/her selfjOeHaCk98 is making a name for him/her self
Feedback Score: 0 reviews
nobody? help a brotha out. promote education.
jOeHaCk98 is offline   Reply With Quote
Old 03-03-2006, 02:00 AM   #3
240meowth
Nissanaholic!
 
Join Date: Dec 2001
Location: torrance, ca
Age: 41
Posts: 2,407
Trader Rating: (4)
240meowth is a name known to all240meowth is a name known to all240meowth is a name known to all240meowth is a name known to all240meowth is a name known to all240meowth is a name known to all240meowth is a name known to all240meowth is a name known to all240meowth is a name known to all240meowth is a name known to all240meowth is a name known to all
Feedback Score: 4 reviews
Send a message via AIM to 240meowth
i'd love to help, but i forgot all my SQL's...

although i can recommand a site to you, http://www.w3schools.com/ this thing helped me through college.
__________________
240meowth is offline   Reply With Quote
Old 03-03-2006, 08:53 AM   #4
jOeHaCk98
Zilvia Addict
 
Join Date: May 2002
Posts: 730
Trader Rating: (0)
jOeHaCk98 is making a name for him/her selfjOeHaCk98 is making a name for him/her self
Feedback Score: 0 reviews
cool thanks.
Why did you lose all ur sql? What are you doing know, if you dont mind me asking.
jOeHaCk98 is offline   Reply With Quote
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
Old 03-03-2006, 11:41 AM   #6
jOeHaCk98
Zilvia Addict
 
Join Date: May 2002
Posts: 730
Trader Rating: (0)
jOeHaCk98 is making a name for him/her selfjOeHaCk98 is making a name for him/her self
Feedback Score: 0 reviews
I guess feeling old cant feel too bad since you went from a 240sx to an evo. You finacial situation appears to be better.
jOeHaCk98 is offline   Reply With Quote
Old 03-03-2006, 11:53 AM   #7
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
I guess feeling old cant feel too bad since you went from a 240sx to an evo. You finacial situation appears to be better.
Perhaps.. but the S13 cost me 20K over 3 years to build and was breaking something every other month so this car is actually about the same if you add it up. Plus I wanted to spend more time actually driving than fixing broken stuff.

You may think if you make more money you have more of it but in the end, it will get spent somewhere, somehow and all sorts of expenses you didn't predict will come out to fill it up so in the end you're about the same.

As for SQL, I use it everyday so if you have any other questions let me know.
ZK is offline   Reply With Quote
Old 03-03-2006, 12:16 PM   #8
jOeHaCk98
Zilvia Addict
 
Join Date: May 2002
Posts: 730
Trader Rating: (0)
jOeHaCk98 is making a name for him/her selfjOeHaCk98 is making a name for him/her self
Feedback Score: 0 reviews
Thanks for offer. I probably will from time to time.
jOeHaCk98 is offline   Reply With Quote
Old 03-07-2006, 01:09 AM   #9
jOeHaCk98
Zilvia Addict
 
Join Date: May 2002
Posts: 730
Trader Rating: (0)
jOeHaCk98 is making a name for him/her selfjOeHaCk98 is making a name for him/her self
Feedback Score: 0 reviews
in regards to the same question. My sql is:

SELECT Orders.OrderID, Customers.LastName, Orders.OrderDate, Products.ProductID, Products.ProductName, [Order Details].Quantity, Products.UnitPrice, [UnitPrice]*[Quantity] AS Amount
FROM Products INNER JOIN ((Customers INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerID) INNER JOIN [Order Details] ON Orders.OrderID = [Order Details].OrderID) ON Products.ProductID = [Order Details].ProductID;


My instructions are to:

Create a query called Total Sales by Order, where you display total sales for each order id.
jOeHaCk98 is offline   Reply With Quote
Reply

Bookmarks



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 02:00 PM.


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