I know SQL server does not allow ORDER BY in subqueries, just trying to think if there is another way around this where I can get my data ordered in the derived table in a desc manner.
Here is my derived table query
select count(flag),key1,createdate
from
mytable
where createdate> β2012-01-01β
group by key1,createdate
order by createdate desc
Some folks mentioned to use rank over partition by but not sure how this will re-arrange or order by data
monty4u (BOB member since 2006-12-12)