How to do Order By in Sub Query
Hi,
Can any one please help me with sorting with sub query, i have a query something like the following.
Select a, b, c, (Select Count(b) From MyTable Where c=a as MyCount) From TableName
Now as you can see i have a count field called MyCount which is the result of a subquery, the thing i want to know is how would i use order by stement on that count field.
I tried [Select a, b, c, (Select Count(b) From MyTable Where c=a as MyCount) From TableName Order By MyCount] but it doesnt work.
Any ideas would be appriciated.
Thanks
Danial