In Ad-hoc Query, previewed results do not match COUNT

When Ad-Hoc query results are previewed, the Results state there are a certain number of records.  But when the output is changed to COUNT(Lookup ID), the results are much higher.
Query only looks at the raw data. For this reason, the Preview function shouldn't be used to estimate a COUNT, especially when there is a one-to-many field in the database. Instead, use an SSRS report with a DISTINCT count to get the accurate number of records.

Steps to Duplicate

1) Set up a Constituent Ad-Hoc query with Attributes in the criteria
2) Output Lookup ID, and set ‘suppress duplicate rows’ 
3) Click Preview, take note of the number of results.
4) Change the output to COUNT (Lookup ID), and notice that this value is much higher.


 Blackbaud CRM

Was this article helpful?