|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
sql query string help?
Dear friends...
I need a sql query string,.... I have database with names as follows.. ABC ABC DEF FRG FRG FRG FRG DEF ABC Now i need a sql query string to show the data by following way. FRG 4 ABC 3 DEF 2 please help regards Ananda |
|
#2
|
||||
|
||||
|
do this
Code:
SELECT name, Count(name) as 'Count' FROM TableName GROUP BY name ORDER BY 'Count' DESC |
|
#3
|
|||
|
|||
|
dear sir:
Thank you for your help. I got the answer but it is not in desending order.. ABC 3 DEF 2 FRG 4 Please help regards Ananda |
|
#4
|
|||
|
|||
|
Thank you it is working now
instead of ORDER by 'Count' DESC i changed this to ORDER BY count(name) DESC Thank you Website design ecommerce and data entry |
|
#5
|
|||
|
|||
|
need more help sql?
Dear friends
thanks for solving my problem . I need a query to show the result as follow table has two fields user Name A ABC B DEF B DEF A ABC C ABC Now i want sql query to generate following out put ABC 2 DEF 1 I hope you people understand what i need, expecting for your kind help regards Nepala |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > sql query string help? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|