Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to get last time bought item and price of that

Author  Topic 

vandana
Starting Member

29 Posts

Posted - 2013-05-16 : 02:46:33
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

52326 Posts

Posted - 2013-05-16 : 03:57:02
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
   

- Advertisement -