added advanced sql to donor query