SELECT A.*,B.CourseName,B.CourseFeature,D.TeacherName,IFNULL(D.TeacherHead,'') AS TeacherHead,E.SName AS SchoolName,R.RoomName
,IFNULL(t.GuestNum,0) AS OrderStudentCount,IFNULL(B.SellPrice,0) AS CourseSellPrice,B.SellPriceType as CourseSellPriceType,IFNULL(B.OriginalPrice,0) AS CourseOriginalPrice ,B.B2CRatio,B.B2CReNewRatio,B.B2BRebateRatio,B.B2BReNewRatio,B.SchoolRebateRatio,B.SchoolReNewRatio
,IFNULL(t.GuestNum,0) AS OrderStudentCount,IFNULL(B.SellPrice,0) AS CourseSellPrice,IFNULL(B.CoursewareFee,0) AS CoursewareFee,IFNULL(B.TextbookFee,0) AS TextbookFee,B.SellPriceType as CourseSellPriceType,IFNULL(B.OriginalPrice,0) AS CourseOriginalPrice ,B.B2CRatio,B.B2CReNewRatio,B.B2BRebateRatio,B.B2BReNewRatio,B.SchoolRebateRatio,B.SchoolReNewRatio
,B.CourseSubject,IFNULL(csubject.SubjectName,'') AS CourseSubjectName
FROM rb_class AS A LEFT JOIN rb_course AS B ON A.CouseId=B.CourseId
SELECT A.* ,IFNULL(B.CourseName,'') AS CourseName,IFNULL(B.ClassHours,0) AS ClassHours,IFNULL(B.SellPrice,0) AS SellPrice
SELECT A.* ,IFNULL(B.CourseName,'') AS CourseName,IFNULL(B.ClassHours,0) AS ClassHours,IFNULL(B.SellPrice,0) AS SellPrice,IFNULL(B.CoursewareFee,0) AS CoursewareFee,IFNULL(B.TextbookFee,0) AS TextbookFee
FROM RB_Class_Course AS A LEFT JOIN rb_course AS B ON A.CourseId=B.CourseId