Queries -- duplicates

I am new to Raisers edge NXT. and running a query but the result has MANY duplicates. I am creating an email list with criteria below. Not sure if it is how I enter the criteria, or the output. Any insight on how to eliminate duplicates in query or do I need to export to excel. Here is info and results. Appreciate any help and insight.

c230a6a97752468c6e4a50626eda4b02-huge-qu
f24e510d311f3105aeb6646bb7c606d1-huge-qu

f5de0618efa2bf73beb2a199aadbaea8-huge-qu

Comments

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary Kudos 5 Facilitator 3 bbcon 2025 Attendee Badge

    @Karen Nitschman
    Query in webview works the same way as Query in database view. RE has data stored in database tables and in order to produce queried data, “SQL JOIN" has to be done, which is part of reason why Query is harder to use as it does produce duplicates. This is not a CON, this is both good and bad depending on your usecase. Knowing how to handle dup will level you up as a DBM for your org.

    In your screenshot, I can see that you are filtering and outputing various “1 to many” relationship, which is the cause of your dups. (1 constituent has many constituent code; 1 constituent has many “phone”; 1 constituent “can” have many solicit code).

    Your criteira use of AND and OR and paranthesis is also messy, which is likely causing you to have wrong results too.

    So first question is, if you intending this list to be used in email list, are you expecting to email ONE “good” and “sendable” email per constituent or do you want to send to all “good” and “sendable” emails of a constituent.

  • @Alex Wong

    Thanks so much Alex!

    We need to send our mailing to one primary home email (indicated with star and labeled primary), which is indicated on donor record .

    • I added primary phone type as email home but all home emails are pulling and indicating as primary and thus creating duplicate records.
    • Please advise on best way to set up criteria, and use of ( ), and AND/OR.
    • See new screenshots below

    I appreciate all your insight and help. Thanks – Karen

    770a0f9a00e9710d450e56c1bffac3ff-huge-qu
    0aa552781a3425fb219fa51a040f452b-huge-qu
    7b49c633db1ce8c516e55dcadc0e4a32-huge-qu
    4089ddb6f08162dc49421f043d80079a-huge-qu
  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary Kudos 5 Facilitator 3 bbcon 2025 Attendee Badge

    @Karen Nitschman
    Your criteria is good.

    your output is not. Don't output “Home Email Number”, output Phone Number, without expanding the “Specific Phone” section.