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/7/2026

If you need to compare your practice's production between two different years to identify growth trends, this query provides a clear, side-by-side breakdown. It is designed for office managers and practice owners who need to see total completed production for specific date ranges without manually running multiple standard reports.

The Query

Copy and paste the following code into the User Query window. You can adjust the date variables at the top to match the specific years you wish to compare.

/* Year-over-Year Production Comparison */
/* Set your date ranges below */
SET @Year1_Start = '2024-01-01';
SET @Year1_End = '2024-12-31';
SET @Year2_Start = '2025-01-01';
SET @Year2_End = '2025-12-31';

SELECT 
    'Year 1' AS Period,
    SUM(ProcFee * UnitQty) AS TotalProduction
FROM procedurelog
WHERE ProcStatus = 2 
AND ProcDate BETWEEN @Year1_Start AND @Year1_End

UNION ALL

SELECT 
    'Year 2' AS Period,
    SUM(ProcFee * UnitQty) AS TotalProduction
FROM procedurelog
WHERE ProcStatus = 2 
AND ProcDate BETWEEN @Year2_Start AND @Year2_End;

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.

Understanding the Results

How to Customize

You can easily modify this query to look at different timeframes or filter by specific criteria.

Variations

If you want to see a month-by-month breakdown instead of a total annual sum, you can use a variation that groups the data by month:

/* Monthly Production Comparison */
SELECT 
    MONTH(ProcDate) AS MonthNum,
    SUM(CASE WHEN ProcDate BETWEEN '2024-01-01' AND '2024-12-31' THEN ProcFee * UnitQty ELSE 0 END) AS '2024_Prod',
    SUM(CASE WHEN ProcDate BETWEEN '2025-01-01' AND '2025-12-31' THEN ProcFee * UnitQty ELSE 0 END) AS '2025_Prod'
FROM procedurelog
WHERE ProcStatus = 2
GROUP BY MONTH(ProcDate)
ORDER BY MonthNum;

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.