troubleshooting Question

Sql top 2 order dates for multiple parts

Avatar of regbit
regbit asked on
Microsoft SQL ServerSQL
11 Comments2 Solutions402 ViewsLast Modified:
Tables.Fields: Order.Order_Date, Order_Lines.Part_ID, Order_Lines.Price

I want a query that will give me the parts, with price, ordered each day as well as the last date, with price, each part was ordered.  ie:

Part   Ord Date  Price
1111 5/16/2011 1.00
1111 2/13/2011 1.25
2222 5/16/2011 5.00
2222 12/3/2010 4.50

and so on.

Thank you

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 11 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros