CREATE VIEW rating_user_translator_view (
    totalRateTranslator,
    totalArticleScoringTranslator,
    id
) as
SELECT
    (
        COALESCE(puntuality_rate.rate, 0) + COALESCE(attitude_rate.rate, 0) + COALESCE(quality_rate.rate, 0)
    ) AS `totalRateTranslator`,
    (
        select
            count(*)
        from
            scoring as sc
        where
            sc.user_id = userInfo.id
            and sc.participant_type = 4
            and sc.scoring_type = 1
            and sc.scoring > 0
    ) AS `totalArticleScoringTranslator`,
    `userInfo`.`id`
FROM
    `translators_view`
    LEFT JOIN `user` `userInfo` ON `translators_view`.`user_id` = `userInfo`.`id`
    LEFT JOIN `scoring_puntuality_rate_view` `puntuality_rate` ON (
        `translators_view`.`user_id` = `puntuality_rate`.`user_id`
    )
    AND (`puntuality_rate`.`participant_type` = 4)
    LEFT JOIN `scoring_attitude_rate_view` `attitude_rate` ON (
        `translators_view`.`user_id` = `attitude_rate`.`user_id`
    )
    AND (`attitude_rate`.`participant_type` = 4)
    LEFT JOIN `scoring_quality_rate_view` `quality_rate` ON (
        `translators_view`.`user_id` = `quality_rate`.`user_id`
    )
    AND (`quality_rate`.`participant_type` = 4)
GROUP BY
    `translators_view`.`id`