select * from assignment
where (assignment.agency_id = '102' and assignment.status = '1' and assignment.is_deleted = '0') and assignment_start_date >= '2018-01-01' and assignment_end_date <= '2018-06-05' .I wrote query like this but i have more than 10 assignments in this '2018-01-01'.but result is only one record
"2018-01-01", " 2018-05-31"
Are assignment_start_date and assignment_end_date dates or timestamps? You might want to change your query to include 2018-01-01 00:00:00 and 2018-06-05 23:59:59.
As you already know that you have more than 10 assignments, you should compare your query against the attributes of the assignments which are not returned by the query.