select `in`.date,leads.* from leads left join `in` on `in`.lead_id = leads.id where `in`.date BETWEEN '{$start_date}' AND '{$end_date}'