Salesforce SOQL · NPSP Data Model · Fundraising Analytics

SOQL Query Workbench — NPSP Edition

A library of the queries a nonprofit data analyst actually runs — giving roll-ups, soft credit recognition, and donor lapse reporting (LYBUNT/SYBUNT) — written in real SOQL syntax against NPSP objects and executed live against an in-browser sample dataset.

SIMULATION — real SOQL syntax; execution modeled in JavaScript against sample data, not a live org. "This year" = FY2026.
SOQL
Select a query from the library.

Results
Run a query to see results.

Why these queries

LYBUNT (Last Year But Unfortunately Not This) and SYBUNT (Some Year But Unfortunately Not This) are the two donor-retention reports every fundraising operation runs — they identify lapsed donors before they're lost for good. The household roll-up and soft credit queries reflect NPSP's core architecture: gifts entered on Opportunities, attributed via hard credit to the donor of record, recognized via soft credit across the household.

The SOQL here uses real NPSP object and field names (npo02__OppAmountLastYear__c, npe01__OneToOne contacts excluded, OpportunityContactRole for soft credits). The execution layer is JavaScript over authored sample data — the point is demonstrating that the query logic, the object model, and the fundraising vocabulary are understood, in a form anyone can verify in a browser.