mysql常用语句备份


case… when…

group_concat


--- 缺集节目列表及分集
select case when mtype=0 then '电影'
when mtype=1 then '电视剧'
when mtype=2 then '短视频'
when mtype=3 then '预告片'
when mtype=4 then '花絮'
when mtype=5 then '混合类型'
when mtype=6 then '动漫'
when mtype=7 then '综艺'
when mtype=8 then '少儿'
when mtype=9 then '生活'
when mtype=10 then '纪录片'
when mtype=11 then '3D影片'
when mtype=12 then '电视回看'
when mtype=13 then '超高清'
when mtype=14 then '体育'
when mtype=15 then '音乐MTV'
when mtype=16 then '娱乐频道'
when mtype=17 then '时效热点'
when mtype=18 then '电视回看(真)'
when mtype=19 then '专题(B2B项目专用)'
when mtype=20 then '世界杯'
when mtype=21 then '购物'
when mtype=22 then '卡拉OK'
end as mtype1,mtype,rm.mid,cnname,GROUP_CONCAT(rs.sid ORDER BY rs.sid) as sid
 from voole_vrm.vrm_sp_authorlist rs
INNER JOIN voole_global.res_movieinfo rm ON rs.mid = rm.mid
where ispid='66660011' and mime='mp4' and rs.mid in (
    SELECT mid from voole_global.res_movieextend where ispid='66660011' and injectstatus=2 
) and fid not in (
    select fid from voole_global.res_mediadown where downstatus in (104,113,213)
)
GROUP BY rm.mid order by mtype,rm.mid


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值