
CREATE VIEW all_authors_view (id, user_id, first_name, gender, birth_date, birth_country_id, city,edu_level_id, specialization_id, price_word, cv, payment_method, user_status, test_id) as
SELECT  t1.id,
        t1.user_id,
        CONCAT(t1.first_name, ' ', t1.last_name) as 'first_last_name',
        t1.gender,
        t1.birth_date,
        t1.birth_country_id,
        t1.city,
        t1.edu_level_id,
        t1.specialization_id,
        t1.price_word,
        t1.cv,
        t1.payment_method,
        t2.status as 'user_status',
        t3.id

  FROM 	`authors` as t1


  JOIN `user`     as t2 on t2.id = t1.user_id
  LEFT join `tests` as t3 on t3.author_id = t1.id
;