Begin your query:
  1. Navigate to Analysis, then click on Information Library
  2. Click Add ad-hoc query
  3. Select the source view of Memberships and click OK

Add fields to Include records where:
  1. In the left column, select Memberships. From the middle column, drag Status to Include Records where. Set Status equal to Active.
  2. To limit this to a specific membership program: From the sale middle column, drag Membership program into Include Records where. Set Equal to your membership program.

Add fields to Results fields to display:
  1. In the left column, expand Members, expand Constituent, then select Address (Primary). From the middle column, drag ZIP into Results fields to display
  2. From the middle column, drag ZIP to Results fields to display a second time.
  3. Within Results fields to display, select the second ZIP line item, then click the Sigma button above Results fields to display, and select COUNT
  4. Within Results fields to display, select the Membership ID field and mark the red X to Delete

Save your query:
  1. Click the Set save options tab
  2. Name your query
  3. Save and Close

Your final query should look similar to below:
Active memberships by zip code query

If you would prefer a count of members instead of memberships, refer to this solution Need to report on active members by zip code.