|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
I need To Sorting the Records by Countign in Group
i am execute like this code Code:
select name , count(*) as Total from [Table] Group By Name records will display Quote:
But I need Sorting this record by "TOTAL" i tried this code Code:
select name , count(*) as Total from [Table] Group By Name Order By Total but not word please help me to Find good code to executing I need This Surface Quote:
Thanks Alot |
|
#2
|
||||
|
||||
|
Try
Code:
SELECT Name, COUNT(*) As Total FROM TableName GROUP BY Name ORDER BY Total DESC |
|
#3
|
|||
|
|||
|
thank you
Thats work ![]() |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > Gruop By And Sorting Records.. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|