sql - Select DISTINCT items rows and associated columns based on a condition -


Suppose i have a table like this in my db

  date items etc. 7 / 29/2010 3 1 7/30/2010 3 2 7/31/2010 2 3 7/2 9/2010 3 4 7/30/2010 1 5 7/31/2010 1 6 7/29/2010 2 7 7 / 30/2010 3 8 7/31/2010 1 2  

For each item type, I want to select the count only on the latest date found in the table.

Is there an easy way to do this?

I'm thinking of something different to get a specific item IDID, but I'm stuck there.

  to calculate from item id, (select date, item id, calculation, R Rank () (Table by R Rank) (Order IDID, Item IDID, Date Disclosure), where R = 1  

Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -