CREATE VIEW v_expert_questions AS 
SELECT et.*, (SELECT COUNT(*) FROM thematic_questions tq WHERE tq.answered = 0 AND tq.expert_id = et.expert_id) AS total_questions,
u.id AS user_id, u.name, u.email, u.notifications, u.status AS user_status 
FROM expert_thematic et 
LEFT JOIN users u ON u.id = et.expert_id 
WHERE et.status = 1;