1. First, we will query on all accounts with a corporate UDF :
  2. Click Queries
  3. Click Manage Queries
  4. Select a category that you want to store this query in (Ex: Base)
  5. Click New Query under the tasks menu
  6. Name the query
  7. Set the Starting Query to Base/All Constituents
  8. Under Results, select the Data Return Type you'd like to use; for more information about Data Return Types, please see Which Data Return Type should I use?
  9. Under Criteria Options mark Match Each Criteria if you'd like the results to match all of the User Defined Field values or Match At Least One criteria if you'd like the results to match one of the User Defined Field values
  10. Under Browse Fields select UDFs – (the Field Application of the UDF) from the drop down menu and click on the name of the field
  11. For example, if your User Defined Field is stored on the Defined Fields page of a Constituent's account, you'll select UDFs- Constituent
  12. Select the value(s) of interest
  13. Check Field Has Any Value
  14. Click Save and View Queries

Next, we will create a compound query to subtract out all of the accounts with corporate (the query created above) from all constituent accounts in your database:
  1. Click New Compound Query under the tasks menu
  2. Name the query 
  3. Set the Data Return Type to Accounts
  4. Select the Subtract icon under Combine the Queries
  5. For Query 1 select Category: Base and Query: All Constituents
  6. For Query 2 select the query we created above
  7. Click Save And Preview