Specify sorting for the rows

Note

Now you specify sorting for the rows. When you specify sorting, you also enable grouping. Before you can define a group, the rows have to be sorted so that the data can be grouped.

  1. Click the Sort tab at the bottom of the workspace.

    The Sort tab comes to the front. In the Sort tab, you specify one or more columns to use for sorting the rows.

    Shown is the Sort tab at the bottom of the workspace with a list of columns on the left with entries such as " fin _ data " dot " year " and " fin _ code " dot " description ".
  2. Scroll the list as needed to drag and drop column names.

    Drag and drop "fin_data"."year" from the left box to the right box.

    Drag and drop "fin_code"."description" from the left box to the right box.

    Drag and drop "fin_data"."quarter" from the left box to the right box.

    In all cases Ascending is what you want. Ascending means years and quarters are ordered by increasing values and descriptions are alphabetized from A to Z.

    Shown is the Sort tab at the bottom of the workspace with a list of columns on the left with entries such as " fin _ data " dot " year " and " fin _ code " dot " description ". On the right is a list of three columns that were selected. Each has a selected check box for Ascending order next to it.
  3. Select Design>Preview from the menu bar.

    Use the scroll bar to view the data.

    First the rows are sorted by year. All the 2003 information is first. Then they are sorted by description so that expenses of the same category are together. Finally the rows are sorted by quarter so that the data is always time-sequenced.

    Shown is the Sequel Preview screen with the rows of data sorted by Year, with all the visible entries showing 1995, then alphabetically by Description, with a group of entries for Administration followed by a group of Fees entries and then R and D entries. Within each group formed by Description, the entries are further sorted by quarters 1 through 4.
  4. Select File>Close from the menu bar.

    You return to the workspace.

  5. Select File>Close from the menu bar.

    If prompted to save changes, click Yes.

    The Query painter closes.