首页 > 代码库 > 历史最长的SQL语句
历史最长的SQL语句
注释:查询该课程表下,所有的课程以及课程观看的人数统计
SELECT ml.`name` as lessonName,ml.category,ml.deleted,ml.teacherName,ml.id,ml.liveId,ml.selected,mlc.channelId,p.viewNums,count(*) as totalNumfrom mlk_live_channel AS ml LEFT JOIN mlk_lesson_channel AS mlc ON mlc.lessonId = ml.idLEFT JOIN mlk_live_channel AS mcl ON mcl.id = mlc.channelId LEFT JOIN (SELECT mpr.liveId,mpr.memberId,COUNT(mpr.liveId) as viewNums FROM mlk_payment_record AS mpr WHERE mpr.payType = 3 AND mpr.notify = 1 GROUP BY mpr.liveId) AS p ON p.liveId = mcl.liveIdWHERE ml.deleted = 0 AND ml.category = 1GROUP BY ml.idORDER BY ml.create_time
历史最长的SQL语句
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。