Skip to main content

Run SOQL Queries Against Any Connected Org

A library of pre-built audit and analysis queries — organized by use case — plus a visual and manual editor for writing your own. No Workbench or Salesforce Inspector required.

Written by Pablo Gonzalez

The Query Library gives you a fast way to pull data from any connected org. Whether you're running a standard audit query or writing something specific for a client engagement, everything runs directly from dx0 without needing to authenticate separately in another tool.


Template library

The Library tab is the fastest starting point. Queries are organized into four groups:

Access & Security — Users, login history, permission set assignments, and dangerous permissions (Modify All Data, View All Data). Use these during security reviews or when scoping an access model cleanup.

Data Hygiene — Duplicate contacts, leads, and accounts; contacts missing email; opportunities missing close date or amount. Use these to quantify data quality problems before a data project or migration.

Data Model — Custom picklist fields, picklist values by object, record types across all objects. Use these to understand how the org's reference data is structured and spot field bloat or inactive configuration.

Technical Health — Objects with multiple Apex triggers. Requires Tooling API access (shown with an amber badge). Use these when assessing technical debt or scoping a code consolidation effort.

Each template includes a What to look for section — specific guidance on what the results actually mean and what thresholds are worth flagging. This is the most useful part if you're producing findings for a client.

To run a template: select it from the sidebar, review the query and the "What to look for" guidance, then click Open in Editor to run it against the connected org. You can also copy the raw SOQL from the query block if you need it in another tool.


Visual Editor

The Visual Editor tab lets you build a query by selecting an object, choosing fields, and adding filters — without writing SOQL directly. Use this when you need a quick, one-off query and don't want to write it by hand, or when someone on the engagement who isn't a developer needs to pull data.


Manual Editor

The Manual Editor tab is a SOQL editor compatible with Salesforce Inspector's query format. Paste a query directly, toggle Tooling API on or off, and run it. Results appear in a table below. Use this for anything the templates don't cover or when you need to iterate quickly on a query you've already started.

Selecting a template from the Library automatically loads it into the Manual Editor, so the common workflow is: find the right template, open it in the editor, tweak it for the specific org, and run it.


Practical scenarios

License audit. Run "All Active Users" and "Users Never Logged In" together. Cross-reference the stale last-login dates with license types to build the case for deactivations and license reclamation.

Pre-migration data quality baseline. Run the Data Hygiene templates before starting a data migration project. The duplicate and completeness counts give you a baseline to include in scope documentation and set client expectations.

Security findings. Run "Modify All Data / View All Data" and "Permission Set Assignments" during a security review. Any non-admin profile or permission set in the first query is an immediate finding.

Custom analysis. A client wants to know which products are driving Closed Won revenue by year. Paste the "Most Requested Products" query into the Manual Editor, adjust the date range filter, and run it directly against their org.

Did this answer your question?