SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to get last time bought item and price of that
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

vandana
Starting Member

29 Posts

Posted - 05/16/2013 :  02:46:33  Show Profile  Reply with Quote
Hi ALl,

how can i calulate last time bought items and price of that items
for a customer

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 05/16/2013 :  03:57:02  Show Profile  Reply with Quote
with limited info provide only thing i can tell is do something like

SELECT TOP 1 WITH TIES *
FROM table
ORDER BY TimeBought DESC


Again question remains if you're looking at last bought time for each item or just on the whole

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000