DROP VIEW IF EXISTS team_amount_historical_project_list_view;
CREATE VIEW team_amount_historical_project_list_view (
 historical_offer_id,
 total_project_amount
) as 
SELECT
            historical_offer_id,
            COALESCE(SUM(gross_amount), 0) AS total_project_amount
        FROM
            historcial_offer_partitipants
        GROUP BY
            historical_offer_id;