grouping a field in a query

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • vito

    grouping a field in a query

    I need help anybody knows how to group a query so I can get a count of
    all the same record in a field like a subtotal in excel.

  • Tom van Stiphout

    #2
    Re: grouping a field in a query

    On 2 Mar 2006 18:50:56 -0800, "vito" <victorresa@hot mail.com> wrote:

    The "GROUP BY" clause was invented for that purpose. Look it up in the
    Help file.

    -Tom.

    [color=blue]
    >I need help anybody knows how to group a query so I can get a count of
    >all the same record in a field like a subtotal in excel.[/color]

    Comment

    • Hansen

      #3
      Re: grouping a field in a query

      You can use COUNT(*) with a GROUP BY to count them number of records
      accourding to your grouping.
      You will have to use SUM(fieldname) as (sumname) to add values of a
      field together of the selected records.
      Open Help and type SELECT and the choose SELECT statement for examples.

      Comment

      Working...