首页 > 代码库 > 获取给定月中哪些天有聊天记录

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

select distinct( DATE_FORMAT(send_time,%Y-%m-%d) ) as consultation_date from text_message awhere 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:00order by consultation_date asc;

 

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