Skip to content
Advertisement

Removing count column from query output

Bsically, I’m trying to get the top 5 most rented but don’t want the actual count column as output only as a means of ordering the output. Is this possible?

Advertisement

Answer

You can try remove the count column and give the formula to order by part:

My test:

Select for MS SQL Server 2017:

Output:

col1
A
B
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement