DROP VIEW IF EXISTS copy_space_historical_project_list_view;
CREATE VIEW copy_space_historical_project_list_view (
 historical_project_id,
 copyscape_cost_project
) as
 SELECT
        historical_topics.historical_project_id,
        ROUND(
                SUM(
                    historical_articles.copyscape_cost_project
                ),
            2
        ) AS copyscape_cost_project
    FROM
        historical_topics
    INNER JOIN historical_offer_participant_deliveries ON historical_offer_participant_deliveries.historical_topic_id = historical_topics.id
    INNER JOIN historical_articles ON historical_articles.historical_offer_participant_delivery_id = historical_offer_participant_deliveries.id
    GROUP BY
        historical_topics.historical_project_id;