How to group rows (Enterprise Manager)

To group rows

  1. Start the query by adding the table you want to summarize to the Diagram pane.
  2. Right-click anywhere in the Diagram, Grid, or SQL panes, and choose Group By. The Query Designer adds a Group By column to the grid in the Grid pane.
  3. Add the column you want to group to the Grid pane. If you want the column to appear in the query output, be sure that the column is marked for output.

    The Query Designer adds a GROUP BY clause to the statement in the SQL pane.

  4. Add the column you want to summarize to the Grid pane. Be sure that the column is marked for output.
  5. In the Group By grid column for the summary data column, select the aggregate function that you want to use to summarize the data.

    The Query Designer automatically assigns a column alias to the column you are summarizing to create a useful column heading in query output. For more details, see Creating Column Aliases.

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.