select
ROUND(TO_NUMBER(SYSDATE - TO_DATE(max(END_TIME), 'yyyy-MM-dd HH24:mi:ss') ) * 24 * 60 ) as "interval",
count(1) as "times" from SYS_NOTIFY_SEND_LOG where contact_type is null and message_id = #{messageId}
select
extract(epoch from((SYSDATE - to_timestamp(max(end_time), 'yyyy-mm-dd hh24:mi:ss')))) as "interval",
count(1) as "times"
from SYS_NOTIFY_SEND_LOG where contact_type is null and message_id = #{messageId}
