获取给定月中哪些天有聊天记录

select distinct( DATE_FORMAT(send_time,'%Y-%m-%d') ) as consultation_date from text_message a
where a.type=1 and a.category=1 
and 
  ((a.sender_id=6228841891912220677 and a.receiver_id=6227763200226492443) 
  or a.sender_id=6227763200226492443 and a.receiver_id=6228841891912220677)
and a.send_time between '2017-03-01 00:00:00' and '2017-04-01 00:00:00'

order by consultation_date asc;
原文地址:https://www.cnblogs.com/quietwalk/p/6505622.html