• SELECT SUM(Boiler1)

    FROM Energy_Centre_Availability eca

    INNER JOIN Energy_Centre_Boiler_Maintenance_Schedule s

    ON eca.t_stamp > s.startDate

    AND eca.t_stamp < s.endDate

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden