• You may try to use WITH ROLLUP option in your query.

    It won't remove all the rows with CompanyID's from the final recordset, but will add 2 records to it"

    YEAR CompanyID TotalSales

    2019 NULL 21932.360

    2020 NULL 46448.040

    _____________
    Code for TallyGenerator