opendentalsupport.com is an independent community resource. We are NOT affiliated with, endorsed by, or sponsored by Open Dental Software, Inc. Open Dental® is a registered trademark of Open Dental Software, Inc.

Year-over-Year Production Query

SQL Queries3 min read4/1/2026

If you need to see exactly how your practice's monthly production compares to the same period from the previous year, this query provides a clean, side-by-side view. It is perfect for practice owners and office managers who want to track growth trends without manually running multiple standard reports.

The Query

Copy and paste the following code into your User Query window. This query calculates the total completed production for two specific years.

/* Year-over-Year Production Comparison */
SET @Year1 = '2024';
SET @Year2 = '2025';

SELECT 
    MONTHNAME(ProcDate) AS 'Month',
    SUM(CASE WHEN YEAR(ProcDate) = @Year1 THEN ProcFee * UnitQty ELSE 0 END) AS 'Year1_Prod',
    SUM(CASE WHEN YEAR(ProcDate) = @Year2 THEN ProcFee * UnitQty ELSE 0 END) AS 'Year2_Prod'
FROM procedurelog
WHERE ProcStatus = 2
AND YEAR(ProcDate) IN (@Year1, @Year2)
GROUP BY MONTH(ProcDate)
ORDER BY MONTH(ProcDate);

How to Run This Query

  1. In Open Dental, go to Reports in the Main Menu.
  2. Click User Query.
  3. Paste the query provided above into the large text box.
  4. Click Submit Query.
  5. The results will display in the grid below the text box.

Understanding the Results

How to Customize

You can easily modify this report to fit your specific needs by changing the values in the first two lines of the query:

Variations

If you want to see Net Production (which subtracts insurance write-offs) instead of Gross Production, you would need to join the claimproc table to subtract the WriteOff amounts. Because this requires more complex joins, we recommend using the standard Production and Income report in the Reports > Standard menu for net figures, as it handles these calculations automatically.

Skip the Query — Use DentalCanvas Instead

Don't want to write SQL? DentalCanvas connects to your Open Dental database and shows you this data automatically in a visual dashboard — no queries required.


This article is provided by opendentalsupport.com, an independent community resource. We are not affiliated with Open Dental Software, Inc.

Stop Writing SQL.

DentalCanvas connects directly to your Open Dental database and shows you production, collections, scheduling, and more — in a visual dashboard you can understand at a glance. No queries. No exports. Just answers.

Try DentalCanvas

Was this article helpful?

Related Articles

opendentalsupport.com is an independent community resource. We are NOT affiliated with, endorsed by, or sponsored by Open Dental Software, Inc. Open Dental® is a registered trademark of Open Dental Software, Inc.