-Added SQL for checking autoCheckin status.