Results 1 to 3 of 3
  1. #1
    Muldoon is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2012
    Posts
    5

    Showing number of duplicates along with single instances

    I'm trying to make a very simple database for baseball / sports cards. In some of cases I have only a single card while other times I have duplicate cards. Below is a partial list of some of the cards:

    Card Year Brand Sport
    1 1982 Topps Baseball
    2 1982 Topps Baseball
    3 1982 Topps Baseball
    4 1982 Topps Baseball
    5 1982 Topps Baseball
    6 1982 Topps Baseball
    6 1982 Topps Baseball
    7 1982 Topps Baseball
    8 1982 Topps Baseball
    9 1982 Topps Baseball
    10 1982 Topps Baseball
    10 1982 Topps Baseball
    11 1982 Topps Baseball
    11 1982 Topps Baseball
    11 1982 Topps Baseball

    I know how to create a Duplicate Query, but the output only shows the card if there are duplicates and does not include single instances.
    Card Field NumberOfDups Year Field Brand Field Sport Field
    6 2 1982 Topps Baseball
    10 2 1982 Topps Baseball
    11 3 1982 Topps Baseball



    What I would like is a query that will add all of the duplicate cards together to get a single total; something like the following:
    Card Total Number Year Brand Sport
    1 1 1982 Topps Baseball
    2 1 1982 Topps Baseball
    3 1 1982 Topps Baseball
    4 1 1982 Topps Baseball
    5 1 1982 Topps Baseball
    6 2 1982 Topps Baseball
    7 1 1982 Topps Baseball
    8 1 1982 Topps Baseball
    9 1 1982 Topps Baseball
    10 2 1982 Topps Baseball
    11 3 1982 Topps Baseball

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Don't really understand the Duplicates query. A simple aggregate GROUP BY (Totals) query should show even singles.

    SELECT Card, [Year], Brand, Sport, Count(Card) As CardCount FROM tablename GROUP BY Card, [Year], Brand, Sport;
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Muldoon is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2012
    Posts
    5
    Thanks. That is exactly what I needed!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Counting Instances of a Number
    By SealM in forum Queries
    Replies: 9
    Last Post: 02-04-2013, 09:35 AM
  2. Counting number of instances by time of day
    By Abarency in forum Queries
    Replies: 1
    Last Post: 11-11-2012, 04:53 PM
  3. Replies: 3
    Last Post: 10-17-2012, 03:16 PM
  4. not showing duplicates
    By YStein142 in forum Reports
    Replies: 1
    Last Post: 06-28-2012, 05:52 PM
  5. Showing Duplicates in table
    By ericfatherree in forum Access
    Replies: 3
    Last Post: 02-06-2012, 07:58 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums