SELECT c.id, c.title, c.level_category_id AS levelCategoryId, lc.name AS levelName, c.difficulty_category_id AS difficultyCategoryId, dc.name AS difficultyName, c.expert_id AS expertId, e.name AS expertName, e.avatar AS expertAvatar, c.sale_price AS salePrice, c.summary, c.target_users AS targetUsers, c.cover_img AS coverImg, c.banner_imgs AS bannerImgs, c.content, c.base_sales_count AS baseSalesCount, c.real_sales_count AS realSalesCount, c.learn_user_count AS learnUserCount, c.studying_count AS studyingCount, c.favorite_count AS favoriteCount, c.total_duration_seconds AS totalDurationSeconds, c.video_count AS videoCount, c.status, c.is_home_recommend AS isHomeRecommend, c.sort, c.created_at AS createdAt, c.updated_at AS updatedAt FROM tcm_health_course c LEFT JOIN tcm_live_course_category lc ON lc.id = c.level_category_id AND lc.deleted = 0 LEFT JOIN tcm_live_course_category dc ON dc.id = c.difficulty_category_id AND dc.deleted = 0 LEFT JOIN tcm_expert e ON e.id = c.expert_id AND e.deleted = 0 WHERE c.deleted = 0