DROP VIEW IF EXISTS all_authors_all_view;
CREATE VIEW all_authors_all_view(
    id,
    user_id,
    first_name,
    author_status,
    nativeLanguage,
    dateStart,
    email
) as
SELECT
    all_authors_view.id as id,
    all_authors_view.user_id as user_id,
    all_authors_view.first_name as first_name,
    all_authors_view.author_status as author_status,
    languages.language AS nativeLanguage,
    userInfo.created_at AS dateStart,
    userInfo.email AS email
FROM
    all_authors_view
LEFT JOIN countries ON all_authors_view.birth_country_id = countries.id
LEFT JOIN user userInfo ON
    all_authors_view.user_id = userInfo.id
LEFT JOIN user_lang ON userInfo.id = user_lang.user_id
LEFT JOIN languages ON user_lang.lang_id = languages.id
LEFT JOIN author_experience ON all_authors_view.id = author_experience.author_id
LEFT JOIN experience ON author_experience.experience_id = experience.id
LEFT JOIN tests ON all_authors_view.id = tests.author_id
LEFT JOIN user ON tests.checking_user_id = user.id
LEFT JOIN editors ON user.id = editors.user_id
LEFT JOIN authors authorInfo ON
    all_authors_view.id = authorInfo.id
GROUP BY
    id,
    authorInfo.id;