Results 1 to 3 of 3
  1. #1
    AccessSHELL is offline Advanced Beginner
    Windows 10 Access 2003
    Join Date
    Jul 2020
    Location
    U.S.
    Posts
    58

    Question Getting DISTINCT and COUNT

    I have an Access DB with a table containing 3 columns.
    COL 1: Date
    COL 2. ArticleTitle
    COL 3. CategoryTitle

    I am only interested in the CategoryTitle for this query



    As an example, I can have several CategoryTitle s with many Duplicates.

    I need a query that gives me the DISTINCT CategoryTitles and the count per title.

    Is this possible with one query. If not, then that's why I am having difficulty writing it.

    If, yes, then can you hep mewrite the query?

    Thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    On first read, looks like a simple aggregate query.
    SELECT CategoryTitle, Count(*) AS Cnt FROM table GROUP BY CategoryTitle;

    If that doesn't produce what you want, then perhaps provide some sample data and desired output. Use the table builder on the Advanced post editor or copy/paste from Access table.
    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
    AccessSHELL is offline Advanced Beginner
    Windows 10 Access 2003
    Join Date
    Jul 2020
    Location
    U.S.
    Posts
    58
    This is exactly what I need.
    Thank you June7

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

Similar Threads

  1. One query to count AND count distinct
    By jbuckner72 in forum Queries
    Replies: 5
    Last Post: 05-18-2021, 01:43 PM
  2. Replies: 0
    Last Post: 02-11-2020, 08:12 PM
  3. Replies: 4
    Last Post: 01-15-2019, 11:50 AM
  4. Distinct Count
    By ertweety in forum Queries
    Replies: 1
    Last Post: 04-15-2014, 10:10 AM
  5. Count Distinct
    By Newbie11 in forum Reports
    Replies: 8
    Last Post: 01-09-2013, 12:47 PM

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