怎么做首先截取dev_id字段15位字符串,在根据字符串内容查询task_id字段不包含1和5的,并且去掉dev_id的重复数据?
收起
select substr(dev_id, 1, 15) as dev_id from your_table where task_id not like '%1%' and task_id not like '%5%' group by substr(dev_id, 1, 15) having count(substr(dev_id, 1, 15)) = 1
报告相同问题?