Results 1 to 2 of 2

Thread: MS ACCESS FOR DUMMIES

  1. #1

    Thread Starter
    Addicted Member JasonGS's Avatar
    Join Date
    May 2000
    Location
    California
    Posts
    155
    I feel like a complete retard, but I need help with this SQL statment ASAP...

    I want to show all of the zip codes in a table DISTINCT(zipcode) and then how many occurrances of each zip code exist in that table. Can someone who is a SQL gangster pls help me!

    This query is for MS Access 2000, so Access friendly SQL would be appreciated.

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    here is the SQL statement straight out of Access (using the Biblio.mdb that ships with VB)
    Code:
    SELECT Publishers.Zip, Count(Publishers.Zip) AS CountOfZip
    FROM Publishers
    GROUP BY Publishers.Zip;
    You can right click in the Query creation table and select Totals change the one you want to count to 'count' and the rest to 'group by' if you want to show the zip and the count then make to spots for zip one with count one with group by.

    KEY info if other info is in the query (like Customer name) that shares the zip but not the other info it will NOT be counted as the same zip.

    That should give you some direction.

Posting Permissions

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



Click Here to Expand Forum to Full Width