北极星的兔(提问者)SELECT r.intime,r.sb_id,r.config_id,r.start_time,r.end_time,r.value,c.channel_identifier,c.name_identifier
FROM _run r INNER JOIN _command_config c ON r.config_id = c.id
where 1=1
str_to_date(r.intime,\'%Y-%m-%d\')>=\'${starttime}\' and
str_to_date(r.intime,\'%Y-%m-%d\')<=\'${endtime}\' and
${if(len(sb_id) == 0,\"\",\"r.sb_id = \'\" + sb_id + \"\'\")}
order by r.intime desc