basic query for date range