Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2003
    Posts
    6

    Unanswered: Count and display duplicates

    Hi folks,
    I have a table that contains a series of numeric values, e.g.
    256
    754
    742
    843
    256

    what I am attempting to do is to run a query that displays the instances of each value. For example and using the above values:

    256 2
    754 1
    742 1
    843 1

    Any thoughts?

    many thanks and muchly appreciated!

  2. #2
    Join Date
    Nov 2003
    Location
    Makati City, Philippines
    Posts
    14

    Re: Count and display duplicates

    hi there, i've created a table named "Table1" which contains "Values" field and wrote the sample data you have below. afterwards, i went to the query and created a new one using qbe (query by example) window but i cannot show it to you. instead try to swith to SQL screen from your qbe and type this. then you can switch back to qbe window to see what i mean.

    SELECT Table1.Values, Count(Table1.Values) AS CountOfValues
    FROM Table1
    GROUP BY Table1.Values;

    hope this one would help you a lot.

    cheers,
    ReggieSter


    Originally posted by Glimmer
    Hi folks,
    I have a table that contains a series of numeric values, e.g.
    256
    754
    742
    843
    256

    what I am attempting to do is to run a query that displays the instances of each value. For example and using the above values:

    256 2
    754 1
    742 1
    843 1

    Any thoughts?

    many thanks and muchly appreciated!

  3. #3
    Join Date
    Aug 2003
    Posts
    6
    Hi ReggieSter,
    many thanks indeed!!
    best wishes,
    Glimmer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •