标签:%s mat sub date_sub res select xxxx for ESS
SELECT DISTINCT(p.`id`), p.`id` , v.`full_name` , CONCAT(LEFT(v.mobile, 7), ‘****‘) , DATE_FORMAT(DATE_ADD(v.`visit_time`, INTERVAL 8 HOUR), ‘%Y-%m-%d %H:%i:%s‘) , v.`remark` , w.`address_city` , v.`record_person` , v.`consult_country` , v.`first_visit` , v.`contact_advisor` , v.`follow_advisor` , v.`assign_person` FROM `aaaa`.`xxxxx` AS v LEFT JOIN `bbbb`.`xxxxxxxxxx` AS p ON v.`mobile`= p.`mobile` LEFT JOIN `cccc` AS w ON (w.`full_name` =v.`contact_advisor` or w.`full_name`=v.`follow_advisor` or w.`full_name` =v.`assign_person` ) WHERE v.`visit_time`> DATE_FORMAT(DATE_SUB(now(), INTERVAL 24 HOUR), ‘%Y-%m-%d 10:00:00‘)
标签:%s mat sub date_sub res select xxxx for ESS
原文地址:https://www.cnblogs.com/niehaidong111/p/10395306.html