When you right-click a table or multiple selected tables in Database Explorer and select Select All Rows, the data is returned unsorted by default. If you run a custom SELECT query, the data is sorted only if the query includes a sorting clause, such as ORDER BY.
dbForge Studio for SQL Server lets you sort and group data directly in Data Editor.
To sort data in the grid, use one of the following ways:
The sort glyph appears on the column header, indicating that this column is sorted in
ascending or
descending order.
To assign a secondary sorting, hold down Shift and select another column header.
You can set as many sorting columns as you need.
To remove sorting from a specific column, hold down Ctrl and select the column.
To remove sorting from the selected column, right-click the column header and select Clear Sorting.
If the column is not sorted, the sort glyph is hidden.

To group data by column, use one of the following ways:
Right-click the column header you want to group data by and select Group By This Column.
The data is displayed in groups marked with collapsed nodes. The column header is moved to the Group by Box pane.
On the Data Editor toolbar, click
, then drag the column header you want to group data by to the Group by Box pane.
To group data by multiple columns:

To expand the groups, click the
expanded group icon.
To collapse the groups, click the
collapsed group icon.

To expand or collapse all groups, right-click the Group by Box pane and select Full Expand or Full Collapse.
To sort grouped data, use one of the following ways:
To cancel grouping by column, use one of the following ways:
To remove all groupings, right-click the Group by Box pane and select Clear Grouping.
Note
Data sorting and filtering can be performed either on the client or the server side.
To remove the Group by Box pane, right-click it and select Hide Group By Box.