подскажите почему может не работать
SELECT v.id, v.uid, s.price, u.balance, u.discount, d._adr_telefon, s.param AS srv_param, DATE(FROM_UNIXTIME(v.tm_end)) AS date FROM users_services v JOIN users u ON v.uid=u.id JOIN services s ON v.next_service_id=s.service_id JOIN data0 d ON v.uid=d.uid WHERE v.tm_end>0 AND v.tm_end<(UNIX_TIMESTAMP()+'259200') AND v.next_service_id>0 AND s.price>0 AND u.balance<s.price*(1-u.discount/100) AND block_if_limit>0 AND u.state='on' AND d._adr_telefon<>'' AND v.tags NOT LIKE '%,expire_sms,%' AND NOT EXISTS (SELECT id FROM v_services WHERE uid=u.id AND price<0) AND NOT EXISTS (SELECT id FROM pays WHERE mid=u.id AND category=202 AND reason='turbosms') AND EXISTS (SELECT 1 FROM users_services WHERE uid=u.id AND tags LIKE '%,remindsms,%')
Если убрать, то уже есть условия для отправки
AND EXISTS (SELECT 1 FROM users_services WHERE uid=u.id AND tags LIKE '%,remindsms,%')
тег указан в услугах.