select
    id,
    relation_id,
    `type`,
    member_id,
    point_num,
    channel,
    `datetime`
from
    biz_data_analyze_point_record
where 1=1
<< AND relation_id = :relationId >>
<< AND channel IN (:channels) >>
<< AND datetime >=  :startDate AND datetime <= :endDate >>
order by datetime desc