标签:images 记录 join 技术 sql java use and user
SELECT wle.*, CASE WHEN ‘2017-08-10 14:00:00‘ > wle.et THEN ‘回看‘ WHEN wle.st >= ‘2017-08-10 14:00:00‘ AND ‘2017-08-10 14:00:00‘ < wle.et THEN ‘直播中‘ WHEN wle.st > ‘2017-08-10 14:00:00‘ < wle.et AND (wles.statusx IS NULL OR wles.statusx != ‘1‘) THEN ‘预约‘ WHEN wle.st >‘2017-08-10 14:00:00‘ < wle.et AND wles.statusx = ‘1‘ THEN ‘巳预约‘ END statusx FROM wsp_live_epg wle LEFT JOIN wsp_live_epg_subscribe wles ON (wle.id = wles.epg_id AND wles.user_id = ‘5l3y7yJwUpN4pdtjCFZYBpYFOt54Hfpz‘) WHERE wle.live_tv_id = 9 AND wle.dt = ‘2017-08-10‘
标签:images 记录 join 技术 sql java use and user
原文地址:http://www.cnblogs.com/SimonHu1993/p/7341159.html