Including Fields in GROUP BY or ORDER BY Clauses

When you need to group resulting data, you must specify the field you want to group on in GROUP BY clause. When you want to sort data by a field, you must include the field in ORDER BY list. In dbForge Fusion, the interface for this clauses is approximately the same. The only difference is that ORDER BY tab has the Change Order button that you can use to alter sorting direction.

Including Fields in ORDER BY Clause

To include fields in ORDER BY clause, switch to the corresponding tab of the tabbed editor and perform the following steps:

  1. Select the field you want to perform grouping/ordering on and click the right arrow button.
  2. Repeat this operation for every field that should be added to the clause.
  3. Use the up arrow and down arrow buttons to change the order of columns.
  4. If you want to exclude a field from the list, select it and click the left arrow button.
  5. For ordering lists, select a field and click the Change Order button to alter the sorting order.

ORDER BY tab