SQLTeam.com | Weblogs | Forums

Select Max Date from these temp table

tsql
sql2008
sql2008r2

#1

Select Max Date from this below temp table.

SELECT ORDER_DETAIL_MARKET_CODE, NEW_OPER, MAX(ACTIVITY_DATE)
from #final
GROUP BY ORDER_DETAIL_MARKET_CODE, NEW_OPER
ORDER BY ORDER_DETAIL_MARKET_CODE


#2

What's the problem?


#3

I got it. I am just trying to get max date for each user.