CREATE VIEW rating_user_reviser_view (
    reviserTotalRate,
    reviserTotalArticleScoring,
    id
) as
SELECT
    (
        COALESCE(reviser_puntuality_rate.rate, 0) + COALESCE(reviser_attitude_rate.rate, 0) + COALESCE(reviser_quality_rate.rate, 0)
    ) as reviserTotalRate,
    (
        select
            count(*)
        from
            scoring as sc
        where
            sc.user_id = user.id
            and sc.participant_type = 6
            and sc.scoring_type = 1
            and sc.scoring > 0
    ) AS `reviserTotalArticleScoring`,
    `user`.`id`
FROM
    `user`
    LEFT JOIN `scoring_puntuality_rate_view` `reviser_puntuality_rate` ON (
        `user`.`id` = `reviser_puntuality_rate`.`user_id`
    )
    AND (`reviser_puntuality_rate`.`participant_type` = 6)
    LEFT JOIN `scoring_attitude_rate_view` `reviser_attitude_rate` ON (`user`.`id` = `reviser_attitude_rate`.`user_id`)
    AND (`reviser_attitude_rate`.`participant_type` = 6)
    LEFT JOIN `scoring_quality_rate_view` `reviser_quality_rate` ON (`user`.`id` = `reviser_quality_rate`.`user_id`)
    AND (`reviser_quality_rate`.`participant_type` = 6)